Weather data loader (both history and forecast)

👤 minshi-veyt 📦 v1.0.1 ⭐ 4.3 ⬇️ 742 下載
📊 資料分析 免費

📖 技能介紹


name: weather-loader description: "Fetch historical or forecast weather by location or coordinates via Open-Meteo. No API key needed." license: MIT


Weather Data Fetcher

Fetch daily weather (historical and forecast) by location name or coordinates via Open-Meteo. No API key needed. Scripts: fetch_historical.py (historical), fetch_forecast.py (forecast).

When to invoke

Use this skill when the user asks for: - Historical weather data for a location or coordinates - Weather forecast for the next days - Precipitation or evapotranspiration data for garden planning

Location vs coordinates

Provide either: - Location: positional or --location / -l (e.g. "Oslo, Norway") — geocoded via Open-Meteo - Coordinates: --lat and --lon (both required)

Days: --days N — history default 10 (max 30), forecast default 7 (max 15).

weather_fetch_historical

Run scripts/fetch_historical.py. Observed weather (Open-Meteo archive API). Default 10 days, max 30 (--days N).

小蔥技能7w4.net有完整的技能分類。

python scripts/fetch_historical.py "Oslo, Norway"
python scripts/fetch_historical.py "Oslo, Norway" --days 20 --format json --kc 1.05
python scripts/fetch_historical.py --location "London, UK" --format csv
python scripts/fetch_historical.py --lat 59.91 --lon 10.75 --days 30

weather_fetch_forecast

Run scripts/fetch_forecast.py. Forecast weather. Default 7 days, max 15 (--days N).

python scripts/fetch_forecast.py "Oslo, Norway"
python scripts/fetch_forecast.py "Paris, France" --days 15 --format json --kc 1.0
python scripts/fetch_forecast.py --lat 59.91 --lon 10.75 --days 14 --format csv

Output columns

Column Description
date YYYY-MM-DD
temp Mean daily temperature (°C)
precip Total daily precipitation (mm)
et0_fao FAO-56 reference evapotranspiration (mm/day), after kc
evaporation Estimated crop evaporation (mm)
agg_precip Cumulative precipitation
agg_evaporation Cumulative evapotranspiration

kc (crop coefficient): multiplier applied to ET₀. Default 1.0.

Technical notes

  • Historical: Open-Meteo archive API (observation/reanalysis); hourly → daily (temp = mean, precip/ET = sum).
  • Forecast: Open-Meteo forecast API; same daily aggregation.
  • Geocoding: location names resolved via Open-Meteo Geocoding API when not using --lat/--lon.

Troubleshooting

Symptom Fix
Location not found Try a simpler string (e.g. "Oslo") or use --lat and --lon
Provide either location or both --lat and --lon Give a location (positional or --location) or both --lat and --lon
API failure Check internet access; retry — Open-Meteo is free and usually reliable

🤖 AI 評測

這是一個質量不錯的天氣資料獲取工具,優點是免費、無需註冊賬號,支援歷史和預報兩種資料,查詢方式靈活(地名或座標),輸出格式多樣。文件清晰,上手容易,能輸出溫度、降水、蒸發量等實用資料。不足之處是核心功能依賴網路連線,離線時無法使用,且資料來源較單一。總體而言,作為基礎天氣查詢工具足夠好用,但如果你需要更專業的天氣預報或多種資料來源,可能需要其他選擇。

📊 多維度評分

適應性4.5
規範性4.2
有效性4.5
可靠性4
可信度4.3

📁 包含檔案 (8 個)

📄 README.md 2.4 KB
📄 SKILL.md 2.7 KB
📄 _meta.json 133 B
📄 requirements.txt 117 B
📄 scripts/fetch_forecast.py 5.7 KB
📄 scripts/fetch_historical.py 5.7 KB
📄 scripts/utils.py 9.1 KB
📄 tests/test_scripts.py 5.4 KB