Datasets:
city_id stringclasses 210
values | year int64 2.02k 2.03k | metric stringclasses 4
values | predicted_value float64 1.99 5.56k |
|---|---|---|---|
USC00042863 | 2,019 | annual_avg_temp | 67.085215 |
USC00042863 | 2,019 | cdd | 1,736.373557 |
USC00042863 | 2,019 | hottest_day_temp | 104.43 |
USC00042863 | 2,019 | total_precip_in | 12.260667 |
USC00042863 | 2,020 | annual_avg_temp | 67.215059 |
USC00042863 | 2,020 | cdd | 1,771.705686 |
USC00042863 | 2,020 | hottest_day_temp | 104.43 |
USC00042863 | 2,020 | total_precip_in | 12.260667 |
USC00042863 | 2,021 | annual_avg_temp | 67.344903 |
USC00042863 | 2,021 | cdd | 1,807.998506 |
USC00042863 | 2,021 | hottest_day_temp | 104.43 |
USC00042863 | 2,021 | total_precip_in | 12.260667 |
USC00042863 | 2,022 | annual_avg_temp | 67.474746 |
USC00042863 | 2,022 | cdd | 1,844.291327 |
USC00042863 | 2,022 | hottest_day_temp | 104.43 |
USC00042863 | 2,022 | total_precip_in | 12.260667 |
USC00042863 | 2,023 | annual_avg_temp | 67.60459 |
USC00042863 | 2,023 | cdd | 1,880.813989 |
USC00042863 | 2,023 | hottest_day_temp | 104.43 |
USC00042863 | 2,023 | total_precip_in | 12.260667 |
USC00042863 | 2,024 | annual_avg_temp | 67.734434 |
USC00042863 | 2,024 | cdd | 1,918.326203 |
USC00042863 | 2,024 | hottest_day_temp | 104.43 |
USC00042863 | 2,024 | total_precip_in | 12.260667 |
USC00042863 | 2,025 | annual_avg_temp | 67.864278 |
USC00042863 | 2,025 | cdd | 1,955.845029 |
USC00042863 | 2,025 | hottest_day_temp | 104.43 |
USC00042863 | 2,025 | total_precip_in | 12.260667 |
USC00166584 | 2,019 | annual_avg_temp | 67.504046 |
USC00166584 | 2,019 | cdd | 2,828.658174 |
USC00166584 | 2,019 | hottest_day_temp | 100.836667 |
USC00166584 | 2,019 | total_precip_in | 56.060333 |
USC00166584 | 2,020 | annual_avg_temp | 67.63389 |
USC00166584 | 2,020 | cdd | 2,865.286189 |
USC00166584 | 2,020 | hottest_day_temp | 100.836667 |
USC00166584 | 2,020 | total_precip_in | 56.060333 |
USC00166584 | 2,021 | annual_avg_temp | 67.763734 |
USC00166584 | 2,021 | cdd | 2,902.064246 |
USC00166584 | 2,021 | hottest_day_temp | 100.836667 |
USC00166584 | 2,021 | total_precip_in | 56.060333 |
USC00166584 | 2,022 | annual_avg_temp | 67.893578 |
USC00166584 | 2,022 | cdd | 2,938.842302 |
USC00166584 | 2,022 | hottest_day_temp | 100.836667 |
USC00166584 | 2,022 | total_precip_in | 56.060333 |
USC00166584 | 2,023 | annual_avg_temp | 68.023421 |
USC00166584 | 2,023 | cdd | 2,976.1154 |
USC00166584 | 2,023 | hottest_day_temp | 100.836667 |
USC00166584 | 2,023 | total_precip_in | 56.060333 |
USC00166584 | 2,024 | annual_avg_temp | 68.153265 |
USC00166584 | 2,024 | cdd | 3,013.53018 |
USC00166584 | 2,024 | hottest_day_temp | 100.836667 |
USC00166584 | 2,024 | total_precip_in | 56.060333 |
USC00166584 | 2,025 | annual_avg_temp | 68.283109 |
USC00166584 | 2,025 | cdd | 3,050.944961 |
USC00166584 | 2,025 | hottest_day_temp | 100.836667 |
USC00166584 | 2,025 | total_precip_in | 56.060333 |
USC00280734 | 2,019 | annual_avg_temp | 51.539101 |
USC00280734 | 2,019 | cdd | 798.456344 |
USC00280734 | 2,019 | hottest_day_temp | 95 |
USC00280734 | 2,019 | total_precip_in | 45.632333 |
USC00280734 | 2,020 | annual_avg_temp | 51.668945 |
USC00280734 | 2,020 | cdd | 816.198533 |
USC00280734 | 2,020 | hottest_day_temp | 95 |
USC00280734 | 2,020 | total_precip_in | 45.632333 |
USC00280734 | 2,021 | annual_avg_temp | 51.798788 |
USC00280734 | 2,021 | cdd | 834.148423 |
USC00280734 | 2,021 | hottest_day_temp | 95 |
USC00280734 | 2,021 | total_precip_in | 45.632333 |
USC00280734 | 2,022 | annual_avg_temp | 51.928632 |
USC00280734 | 2,022 | cdd | 852.098313 |
USC00280734 | 2,022 | hottest_day_temp | 95 |
USC00280734 | 2,022 | total_precip_in | 45.632333 |
USC00280734 | 2,023 | annual_avg_temp | 52.058476 |
USC00280734 | 2,023 | cdd | 870.441903 |
USC00280734 | 2,023 | hottest_day_temp | 95 |
USC00280734 | 2,023 | total_precip_in | 45.632333 |
USC00280734 | 2,024 | annual_avg_temp | 52.18832 |
USC00280734 | 2,024 | cdd | 889.071673 |
USC00280734 | 2,024 | hottest_day_temp | 95 |
USC00280734 | 2,024 | total_precip_in | 45.632333 |
USC00280734 | 2,025 | annual_avg_temp | 52.318163 |
USC00280734 | 2,025 | cdd | 907.701443 |
USC00280734 | 2,025 | hottest_day_temp | 95 |
USC00280734 | 2,025 | total_precip_in | 45.632333 |
USC00286055 | 2,019 | annual_avg_temp | 54.754484 |
USC00286055 | 2,019 | cdd | 1,175.236227 |
USC00286055 | 2,019 | hottest_day_temp | 97.5 |
USC00286055 | 2,019 | total_precip_in | 49.499 |
USC00286055 | 2,020 | annual_avg_temp | 54.884327 |
USC00286055 | 2,020 | cdd | 1,196.876482 |
USC00286055 | 2,020 | hottest_day_temp | 97.5 |
USC00286055 | 2,020 | total_precip_in | 49.499 |
USC00286055 | 2,021 | annual_avg_temp | 55.014171 |
USC00286055 | 2,021 | cdd | 1,218.609216 |
USC00286055 | 2,021 | hottest_day_temp | 97.5 |
USC00286055 | 2,021 | total_precip_in | 49.499 |
USC00286055 | 2,022 | annual_avg_temp | 55.144015 |
USC00286055 | 2,022 | cdd | 1,240.343913 |
USC00286055 | 2,022 | hottest_day_temp | 97.5 |
USC00286055 | 2,022 | total_precip_in | 49.499 |
- TL;DR — what we did and why it works
- Method
- Reproducibility & openness (rubric: reproducibility/openness, interoperability)
- Reuse & extensibility (rubric: reuse/extensibility)
- Feedback to the ecosystem (rubric: feedback to the ecosystem)
- Scientific & societal value — a climate-adaptation policy grounded in these forecasts
- Honor code / anti-leakage
- Repository map
- License
Protostar Challenge — Climate Risk Intelligence
Track 4 submission: forecasting annual climate metrics for 210 U.S. cities (2019–2025)
Forecast: submission.csv — 5,880 rows (210 cities × 7 years × 4 metrics), long format city_id, year, metric, predicted_value.
Reproduce everything: cd code && pip install -r requirements.txt && python reproduce.py (regenerates submission.csv byte-for-byte in ~1 second from the frozen base forecasts).
TL;DR — what we did and why it works
The challenge scores each metric by skill over the 1989–2018 climatology:
S_m = 1 − MAE_m / MAE_climatology_m Score = 100 × max(0, mean of the four S_m)
For annual, city-level climate, the 30-year normal is a famously hard baseline — an unguarded machine-learning model usually scores negative against it. So our design principle is not "most complex model" but:
Only deviate from climatology where an honest out-of-sample backtest proves we beat it — and fall back to climatology everywhere else (a hard per-metric floor).
That floor makes a negative score structurally impossible. It lets us lean into the real signal — the warming trend in temperature and cooling-degree-days — while staying at climatology for precipitation (unbeatable at this horizon, confirmed by both our backtest and the live leaderboard) and taking only a small, honest edge on single-day heat extremes.
Backtest results (rolling origin; two horizon regimes)
| Metric | Climatology MAE | Our MAE | Skill |
|---|---|---|---|
annual_avg_temp |
1.76 °F | 1.44 °F | +0.183 |
cdd |
210 °F·days | 162 °F·days | +0.227 |
total_precip_in |
6.31 in | 6.03 in | +0.045 |
hottest_day_temp |
2.49 °F | 2.41 °F | +0.033 |
| Overall mean skill | +0.122 |
We validate on two fold regimes: long-horizon folds — train→(2011→2012-18), (2008→2009-15), (2005→2006-12), each 7 years ahead like the 2022–2025 final scoring — and short-horizon (1–3 yr) folds mirroring the 2019–2021 live window, where our overall skill is 0.086. Every metric is positive in every fold. For calibration, on the same folds a 10-year-mean scores 6.6, an equal-weight linear trend scores 0.0 (it wrecks precipitation and hottest-day), and the 30-year climatology scores 0 by definition — our ensemble beats all of them.
We deliberately optimise the honest ≤2018 backtest, not the live score. The live window (2019–2021) is a single 1–3-year realisation that happened to follow the 2018 trend unusually closely; tuning a model by its 2019–2025 score would be using the answers. The long-horizon backtest is the unbiased proxy for the 2022–2025 final that decides the challenge, so that is what every design choice is measured against.
Method
Developed over several rounds of iterative modelling and cross-validated model comparison, each candidate judged by the same leakage-proof harness, with a per-metric selection that keeps only what beats climatology out-of-sample.
1. Leakage-proof evaluation harness (code/src/harness.py). The single source of truth: tidy targets, climatology baseline, rolling backtest, and a validating submission writer. A model only ever receives train rows with year <= cutoff, so forecasting a future year can physically never see it. Climatology-as-a-model scores exactly 0.000 skill — our proof the evaluator is unbiased.
2. Candidate forecasters (code/experiments*/). Deliberately diverse:
- Trend family — robust/shrunk Theil–Sen, state-space local-linear trend, damped ETS, spatial-analog, recency-weighted, horizon-aware blends, CV-calibrated trend, CDD-from-temperature.
- Daily-data family (mining the 10M-row daily subset) — a daily temperature-distribution model that recomputes CDD analytically (Σ max(0, dailymean−65)); a summer/non-summer seasonal warming decomposition; an extreme-value model for hottest-day; regional-pooled trends.
- Station-homogenisation family — using
coverage_and_stations(station-change flags) andcity_info(station join dates) to detect and remove artificial level-shifts caused by a city's recording station changing, before fitting trends. Correcting these inhomogeneities measurably sharpened the CDD forecast.
(Gradient-boosting, meta-stacking and several trend variants were built but excluded because they did not beat the champion out-of-sample — kept in the repo for transparency.)
3. The champion recipe (code/src/champion.py). Cross-validating per metric over all verified models:
temp = 0.75 · trend_ensemble + 0.25 · seasonal_warming_decomp
hottest = seasonal_warming_decomp
precip = climatology
cdd = 0.5 · station_inhomogeneity_cdd + 0.5 · station_corrected_distribution_cdd
Temperature leans on the trend + seasonal blend; CDD on the mean of two station-homogenised models (averaging decorrelated errors lifted CDD skill from 0.221 to 0.227); precipitation stays at climatology; hottest-day takes a small honest edge. The data chose the recipe, not us — a metric only moves off climatology when cross-validation says it helps, and temperature could not be pushed past 0.183 by any method we tried (a genuine ceiling at this horizon).
Reproducibility & openness (rubric: reproducibility/openness, interoperability)
- One command, ~1 second:
python code/reproduce.pyapplies the frozen recipe to the base forecasts incode/frozen/and regeneratessubmission.csv. We verified it is byte-identical to the committed file. - Why frozen forecasts: each base model's cross-validated selection is compute-heavy to re-derive, so each model's final 2019–2025 output is frozen under
code/frozen/. Every base model is fully present as source (code/src/,code/experiments*/) and can be regenerated from scratch —champion.pydocuments exactly how they combine. - Deterministic, no RNG seeds; pinned environment (
requirements.txt); only mainstream open-source libraries (numpy, pandas, scikit-learn, statsmodels, scipy, huggingface_hub). No private data, API keys, or GPU. - Standard, interoperable formats: HF Datasets + Parquet in, long-format CSV out.
- Honest validation note: some global combiner/calibration choices are selected by cross-fold CV (standard practice), so reported backtest skill carries a small in-sample optimism; the per-horizon split and climatology floor keep it conservative, and no post-2018 data is ever used — including for model selection.
Reuse & extensibility (rubric: reuse/extensibility)
One contract powers everything:
def predict_fn(train_targets, cutoff, years) -> DataFrame[city_id, year, metric, predicted_value]
H.backtest(predict_fn, H.DEFAULT_FOLDS) # -> per-metric + overall skill vs climatology
Write a predict_fn, run backtest, and your model is instantly comparable to all 20+ of ours. The harness is a reusable, leakage-proof benchmark for annual climate forecasting (any GHCN-style city-year panel), and the per-metric-floor selection is model-agnostic — it is how we extended the approach across several rounds without ever touching the evaluator.
Feedback to the ecosystem (rubric: feedback to the ecosystem)
Concrete data-quality issues we found in CMU-OSPO/protostar-climate-train-to-2018, handled in harness.py and flagged for the maintainers:
-infsentinel inMax Tmaxfor ~1,184 station-years with no valid daily max — slips pastdropna()and silently poisons any mean/MAE. We coerce±inf → NaNat load. Suggestion: store as null in the Parquet.- Multi-decade temperature gaps at some stations (e.g.
USW00003856has a single temperature observation in 2009–2018), which break a strict 1989–2018 climatology window and make naive trend models extrapolate nonsensically. We use a gap-safe "most-recent-30-observed-years" climatology plus a recent-history clamp in the ensemble. - Impossible hottest-day values (annual-max
tmaxof ~44–55 °F at a few station-years) that pollute per-city climatology — worth auditing upstream. - Station-change inhomogeneities. The
coverage_and_stationschange-flags are valuable but under-documented; making the magnitude of each station move explicit (not just a count) would let everyone homogenise records more reliably. Our station-correction step is a worked example of using them.
We offer the harness back as a reusable evaluation scaffold for future editions of the track.
Scientific & societal value — a climate-adaptation policy grounded in these forecasts
Our 2019–2025 forecasts describe where U.S. urban climate risk is heading, and cooling-degree-days (CDD) is the single most predictable risk signal we found (highest skill, +0.23). CDD maps almost one-to-one onto summer electricity demand and heat exposure, making it directly actionable.
What the forecasts say. Across the 210 cities, all 210 are projected to see rising cooling demand (mean +231 CDD·days) and 209 to keep warming (mean +1.58 °F vs the 1989–2018 normal). The increase is sharply uneven:
- Fastest warming: the arid interior West — Elko NV (+2.6 °F), Reno NV (+2.6 °F), Bakersfield CA (+2.4 °F), plus Des Moines IA. Heat compounds there with water stress.
- Largest cooling-demand growth: the Gulf/Southeast coast and the desert Southwest — Gulfport MS (+511 CDD), Escondido CA (+490), Tampa FL (+484), Needles CA (+450), West Palm Beach FL (+444).
Recommended adaptation strategy. Because CDD is both rising and forecastable, utilities and city governments can plan against it rather than react:
- Target hardening where demand grows fastest — grid-capacity upgrades, heat-pump/efficiency retrofit subsidies, and cool-roof/urban-canopy programs in the top-CDD-growth cities above, not uniformly nationwide.
- Site public cooling infrastructure from the forecast — use projected per-city CDD to place and staff cooling centers and set heat-health early-warning thresholds, with extra weight on the humid Gulf/Southeast coast (Gulfport, Tampa, West Palm Beach) where heat-index risk outpaces raw temperature.
- Couple heat and water adaptation in the interior West — Reno/Elko-type cities need combined heat and drought planning; CDD-driven peak load should steer renewable + storage buildout there first.
- Fund proportional to projected change, and revisit annually — the per-city skill numbers tell policymakers how much to trust each forecast: invest with confidence where skill is high (temperature, CDD), hedge where it is low (precipitation).
The honest flip side is itself a scientific finding: annual precipitation remains near-unpredictable at this horizon (skill ≈ 0.045), independently confirmed by the live leaderboard where no team beats the climatology baseline on it. Flood adaptation should therefore rely on robustness and insurance, not point forecasts — a conclusion our climatology-floor design states openly rather than hiding behind false precision.
Honor code / anti-leakage
Every forecast for year Y uses only observations through the cutoff (≤ 2018 for the real submission) — including every access to the daily dataset (filtered to Date year ≤ cutoff) and the station-metadata subsets, and including model selection. No 2019–2025 data of any kind, from any source, enters the forecast or the choice of model. The harness enforces this by construction, and we re-audited every model for it.
Repository map
submission.csv the forecast (5,880 rows)
README.md this file
data/city_ids.txt the 210 official city ids
code/
reproduce.py one-command reproduction (~1s, via frozen recipe)
requirements.txt pinned environment
frozen/ the base forecasts the champion combines
src/harness.py leakage-proof targets + climatology + rolling backtest + validator
src/champion.py champion: frozen per-metric recipe (the submitted forecast)
src/ensemble_v7.py the CV search that derived the recipe (compute-heavy)
src/ensemble_v5/v3/v2/.py earlier rounds, kept for transparency
experiments/*/model.py trend-family forecasters
experiments2-3/*/model.py horizon-aware / calibrated / coupled forecasters
experiments4/*/model.py daily-data / EVT / seasonal forecasters
experiments5/*/model.py station-homogenisation / harmonic / pooling forecasters
License
MIT.
- Downloads last month
- 93