Skip to content

Commit 18881ab

Browse files
committed
Initial code and processed data release
0 parents  commit 18881ab

113 files changed

Lines changed: 113940 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
__pycache__/
3+
*.pyc
4+
.ipynb_checkpoints/
5+
outputs/
6+
*.log
7+

DATA_AVAILABILITY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Data availability
2+
3+
This repository contains processed source tables sufficient to reproduce the display items, source tables, and key numerical results.
4+
5+
Large upstream files are not included because they are unnecessary for figure/table reproduction and exceed practical GitHub repository limits. Excluded files include raw Google Earth Engine exports, ERA5/ERA5-Land downloads and full city-by-interval remote-sensing panels.
6+
7+
The upstream datasets are publicly available from their original providers, including global urban metadata, MODIS land-surface temperature/vegetation products, ERA5 and ERA5-Land meteorological products, TerraClimate hydroclimatic products, anthropogenic-heat products, and urban-form datasets.
8+
9+
The processed files in `data/processed/extended_outputs_local/` are the source data for the display items. The `data/source_tables/` directory contains source tables as CSV files.

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2026
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Urban green-refuge reliability during dry hot nights
2+
3+
This repository is a curated reproducibility package for a *Nature Cities* submission. It contains processed source data and scripts needed to regenerate the display items, source tables, and key reported numerical results from processed data.
4+
5+
## What is included
6+
7+
- `data/processed/metadata/`: compact city metadata and retained-panel summaries used by the plotting scripts.
8+
- `data/processed/extended_outputs_local/`: processed analysis summaries used as source data for figures, tables, and key results.
9+
- `data/source_tables/`: source tables as CSV files.
10+
- `scripts/`: scripts that regenerate display items, source tables, and a key-results check from the processed data.
11+
12+
## What is not included
13+
14+
Raw satellite/climate products and large upstream intermediate panels are not included. These include Google Earth Engine exports, ERA5/ERA5-Land extraction products, full MODIS/urban panel files, and multi-GB analysis panels.
15+
16+
The excluded upstream products come from public or third-party data providers and may be obtained from their original sources under the corresponding licenses.
17+
18+
## Reproduce the figures and tables
19+
20+
Create a Python environment using either `requirements.txt` or `environment.yml`, then run:
21+
22+
```bash
23+
python scripts/make_main_and_selected_supplementary_figures.py
24+
python scripts/make_figure_5_reliability_pathway.py
25+
python scripts/make_supplementary_figures_s1_s2.py
26+
python scripts/make_supplementary_figure_s7_robustness.py
27+
python scripts/export_supplementary_tables.py
28+
python scripts/validate_key_results.py
29+
```
30+
31+
Generated files are written to:
32+
33+
- `outputs/figures/main/`
34+
- `outputs/figures/supplementary/`
35+
- `outputs/tables/`
36+
37+
## Script-to-output map
38+
39+
- `make_main_and_selected_supplementary_figures.py`: display items generated from the processed analysis summaries.
40+
- `make_figure_5_reliability_pathway.py`: main Figure 5 from the reliability-pathway source tables.
41+
- `make_supplementary_figures_s1_s2.py`: supplementary figures.
42+
- `make_supplementary_figure_s7_robustness.py`: robustness-check supplementary figure.
43+
- `export_supplementary_tables.py`: source tables as Markdown tables.
44+
- `validate_key_results.py`: prints key numerical findings from processed source tables.
45+
46+
## Notes for review and reuse
47+
48+
Population quantities are represented-panel burdens, not global population-at-risk estimates. Counterfactual pathway summaries are association-based standardizations under fitted models and are not intervention simulations.

