How 00sodj/weather-prediction-model works
This repository is a China-wide temperature forecasting system that collects and repairs weather data, trains per-city ARIMA forecasts, and produces a self-contained interactive report. The main workflow is run_predict.py: update recent daily and hourly observations, invoke historical gap repair, run modeling and evaluation, then generate the report. The report also presents hourly weather analysis. The README documents a separate initial full-data collection and an automated publication workflow; those deployment mechanics are not expanded here. The sampled excerpts establish the main runtime wiring, but not every detail of the initial collector or report interactions.
Main entry points: run_predict.py Pipeline runner · weather_predict.py ARIMA training · generate_standalone_html.py Report generator · 过去一年气温数据_逐日.csv Daily weather CSV
Components 18
Data collection
- Pipeline runner
mox/run_predict.py - Full data collector
mox/fetch_weather_data.py - Recent backfill
mox/fetch_missing_v2.py - Gap repair
mox/backfill_missing_days.py
Forecasting
- ARIMA training
mox/weather_predict.py
Reporting
- Report generator
mox/generate_standalone_html.py - Interactive report
mox/天气温度预测系统.html - Pages entry
index.html
Runtime data
- Daily weather CSV
mox/weather_data/过去一年气温数据_逐日.csv - Hourly weather CSV
mox/weather_data/过去24小时气象数据_逐小时.csv - Order cache
mox/model_outputs/order_cache.json - Forecast results
mox/model_outputs/arima_results.json - Training summary
mox/model_outputs/training_summary.json - Hourly analysis
mox/model_outputs/hourly_analysis.json
Other components
- Operator
- Open-Meteo API
- Browser viewer
- ECharts CDN
Connections 28
- Operator → Pipeline runner: starts
- Pipeline runner → Open-Meteo API: fetches data
- Pipeline runner → Daily weather CSV: updates
- Pipeline runner → Hourly weather CSV: writes
- Pipeline runner → Gap repair: calls repair
- Gap repair → Open-Meteo API: fetches gaps
- Gap repair → Daily weather CSV: repairs
- Full data collector → Open-Meteo API: fetches history
- Full data collector → Daily weather CSV: writes
- Full data collector → Hourly weather CSV: writes
- Recent backfill → Open-Meteo API: fetches history
- Recent backfill → Daily weather CSV: merges data
- Pipeline runner → ARIMA training: runs
- ARIMA training → Daily weather CSV: reads
- ARIMA training → Hourly weather CSV: reads
- ARIMA training → Order cache: reads and writes
- ARIMA training → Forecast results: writes forecasts
- ARIMA training → Training summary: writes metrics
- ARIMA training → Hourly analysis: writes analysis
- Pipeline runner → Report generator: runs
- Report generator → Forecast results: reads
- Report generator → Training summary: reads
- Report generator → Hourly analysis: reads
- Report generator → Interactive report: generates
- Browser viewer → Pages entry: opens
- Pages entry → Interactive report: redirects to
- Browser viewer → Interactive report: views
- Interactive report → ECharts CDN: loads charts