← 返回
数据分析 中文

Open-Meteo Weather + Weather Strip

Get weather forecasts via Open-Meteo API (free, no API key). Use when: user asks about weather, temperature, rain probability, UV index, wind, or forecasts f...
通过Open-Meteo API(免费、无需密钥)获取天气预报。适用于用户询问天气、气温、降雨概率、紫外线指数、风力或预报等情况。
dapkus
数据分析 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 795
下载
💾 15
安装
1
版本
#latest

概述

Open-Meteo Weather

Free weather API. No API key needed. Returns JSON.

Scripts

weather.sh — Raw JSON Forecast Data

scripts/weather.sh <latitude> <longitude> [current|hourly|daily] [days] [units]
  • days: 1-16 (default 3)
  • units: fahrenheit (default) or celsius
  • current mode returns both current snapshot and daily forecast
scripts/weather.sh 37.75 -122.43 current 3 fahrenheit
scripts/weather.sh 37.75 -122.43 hourly 2 fahrenheit
scripts/weather.sh 37.75 -122.43 daily 7 fahrenheit

weather_strip.py — SVG Weather Strip Widget

Generates a Weather Strip-style interactive SVG visualization. Features:

  • Smooth bezier curves for temperature and dew point
  • Cloud cover area graph (semi-transparent, 0-100%)
  • Rain amount bar graph (opaque light blue, 0-2 in/hr scale, shown when rain prob >50%)
  • Rain probability line overlay
  • UV index bar (yellow/orange/red at UV 3+)
  • Sky gradient background (sky blue day → navy night, smooth sunrise/sunset transitions)
  • Moon phase icon at sunset
  • Fixed scrubber bar with scroll-to-read tooltip (shows all metrics)
  • Multi-city support with time-range scheduling
  • Fixed 0-110°F temperature scale
  • 7-day daily forecast strip below hourly
# Single location
python3 scripts/weather_strip.py --lat 37.75 --lon -122.43 --days 7 \
  > /Users/dapkus/openclaw-apps/digest-app/static/weather-strip.html

# Standalone preview page
python3 scripts/weather_strip.py --lat 37.75 --lon -122.43 --days 7 \
  --output /Users/dapkus/openclaw-apps/digest-app/static/weather-strip-preview.html

# Multi-city with time ranges (for travel)
python3 scripts/weather_strip.py --schedule '[
  {"name":"SF","lat":37.75,"lon":-122.43,"ranges":[
    ["2026-03-01T00:00","2026-03-02T08:00"],
    ["2026-03-06T15:00","2026-03-07T23:00"]
  ]},
  {"name":"Palm Springs","lat":33.83,"lon":-116.55,"ranges":[
    ["2026-03-02T10:00","2026-03-06T13:00"]
  ]}
]' --days 7 > /Users/dapkus/openclaw-apps/digest-app/static/weather-strip.html

Schedule format: Each location has name, lat, lon, and either:

  • ranges: list of ["start_iso", "end_iso"] pairs (hour-level precision, skips transit gaps)
  • dates: list of "YYYY-MM-DD" strings (whole days, simpler)

Output: Without --output, prints embeddable

to stdout. With --output, writes a full standalone HTML page.

Digest Integration

The digest app reads static/weather-strip.html and includes it at the top of each digest page.

Regenerate daily as part of morning digest generation:

  1. Generate weather strip → static/weather-strip.html
  2. If travel scheduled, use --schedule with time ranges
  3. Default: SF single-location

Common Coordinates

LocationLatLon
---------
San Francisco37.75-122.43
New York40.71-74.01
Los Angeles34.05-118.24
London51.51-0.13
Palm Springs33.83-116.55

For other cities:

curl -sf "https://geocoding-api.open-meteo.com/v1/search?name=CityName&count=1" | jq '.results[0] | {name, latitude, longitude}'

WMO Weather Codes

CodeMeaning
------
0Clear sky
1-3Mainly clear / Partly cloudy / Overcast
45, 48Fog / Depositing rime fog
51-55Drizzle: light / moderate / dense
61-65Rain: slight / moderate / heavy
71-75Snow: slight / moderate / heavy
80-82Rain showers: slight / moderate / violent
95, 96, 99Thunderstorm / with hail

Interpreting Results

  • Parse JSON with jq
  • precipitation_probability_max is the best "will it rain?" signal
  • apparent_temperature = feels-like (wind chill + humidity)
  • uv_index_max > 6 = recommend sunscreen
  • Times are in the location's local timezone (auto-detected)

Presentation

Summarize weather conversationally. Lead with what matters: temperature, rain chance, anything unusual. Don't dump raw JSON.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 03:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 64,987
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,919
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 367 📥 140,189