data/processed/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Processed data
2+
3+
This directory contains compact processed source files used to reproduce display items and reported numerical results.
4+
5+
- `metadata/` contains retained-city metadata and compact state summaries.
6+
- `extended_outputs_local/` contains analysis-ready summary tables and the compact reliability-pathway model panel.
7+
- `file_manifest_sha256.csv` records file sizes and SHA-256 hashes for copied files.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
year,mean_frac_compound_night,p90_frac_compound_night,max_frac_compound_night,null_mean_mean,null_q025_mean,null_q975_mean,null_mean_p90,null_q025_p90,null_q975_p90,null_mean_max,null_q025_max,null_q975_max
2+
2003,0.048075565248772226,0.09166365932876218,0.12955611692529773,0.04807556524877222,0.048075565248772205,0.04807556524877223,0.05295488993143269,0.05160591844099603,0.05449296282930351,0.05702706604114038,0.05377120173222663,0.06134969325153374
3+
2004,0.03404045000235357,0.05900396968603393,0.09166365932876218,0.03404045000235357,0.03404045000235356,0.034040450002353576,0.03823276795380729,0.03699025622518946,0.039696860339227716,0.04174160952724648,0.03897509924215085,0.045299530855286894
4+
2005,0.03752373181868106,0.05990617105738001,0.09310718152291592,0.037523731818681065,0.03752373181868105,0.037523731818681065,0.041849873691808016,0.0405990617105738,0.04321995669433417,0.04540887766149405,0.04275532298809094,0.049079754601226995
5+
2006,0.052515965041658175,0.08173944424395524,0.13208228076506676,0.05251596504165817,0.052515965041658154,0.05251596504165818,0.0575990617105738,0.05611692529772645,0.05936485023457236,0.061732226632984485,0.05863406712378203,0.06604114038253338
6+
2007,0.049009147537382516,0.09581378563695417,0.147239263803681,0.049009147537382516,0.04900914753738251,0.04900914753738252,0.05393468062071455,0.052508119812342116,0.0555756044749188,0.05807434139299892,0.05485384337784194,0.06279321544568747
7+
2008,0.031286774512419,0.055395164200649584,0.11187297004691447,0.031286774512419,0.03128677451241899,0.031286774512419006,0.03532443161313605,0.03428365211115121,0.03662937567665103,0.0387051605918441,0.03608805485384338,0.04222302417899675
8+
2009,0.05021731285205466,0.0866113316492241,0.14002165283291232,0.05021731285205467,0.050217312852054656,0.050217312852054684,0.055177192349332375,0.05377120173222663,0.056658246120534106,0.05932154456874775,0.05629736557199567,0.06351497654276435
9+
2010,0.043172296926239154,0.08733309274630097,0.12666907253699025,0.043172296926239154,0.04317229692623915,0.04317229692623916,0.04783219054492963,0.04645885961746662,0.04944063514976543,0.051610970768675574,0.049079754601226995,0.05593648502345724
10+
2011,0.051268573580405756,0.11674485745218333,0.16961385781306387,0.051268573580405756,0.051268573580405735,0.05126857358040576,0.0562713821725009,0.05485384337784194,0.058101768314687836,0.06046264886322627,0.05738000721761097,0.06531937928545652
11+
2012,0.051245037892457594,0.09022013713460844,0.11151208949837604,0.051245037892457594,0.05124503789245758,0.05124503789245761,0.05626308191988452,0.05485384337784194,0.05792132804041862,0.06038614218693612,0.05738000721761097,0.06423673763984121
12+
2013,0.04437261701159525,0.08282208588957055,0.12197762540599062,0.04437261701159525,0.044372617011595235,0.044372617011595256,0.04908877661494046,0.04763623240707326,0.05088415734391916,0.05308913749548899,0.050162396246842295,0.05738000721761097
13+
2014,0.05524610484364458,0.10285095633345362,0.1667268134247564,0.05524610484364458,0.05524610484364456,0.055246104843644596,0.06046373150487189,0.059184409960303136,0.062251894622879826,0.06495561169252977,0.06207145434861061,0.06947852760736195
14+
2015,0.06429949947436964,0.1037531577047997,0.14254781667268135,0.06429949947436964,0.06429949947436962,0.06429949947436965,0.06983976903644894,0.06820642367376398,0.0716347888848791,0.0743774810537712,0.07109346806207145,0.079032840129917
15+
2016,0.05230414385012474,0.09274630097437749,0.17466618549260196,0.05230414385012474,0.052304143850124725,0.05230414385012475,0.0572854565138939,0.05575604474918802,0.05918440996030314,0.06157632623601588,0.058462648863226274,0.06640202093107181
16+
2017,0.0431644516969231,0.06333453626849513,0.1100685673042223,0.0431644516969231,0.04316445169692309,0.04316445169692311,0.04784482136412847,0.04645885961746662,0.049535366293756766,0.05162684951281126,0.04871887405268856,0.0555756044749188
17+
2018,0.07070905182558486,0.128112594731144,0.19812342114760015,0.07070905182558486,0.07070905182558485,0.07070905182558487,0.0765568386863948,0.07470227354745579,0.07885239985564779,0.0813446409238542,0.07758931793576326,0.08588957055214724
18+
2019,0.08905119796651656,0.14236737639841213,0.1858534824972934,0.08905119796651656,0.08905119796651655,0.08905119796651659,0.09542150848069289,0.09364850234572356,0.09771291952363767,0.10069144713099963,0.09671598700830025,0.10609888127029952
19+
2020,0.07456105941976685,0.13623240707325873,0.16311800793937206,0.07456105941976685,0.07456105941976683,0.07456105941976686,0.08042367376398413,0.07885239985564779,0.0822807650667629,0.08552363767592927,0.08155900396968603,0.09113136051966798
20+
2021,0.053677058980434,0.08282208588957055,0.1014074341392999,0.053677058980434,0.05367705898043398,0.05367705898043401,0.05873294839408156,0.05738000721761097,0.06044749188018766,0.06303211836881992,0.059906171057380005,0.06784554312522555
21+
2022,0.08818822274175074,0.168892096715987,0.24215084806928908,0.08818822274175074,0.08818822274175073,0.08818822274175075,0.09466654637315049,0.09274630097437749,0.09689642728256948,0.09990400577408877,0.09599422591122339,0.10592746300974376
22+
2023,0.09111449327663848,0.1537351136773728,0.21328040418621436,0.09111449327663848,0.09111449327663845,0.0911144932766385,0.09767592926741249,0.09581378563695417,0.10005864308913749,0.10299747383616023,0.09888127029953085,0.10881450739805124
23+
2024,0.09174211162192271,0.15391555395164203,0.2085889570552147,0.09174211162192271,0.0917421116219227,0.09174211162192272,0.09810790328401299,0.09626037531577047,0.10032479249368459,0.1032356549981956,0.09941356910862505,0.10826416456153014
24+
2025,0.10095241083896882,0.1697942980873331,0.21616744857452183,0.10095241083896882,0.10095241083896879,0.10095241083896886,0.10788235294117646,0.10582370985203897,0.11060988812702996,0.1134319740166005,0.10915734391916275,0.11964092385420425
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
metric,obs_slope,null_mean_slope,null_q025_slope,null_q975_slope,empirical_p_one_sided,n_null
2+
mean_frac_compound_night,0.002490837051238075,0.002490837051238074,0.002490837051238074,0.0024908370512380755,0.5748502994011976,500
3+
p90_frac_compound_night,0.0040039197618472345,0.002588683185391245,0.002533286951386599,0.002642246488546595,0.001996007984031936,500
4+
max_frac_compound_night,0.004499952215421305,0.0026656391793604007,0.0025504929656820327,0.002800577480197841,0.001996007984031936,500
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
year,mean_frac_dhd,mean_frac_extreme_dhd,mean_frac_hot_night,mean_frac_compound_night,p90_frac_compound_night,max_frac_compound_night
2+
2003,0.09433888252553622,0.04125806097312224,0.36325765302119783,0.048075565248772226,0.09166365932876218,0.12955611692529773
3+
2004,0.07750302041328667,0.03151428616258453,0.35943702634428004,0.03404045000235357,0.05900396968603393,0.09166365932876218
4+
2005,0.0741687979539642,0.029733419107840525,0.3719501671033844,0.03752373181868106,0.05990617105738001,0.09310718152291592
5+
2006,0.0890433527372005,0.036856887326816565,0.4200335775814727,0.052515965041658175,0.08173944424395524,0.13208228076506676
6+
2007,0.09003185163102317,0.038221957227809765,0.4114352062510787,0.049009147537382516,0.09581378563695417,0.147239263803681
7+
2008,0.06229112076946009,0.021142893006762586,0.3684433495991088,0.031286774512419,0.055395164200649584,0.11187297004691447
8+
2009,0.09586085701285048,0.040348014372460106,0.3990868153076114,0.05021731285205466,0.0866113316492241,0.14002165283291232
9+
2010,0.07117976558454804,0.030565013415342127,0.40138546749721493,0.043172296926239154,0.08733309274630097,0.12666907253699025
10+
2011,0.09648847535813472,0.04631823388197637,0.37741044670735724,0.051268573580405756,0.11674485745218333,0.16961385781306387
11+
2012,0.09120079079911506,0.04060690693988985,0.3866050554657713,0.051245037892457594,0.09022013713460844,0.11151208949837604
12+
2013,0.07704015188363955,0.031412298181475846,0.4267098677294337,0.04437261701159525,0.08282208588957055,0.12197762540599062
13+
2014,0.08790579448637283,0.0392496822682127,0.4633549338647169,0.05524610484364458,0.10285095633345362,0.1667268134247564
14+
2015,0.09843409222851583,0.04235639307736965,0.4939356377386911,0.06429949947436964,0.1037531577047997,0.14254781667268135
15+
2016,0.07778544866866458,0.03324808184143222,0.5173928733936893,0.05230414385012474,0.09274630097437749,0.17466618549260196
16+
2017,0.0684025544066653,0.02549699527717195,0.50029811871401,0.0431644516969231,0.06333453626849513,0.1100685673042223
17+
2018,0.11300268306842609,0.05006040826573361,0.4967520750631541,0.07070905182558486,0.128112594731144,0.19812342114760015
18+
2019,0.13553418166413003,0.06305995324243327,0.5427721902311204,0.08905119796651656,0.14236737639841213,0.1858534824972934
19+
2020,0.11161407747948472,0.051025371471608114,0.5333814507398051,0.07456105941976685,0.13623240707325873,0.16311800793937206
20+
2021,0.0832300378140053,0.03377371220560777,0.5023143426482356,0.053677058980434,0.08282208588957055,0.1014074341392999
21+
2022,0.1256413474965873,0.05976495692969106,0.5439882007751087,0.08818822274175074,0.168892096715987,0.24215084806928908
22+
2023,0.11921610468673999,0.05580311612508434,0.6331021605761536,0.09111449327663848,0.1537351136773728,0.21328040418621436
23+
2024,0.11187297004691447,0.053512309164796885,0.6867635290979556,0.09174211162192271,0.15391555395164203,0.2085889570552147
24+
2025,0.1258767043760689,0.06091036040983478,0.6858377920386612,0.10095241083896882,0.1697942980873331,0.21616744857452183
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
year,mean_frac_dhd,mean_frac_extreme_dhd,mean_frac_hot_night,mean_frac_compound_night,p90_frac_compound_night,max_frac_compound_night,n_sync_p90,n_sync_p95
2+
2003,0.09433888252553622,0.04125806097312224,0.36325765302119783,0.048075565248772226,0.09166365932876218,0.12955611692529773,2,0
3+
2004,0.07750302041328667,0.03151428616258453,0.35943702634428004,0.03404045000235357,0.05900396968603393,0.09166365932876218,0,0
4+
2005,0.0741687979539642,0.029733419107840525,0.3719501671033844,0.03752373181868106,0.05990617105738001,0.09310718152291592,0,0
5+
2006,0.0890433527372005,0.036856887326816565,0.4200335775814727,0.052515965041658175,0.08173944424395524,0.13208228076506676,3,0
6+
2007,0.09003185163102317,0.038221957227809765,0.4114352062510787,0.049009147537382516,0.09581378563695417,0.147239263803681,3,1
7+
2008,0.06229112076946009,0.021142893006762586,0.3684433495991088,0.031286774512419,0.055395164200649584,0.11187297004691447,0,0
8+
2009,0.09586085701285048,0.040348014372460106,0.3990868153076114,0.05021731285205466,0.0866113316492241,0.14002165283291232,2,0
9+
2010,0.07117976558454804,0.030565013415342127,0.40138546749721493,0.043172296926239154,0.08733309274630097,0.12666907253699025,2,0
10+
2011,0.09648847535813472,0.04631823388197637,0.37741044670735724,0.051268573580405756,0.11674485745218333,0.16961385781306387,6,3
11+
2012,0.09120079079911506,0.04060690693988985,0.3866050554657713,0.051245037892457594,0.09022013713460844,0.11151208949837604,0,0
12+
2013,0.07704015188363955,0.031412298181475846,0.4267098677294337,0.04437261701159525,0.08282208588957055,0.12197762540599062,2,0
13+
2014,0.08790579448637283,0.0392496822682127,0.4633549338647169,0.05524610484364458,0.10285095633345362,0.1667268134247564,4,2
14+
2015,0.09843409222851583,0.04235639307736965,0.4939356377386911,0.06429949947436964,0.1037531577047997,0.14254781667268135,4,2
15+
2016,0.07778544866866458,0.03324808184143222,0.5173928733936893,0.05230414385012474,0.09274630097437749,0.17466618549260196,2,1
16+
2017,0.0684025544066653,0.02549699527717195,0.50029811871401,0.0431644516969231,0.06333453626849513,0.1100685673042223,0,0
17+
2018,0.11300268306842609,0.05006040826573361,0.4967520750631541,0.07070905182558486,0.128112594731144,0.19812342114760015,5,5
18+
2019,0.13553418166413003,0.06305995324243327,0.5427721902311204,0.08905119796651656,0.14236737639841213,0.1858534824972934,11,6
19+
2020,0.11161407747948472,0.051025371471608114,0.5333814507398051,0.07456105941976685,0.13623240707325873,0.16311800793937206,10,4
20+
2021,0.0832300378140053,0.03377371220560777,0.5023143426482356,0.053677058980434,0.08282208588957055,0.1014074341392999,0,0
21+
2022,0.1256413474965873,0.05976495692969106,0.5439882007751087,0.08818822274175074,0.168892096715987,0.24215084806928908,11,10
22+
2023,0.11921610468673999,0.05580311612508434,0.6331021605761536,0.09111449327663848,0.1537351136773728,0.21328040418621436,13,5
23+
2024,0.11187297004691447,0.053512309164796885,0.6867635290979556,0.09174211162192271,0.15391555395164203,0.2085889570552147,11,7
24+
2025,0.1258767043760689,0.06091036040983478,0.6858377920386612,0.10095241083896882,0.1697942980873331,0.21616744857452183,15,9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
left_out_region,coef_year,p_year,r2
2+
Australia and New Zealand,0.00251700810450525,8.684712312710872e-07,0.6919053724899613
3+
Central and Southern Asia,0.0029096897539891784,1.366887605923178e-06,0.6785685841340889
4+
Northern America,0.0027015271030006657,1.5064317327560322e-06,0.6756379895463818
5+
Europe,0.002404256928377392,1.5297309440207372e-06,0.6751729100357029
6+
Northern Africa and Western Asia,0.002387479692895918,1.7042051569266934e-06,0.6718817052309131
7+
Sub-Saharan Africa,0.002500751973312887,2.7019686267012065e-06,0.6574702714868517
8+
Eastern and South-Eastern Asia,0.002387389967730159,7.060055090857045e-06,0.6254424498944491
9+
Latin America and the Caribbean,0.002104976125315515,1.8009322848368163e-05,0.5914524644089207

0 commit comments

Comments
 (0)