Datasets:
city_id stringclasses 210
values | year int64 2.02k 2.03k | metric stringclasses 4
values | predicted_value float64 3.01 5.15k |
|---|---|---|---|
USC00042863 | 2,019 | annual_avg_temp | 66.9 |
USC00042863 | 2,019 | total_precip_in | 13.03 |
USC00042863 | 2,019 | hottest_day_temp | 103.97 |
USC00042863 | 2,019 | cdd | 1,762.69 |
USC00042863 | 2,020 | annual_avg_temp | 66.96 |
USC00042863 | 2,020 | total_precip_in | 13.03 |
USC00042863 | 2,020 | hottest_day_temp | 103.98 |
USC00042863 | 2,020 | cdd | 1,774.25 |
USC00042863 | 2,021 | annual_avg_temp | 67.01 |
USC00042863 | 2,021 | total_precip_in | 13.03 |
USC00042863 | 2,021 | hottest_day_temp | 103.99 |
USC00042863 | 2,021 | cdd | 1,785.81 |
USC00042863 | 2,022 | annual_avg_temp | 67.07 |
USC00042863 | 2,022 | total_precip_in | 13.03 |
USC00042863 | 2,022 | hottest_day_temp | 103.99 |
USC00042863 | 2,022 | cdd | 1,797.38 |
USC00042863 | 2,023 | annual_avg_temp | 67.12 |
USC00042863 | 2,023 | total_precip_in | 13.03 |
USC00042863 | 2,023 | hottest_day_temp | 104 |
USC00042863 | 2,023 | cdd | 1,808.94 |
USC00042863 | 2,024 | annual_avg_temp | 67.18 |
USC00042863 | 2,024 | total_precip_in | 13.03 |
USC00042863 | 2,024 | hottest_day_temp | 104.01 |
USC00042863 | 2,024 | cdd | 1,820.5 |
USC00042863 | 2,025 | annual_avg_temp | 67.24 |
USC00042863 | 2,025 | total_precip_in | 13.03 |
USC00042863 | 2,025 | hottest_day_temp | 104.02 |
USC00042863 | 2,025 | cdd | 1,832.39 |
USC00166584 | 2,019 | annual_avg_temp | 67.56 |
USC00166584 | 2,019 | total_precip_in | 56.78 |
USC00166584 | 2,019 | hottest_day_temp | 101.15 |
USC00166584 | 2,019 | cdd | 2,814.67 |
USC00166584 | 2,020 | annual_avg_temp | 67.6 |
USC00166584 | 2,020 | total_precip_in | 56.78 |
USC00166584 | 2,020 | hottest_day_temp | 101.16 |
USC00166584 | 2,020 | cdd | 2,824.95 |
USC00166584 | 2,021 | annual_avg_temp | 67.65 |
USC00166584 | 2,021 | total_precip_in | 56.78 |
USC00166584 | 2,021 | hottest_day_temp | 101.18 |
USC00166584 | 2,021 | cdd | 2,835.22 |
USC00166584 | 2,022 | annual_avg_temp | 67.7 |
USC00166584 | 2,022 | total_precip_in | 56.78 |
USC00166584 | 2,022 | hottest_day_temp | 101.19 |
USC00166584 | 2,022 | cdd | 2,845.5 |
USC00166584 | 2,023 | annual_avg_temp | 67.75 |
USC00166584 | 2,023 | total_precip_in | 56.78 |
USC00166584 | 2,023 | hottest_day_temp | 101.2 |
USC00166584 | 2,023 | cdd | 2,855.78 |
USC00166584 | 2,024 | annual_avg_temp | 67.8 |
USC00166584 | 2,024 | total_precip_in | 56.78 |
USC00166584 | 2,024 | hottest_day_temp | 101.22 |
USC00166584 | 2,024 | cdd | 2,866.05 |
USC00166584 | 2,025 | annual_avg_temp | 67.85 |
USC00166584 | 2,025 | total_precip_in | 56.78 |
USC00166584 | 2,025 | hottest_day_temp | 101.23 |
USC00166584 | 2,025 | cdd | 2,876.51 |
USC00280734 | 2,019 | annual_avg_temp | 51.68 |
USC00280734 | 2,019 | total_precip_in | 44.92 |
USC00280734 | 2,019 | hottest_day_temp | 94.87 |
USC00280734 | 2,019 | cdd | 800.75 |
USC00280734 | 2,020 | annual_avg_temp | 51.73 |
USC00280734 | 2,020 | total_precip_in | 44.92 |
USC00280734 | 2,020 | hottest_day_temp | 94.88 |
USC00280734 | 2,020 | cdd | 805.95 |
USC00280734 | 2,021 | annual_avg_temp | 51.78 |
USC00280734 | 2,021 | total_precip_in | 44.92 |
USC00280734 | 2,021 | hottest_day_temp | 94.89 |
USC00280734 | 2,021 | cdd | 811.16 |
USC00280734 | 2,022 | annual_avg_temp | 51.82 |
USC00280734 | 2,022 | total_precip_in | 44.92 |
USC00280734 | 2,022 | hottest_day_temp | 94.9 |
USC00280734 | 2,022 | cdd | 816.36 |
USC00280734 | 2,023 | annual_avg_temp | 51.87 |
USC00280734 | 2,023 | total_precip_in | 44.92 |
USC00280734 | 2,023 | hottest_day_temp | 94.91 |
USC00280734 | 2,023 | cdd | 821.57 |
USC00280734 | 2,024 | annual_avg_temp | 51.92 |
USC00280734 | 2,024 | total_precip_in | 44.92 |
USC00280734 | 2,024 | hottest_day_temp | 94.92 |
USC00280734 | 2,024 | cdd | 826.77 |
USC00280734 | 2,025 | annual_avg_temp | 51.97 |
USC00280734 | 2,025 | total_precip_in | 44.92 |
USC00280734 | 2,025 | hottest_day_temp | 94.93 |
USC00280734 | 2,025 | cdd | 831.98 |
USC00286055 | 2,019 | annual_avg_temp | 54.67 |
USC00286055 | 2,019 | total_precip_in | 49.5 |
USC00286055 | 2,019 | hottest_day_temp | 97.65 |
USC00286055 | 2,019 | cdd | 1,122.12 |
USC00286055 | 2,020 | annual_avg_temp | 54.72 |
USC00286055 | 2,020 | total_precip_in | 49.5 |
USC00286055 | 2,020 | hottest_day_temp | 97.66 |
USC00286055 | 2,020 | cdd | 1,127.96 |
USC00286055 | 2,021 | annual_avg_temp | 54.77 |
USC00286055 | 2,021 | total_precip_in | 49.5 |
USC00286055 | 2,021 | hottest_day_temp | 97.67 |
USC00286055 | 2,021 | cdd | 1,133.81 |
USC00286055 | 2,022 | annual_avg_temp | 54.81 |
USC00286055 | 2,022 | total_precip_in | 49.5 |
USC00286055 | 2,022 | hottest_day_temp | 97.68 |
USC00286055 | 2,022 | cdd | 1,139.65 |
Carbon Copies: Protostar Climate Challenge Submission
Negative result: no
Forecasts of yearly weather for 210 U.S. cities, 2019β2025, made as of the end of 2018 (no data that reveals 2019β2025 weather), for the Protostar Challenge: Climate Risk Intelligence.
In one line: the city's recent level plus a warming trend pooled across neighboring cities. Cooling degree days come from replaying each city's last 30 years of daily weather, warmed to that forecast. In backtests it beats the 30-year average by 11β17% on temperature and 8β17% on CDD. On precipitation, honestly, nothing we tried beat the 30-year average. A look-ahead test (code/check_leakage.py) proves the model uses no data after its forecast date.
flowchart LR
A["Challenge data, to 2018-12-31<br/>annual indices + daily Tmax/Tmin"] --> B["Validity: β€ 10 missing days<br/>(the scoring rule)"]
B --> S["Station-change correction<br/>(32 moves in 1989β2018)"]
S --> T["Avg temperature<br/>15-yr level + trend pooled<br/>over cities within 1,000 km"]
A --> D["Daily β CDD-if-warmer curves<br/>(data/cdd_shift_curves.parquet)"]
T --> C["CDD: delta method<br/>last 30 yrs of daily weather,<br/>warmed to the forecast"]
D --> C
S --> H["Hottest day: 30-yr mean<br/>+ Β½ pooled trend"]
B --> P["Precipitation: 30-yr mean"]
T --> O["submission.csv"]
C --> O
H --> O
P --> O
O --> X["outputs/: GeoJSON, wide CSV,<br/>cooling-gap cities (policy)"]
L["check_leakage.py: future scrambled<br/>β identical forecasts"] -.-> O
Team
| Name | Hugging Face username | University, Program |
|---|---|---|
| Naina Dhingra | @ndhingraa | Carnegie Mellon University |
| Other members: to be added |
Method
Model (per metric, code/forecast.py):
| Metric | Forecast |
|---|---|
annual_avg_temp |
Mean of the last 15 years + regional trend Γ years since the middle of that window |
cdd |
Delta method: take every day of the city's last 30 valid years and warm it by (temperature forecast β mean temperature of those years). Recompute each year's CDD and average |
hottest_day_temp |
30-year mean + half the regional trend |
total_precip_in |
30-year mean (nothing beat it; see below) |
- Regional trend: the slope of the 50-year anomaly series averaged over all cities within 1,000 km. One station's 30-year trend is mostly noise. Pooling neighbors keeps the regional warming signal and averages away station quirks.
- Station changes: 32 station moves fall in 1989β2018. Years recorded at an earlier station are shifted to the current station's level. The step is estimated from 10 years each side of the move, net of the national anomaly, so warming is not mistaken for a station jump.
- Validity: we drop years with more than 10 missing days, the same rule the challenge scores with.
- Why the delta method for CDD: CDD only counts warmth above 65 Β°F. A city with many days just under 65 Β°F gains a lot of CDD per degree of warming, while a city that is rarely warm gains little. A yearly trend line cannot see that; the daily record can.
code/prepare_data.pycondenses the 10-million-row daily table into a 2 MB table: each city-year's CDD if every day were s Β°F warmer, s = β3 β¦ +6 in 0.25 Β°F steps. At s = 0 it matches the officialcddcolumn exactly. - Learned models (
code/learned.py, tested, not in the final model): ridge and gradient boosting, trained across cities on past forecast origins. The target is the standardized departure from the 30-year mean. Features are recent anomalies of the city, its region and the nation, plus trends Γ lead time. Training uses only origins whose targets were fully observed (origin + 7 β€ forecast origin).
How we checked it: a rolling-origin backtest on data up to 2018 only. From each origin year we forecast the next 7 years with only earlier data and score with the challenge formula, 100 Γ mean of (1 β MAE / MAE of the 30-year average). We chose settings on origins 1997β2004 ("tune") and confirmed them on 2005β2011 ("check"). We never looked at 2019β2025 observations, and we did not use the live leaderboard to choose between models. code/check_leakage.py reruns the model from 1998, 2004 and 2011 with every later value replaced by random noise and requires identical forecasts. It also confirms that a deliberately leaky model is caught.
Final model, backtest (code/backtest_results.csv). Each metric's number is the improvement over the 30-year average; 0 = no better.
| Split | Score | Avg temp | Precip | Hottest day | CDD | MAE: temp Β°F / precip in / hottest Β°F / CDD Β°F-days |
|---|---|---|---|---|---|---|
| tune (1997β2004 origins) | 6.14 | +0.166 | 0.000 | +0.003 | +0.077 | 0.95 / 5.72 / 2.58 / 152 |
| check (2005β2011 origins) | 7.24 | +0.114 | 0.000 | +0.008 | +0.169 | 1.32 / 6.00 / 2.68 / 165 |
What we tried (python code/backtest.py compare β code/experiments.csv; same backtest):
| Model | Score tune / check | Avg temp | Precip | Hottest day | CDD |
|---|---|---|---|---|---|
| baseline: last year (score floored at 0) | 0.00 / 0.00 | -0.592 / -0.465 | -0.297 / -0.323 | -0.427 / -0.433 | -0.527 / -0.478 |
| baseline: city linear trend 30y | 1.17 / 2.00 | +0.135 / +0.070 | -0.060 / -0.061 | -0.091 / -0.061 | +0.012 / +0.107 |
| mean of last 10 years | 2.59 / 3.46 | +0.128 / +0.069 | -0.024 / -0.012 | -0.029 / -0.017 | +0.029 / +0.099 |
| mean of last 15 years | 4.12 / 2.94 | +0.143 / +0.069 | -0.005 / -0.005 | -0.017 / -0.002 | +0.043 / +0.056 |
| level15 + pooled trend (one setting) | 4.50 / 6.04 | +0.166 / +0.114 | -0.022 / -0.001 | -0.014 / +0.006 | +0.049 / +0.123 |
| level+trend, per-metric PARAMS | 5.45 / 6.12 | +0.166 / +0.114 | +0.000 / +0.000 | +0.003 / +0.008 | +0.049 / +0.123 |
| ridge, all origins since 1940 | 4.71 / 0.61 | +0.182 / -0.008 | -0.021 / -0.017 | -0.019 / -0.032 | +0.047 / +0.007 |
| ridge, last 30 origins | 4.24 / 2.24 | +0.208 / +0.051 | -0.033 / -0.021 | -0.039 / -0.013 | +0.034 / +0.073 |
| GBM, all origins since 1940 | 4.72 / 2.90 | +0.150 / +0.044 | -0.007 / -0.030 | -0.017 / -0.003 | +0.063 / +0.106 |
| GBM, last 30 origins | 5.75 / 3.98 | +0.199 / +0.084 | -0.008 / -0.039 | -0.025 / -0.021 | +0.065 / +0.135 |
| temp: trend fitted since 1975 | β (temp only) | +0.166 / +0.111 | β | β | β |
| temp: trend x1.5 (amplified) | β (temp only) | +0.103 / +0.102 | β | β | β |
| temp: Tmax and Tmin forecast separately | β (temp only) | +0.166 / +0.114 | β | β | β |
| CDD from temperature forecast | β (CDD only) | β | β | β | +0.059 / +0.139 |
| CDD: from temperature + GBM (previous final) | β (CDD only) | β | β | β | +0.070 / +0.143 |
| CDD: delta method, 15 years | β (CDD only) | β | β | β | +0.063 / +0.153 |
| CDD: delta method, 30 years | β (CDD only) | β | β | β | +0.077 / +0.169 |
FINAL (forecast.py) |
6.14 / 7.24 | +0.166 / +0.114 | +0.000 / +0.000 | +0.003 / +0.008 | +0.077 / +0.169 |
What we learned:
- Warming is the signal; everything else is noise. All of the gain is in temperature and CDD. Precipitation and the hottest day vary so much from year to year that every attempt to follow recent years or trends did worse than the 30-year mean. We kept the 30-year mean there on purpose.
- Pool trends, don't fit them per station. A per-city linear trend (a challenge baseline) is unstable. A trend pooled within 1,000 km is steadier and better in both splits.
- Learned models trained on the whole record fail on recent decades. Trained on origins since 1940, ridge and gradient boosting learned the mid-century cooling and post-1980 warming as one relationship. They score about 4.7 in the tune split but only 0.6β2.9 in the check split. Restricting training to the last 30 origins helps: gradient boosting then has the best temperature number in the tune split. Alone, though, they still lose to the simple model in the check split, which is closer to the regime we forecast. A gradient-boosting + CDD-from-temperature blend was our previous final model; the delta method beat it in both splits with no learned parameters.
- CDD is better forecast through temperature than on its own. CDD is a nonlinear function of temperature, and the temperature trend is estimated far more reliably. A per-city CDD-per-Β°F slope helped. Replaying the daily weather (delta method) helped more, and 30 years of days beat 15, because more summers sample the tail of hot days better.
- Making the trend steeper did not help. Fitting the trend only since 1975 tied our 50-year window, and forecasting Tmax and Tmin separately gave identical results. Multiplying the trend by 1.5 lowered the backtest score in both splits, so we did not do it, even though 2019β2021 were warm years.
- Caveat: we chose the 50-year trend window and the 30-year delta window partly by the check split, so the check score is slightly optimistic. The tune score is the cleaner estimate.
AI Tools and Agents
- Tools and models: Claude Code (Claude Opus 5.5), an AI coding agent, in VS Code.
- What they did: read the challenge pages, the template and other teams' public READMEs (for ideas; the delta method for CDD was used by other teams first, and we adopted it only after it won our own backtest). Downloaded the training data (2018 cutoff enforced in code), wrote the code in
code/, ran the backtests, the experiment comparison and the leakage test, and drafted this README and the data card. - What a person reviewed: To be completed by the team before the deadline.
- Agent instructions file:
code/AGENTS.md(template rules plus our team notes). Guardrails:load_panel()stops if any input is dated after 2018. Every forecast value comes fromcode/forecast.py; the agent wrote no value itself.
Policy Idea
Cooling readiness for "newly hot" cities.
- What risk did we notice? Cooling demand rises almost everywhere: CDD goes up in 209 of 210 cities, by a median of 10%, in our 2019β2025 forecast versus 1989β2018. The biggest relative jumps are not in the South. They are in the 101 cities that historically needed little cooling (under 1,000 Β°F-days), where the median rise is 13.5%, against 8.6% elsewhere. The steepest: Sault Ste. Marie +33%, Elko +28%, San Diego +26%, Duluth +25%, Bluefield +23%, Helena +22%, Vancouver WA +21%, Rochester MN +21%, Colorado Springs +21%, Lansing +21%, Reno +20%, with Seattle (+20%), Burlington VT and Worcester (+19%) close behind (
outputs/cdd_change_by_city.csv). Phoenix adds more Β°F-days, but it already has the air conditioning, building codes and heat plans to handle them. In mild-climate cities, many homes, schools and care facilities have no cooling, and residents and health systems have little heat experience. The same rise in heat does more harm there. - What would we do about it, and who would do it? A "cooling-gap" trigger. Each year, a state climate office or university (e.g., a state climatologist) reruns this open pipeline on the newest records and flags cities whose cooling demand is rising fast from a low base. Flagged cities' health departments and electric utilities then (a) add cooling (heat pumps, which also replace inefficient heating) to existing low-income weatherization and efficiency programs, prioritizing renters, older adults and people living alone; (b) require that new and renovated multifamily housing and schools can be cooled; and (c) adopt a heat-response plan with cooling centers and outreach before the first bad summer, not after.
- Why is it sustainable? It uses money and institutions that already exist (utility efficiency programs, weatherization assistance, building-code cycles) instead of a new agency. Heat pumps pay back through lower heating bills, so they make sense even in years without a heat wave. The trigger costs almost nothing to run: the code, data and model are open, run in about a minute, and update as each year's records arrive.
Feedback to the Ecosystem
- What got in the way:
- Validity rules lived in prose, not data. The "β€ 10 missing days" rule, and CDD's extra "days with both temperatures" condition, had to be rebuilt from the dataset card. Our count of unscorable city-metrics (10) differs from the challenge's (9), so one borderline rule is ambiguous.
- Station changes are flagged but not adjusted.
coverage_and_stationsmarks the 32 changes in 1989β2018, but there is no homogenized series, so every team must invent its own adjustment. - No uncertainty in the scoring. Point forecasts only. For noisy metrics like precipitation, the most useful output for planners is a range, and MAE rewards forecasting the median.
- Inconsistent edge values. The extreme columns use Β±inf for years with no data, while other columns use NaN.
- What would fix it:
- Publish a boolean
valid_<metric>column per city-year using the exact scoring rule, so training and scoring cannot drift apart. - Add a homogenized variant (e.g., NOAA's pairwise homogenization, or the offsets from Lai & Dzombak's method) alongside the raw threaded record.
- Score a quantile or interval forecast (e.g., pinball loss) as an optional track.
- Use NaN consistently, and add a machine-readable schema (units, missing-value conventions) to the dataset card.
- Ship the daily data's derived products. The daily table is 10M rows, and most teams only need per-year summaries such as our CDD-if-warmer curves (2 MB). A small "derived" subset would make the daily record usable for teams without much compute.
- For reuse: our
climate_lib.pyexposes one forecaster signature, a backtest scorer that reproduces the challenge formula, andcheck_leakage.leak_test(), which certifies any forecaster against look-ahead. Future editions could ship a shared harness like it, so teams compare models on the same backtest and organizers can verify the honor code automatically.
- Publish a boolean
Files
| File | Content |
|---|---|
submission.csv |
Our forecasts: city_id,year,metric,predicted_value |
code/ |
Scripts (see code/README.md): forecast.py (final model), climate_lib.py and learned.py (reusable library), backtest.py (experiments), check_leakage.py (look-ahead test), export.py, policy_analysis.py, prepare_data.py, check_submission.py. Results: backtest_results.csv, experiments.csv |
data/ |
The curated data our code uses; described in its data card, data/README.md |
outputs/forecasts.geojson |
One point per city with all forecasts and the change versus 1989β2018. Opens in QGIS, ArcGIS, geojson.io, kepler.gl |
outputs/forecasts_wide.csv |
One row per city and year, a column per metric, with name, latitude and longitude |
outputs/cdd_change_by_city.csv |
Forecast change in cooling demand per city (Policy Idea) |
Metric codes: annual_avg_temp (Β°F), total_precip_in (inches), hottest_day_temp (Β°F), cdd (Β°F-days).
City IDs: the station ID from the city_info table of the training dataset (e.g., Pittsburgh = USW00094823).
How to Reproduce
python -m venv .venv && source .venv/bin/activate && pip install -r code/requirements.txt(tested with Python 3.14.6)python code/forecast.pyreadsdata/, prints the backtest, and writessubmission.csvandcode/backtest_results.csv(about a minute; deterministic, no random parts).python code/check_submission.pyandpython code/check_leakage.pypython code/export.pyandpython code/policy_analysis.pywriteoutputs/.- Optional:
python code/backtest.py compare(all experiments, ~15 min);python code/prepare_data.pyre-downloadsdata/and rebuilds the CDD curves from the daily table.
Data
- External data: none. Only the challenge training data is used, for both forecasts and analysis.
- Curated data: see the data card in
data/README.md(each file, its source, license and preparation).
Training data: CMU-OSPO/protostar-climate-train-to-2018, from:
- Lai, Y., & Dzombak, D. A. (2019). Compiled historical daily temperature and precipitation data for selected 210 U.S. cities. Carnegie Mellon University. https://doi.org/10.1184/R1/7890488.v6
- Lai, Y., & Dzombak, D. A. (2019). Historical changes of annual temperature and precipitation indices at selected 210 U.S. cities. Carnegie Mellon University. https://doi.org/10.1184/R1/7961012.v6
- Lai, Y., & Dzombak, D. A. (2019). Use of historical data to assess regional climate change. Journal of Climate, 32(14), 4299β4320. https://doi.org/10.1175/JCLI-D-18-0630.1
- Downloads last month
- 103