Skip to content

Commit da664bd

Browse files
andersy005tykuklakatamartinorianac
authored
update eval notebooks to use latest data (#355)
* update eval notebooks to use latest data * update california comparison notebook * update score-bins notebook * use datasets on source coop * update notebooks * update risk buildings and rasters notebooks * update notebook * update benchmarking for v1.0.0 * Delete old version * Update filenames to fix broken references + links * Update mkdocs * Add links to supporting notebooks * Move score bin notebook out of evaluation section * Fix links * Fix typo * Add link * Fix links (hopefully last time) * Update links again * Hardcode URLs * Fix typo * Update sidebar to match order of references * adding alternate comparisons (#359) * adding alternate comparisons * removing unnecessary catalog call --------- Co-authored-by: Oriana Chegwidden <[email protected]> --------- Co-authored-by: Tyler Kukla <[email protected]> Co-authored-by: Kata Martin <[email protected]> Co-authored-by: Oriana Chegwidden <[email protected]>
1 parent 831a9cd commit da664bd

File tree

9 files changed

+978
-915
lines changed

9 files changed

+978
-915
lines changed

docs/methods/fire-risk/benchmarking-make-inputs.ipynb

Lines changed: 80 additions & 305 deletions
Large diffs are not rendered by default.

docs/methods/fire-risk/benchmarking-process-inputs.ipynb

Lines changed: 105 additions & 243 deletions
Large diffs are not rendered by default.

docs/methods/fire-risk/benchmarking.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"\n",
1111
"We focus on the present-day (the climate between 2005 and 2020) burn probability map (rather than the simulation for the future, 2040-2055 climate) and compare it to the 70+ year historical record of burn perimeters. This approach implicitly assumes that it is reasonable to use the 2011 map to evaluate a record largely within the 20th century. This assumption is tolerable because the 15 year period the present-day map is based upon is relatively comparable compared to the late 20th century.\n",
1212
"\n",
13-
"The notebook here relies on pre-processing done in the `benchmarking-process-inputs.ipynb` and `benchmarking-make-inputs.ipynb` notebooks."
13+
"The notebook here relies on pre-processing done in the [`benchmarking-process-inputs.ipynb`](/ocr/methods/fire-risk/benchmarking-process-inputs) and [`benchmarking-make-inputs.ipynb`](/ocr/methods/fire-risk/benchmarking-make-inputs) notebooks."
1414
]
1515
},
1616
{

docs/methods/fire-risk/california-comparison.ipynb

Lines changed: 574 additions & 116 deletions
Large diffs are not rendered by default.

docs/methods/fire-risk/compare-risk-buildings.ipynb

Lines changed: 62 additions & 86 deletions
Large diffs are not rendered by default.

docs/methods/fire-risk/compare-risk-rasters.ipynb

Lines changed: 100 additions & 100 deletions
Large diffs are not rendered by default.

docs/methods/fire-risk/score-bins.ipynb

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@
4141
},
4242
{
4343
"cell_type": "code",
44-
"execution_count": 2,
44+
"execution_count": 4,
4545
"id": "a6add1e2-59d4-4eb4-82b8-6caf4deb60fa",
4646
"metadata": {},
4747
"outputs": [
4848
{
4949
"data": {
5050
"application/vnd.jupyter.widget-view+json": {
51-
"model_id": "35d77b9db3784d578784351aec94aa72",
51+
"model_id": "ec40e8a5de01481b92562a417fbae526",
5252
"version_major": 2,
5353
"version_minor": 0
5454
},
@@ -63,8 +63,8 @@
6363
"name": "stdout",
6464
"output_type": "stream",
6565
"text": [
66-
"CPU times: user 3min 59s, sys: 14.3 s, total: 4min 13s\n",
67-
"Wall time: 26.1 s\n"
66+
"CPU times: user 3min 2s, sys: 11 s, total: 3min 13s\n",
67+
"Wall time: 24.4 s\n"
6868
]
6969
},
7070
{
@@ -95,57 +95,57 @@
9595
" <tbody>\n",
9696
" <tr>\n",
9797
" <th>0</th>\n",
98-
" <td>0.011663</td>\n",
99-
" <td>0.011582</td>\n",
98+
" <td>0.015620</td>\n",
99+
" <td>0.027652</td>\n",
100100
" </tr>\n",
101101
" <tr>\n",
102102
" <th>1</th>\n",
103-
" <td>0.021331</td>\n",
104-
" <td>0.011899</td>\n",
103+
" <td>0.013158</td>\n",
104+
" <td>0.009368</td>\n",
105105
" </tr>\n",
106106
" <tr>\n",
107107
" <th>2</th>\n",
108-
" <td>0.023750</td>\n",
109-
" <td>0.032104</td>\n",
108+
" <td>0.018388</td>\n",
109+
" <td>0.019828</td>\n",
110110
" </tr>\n",
111111
" <tr>\n",
112112
" <th>3</th>\n",
113-
" <td>0.035560</td>\n",
114-
" <td>0.017434</td>\n",
113+
" <td>0.020913</td>\n",
114+
" <td>0.017937</td>\n",
115115
" </tr>\n",
116116
" <tr>\n",
117117
" <th>4</th>\n",
118-
" <td>0.012157</td>\n",
119-
" <td>0.012022</td>\n",
118+
" <td>0.018183</td>\n",
119+
" <td>0.020025</td>\n",
120120
" </tr>\n",
121121
" </tbody>\n",
122122
"</table>\n",
123123
"</div>"
124124
],
125125
"text/plain": [
126126
" rps_2011 rps_2047\n",
127-
"0 0.011663 0.011582\n",
128-
"1 0.021331 0.011899\n",
129-
"2 0.023750 0.032104\n",
130-
"3 0.035560 0.017434\n",
131-
"4 0.012157 0.012022"
127+
"0 0.015620 0.027652\n",
128+
"1 0.013158 0.009368\n",
129+
"2 0.018388 0.019828\n",
130+
"3 0.020913 0.017937\n",
131+
"4 0.018183 0.020025"
132132
]
133133
},
134-
"execution_count": 2,
134+
"execution_count": 4,
135135
"metadata": {},
136136
"output_type": "execute_result"
137137
}
138138
],
139139
"source": [
140140
"%%time\n",
141141
"\n",
142-
"version = '0.13.1'\n",
142+
"version = '1.0.0'\n",
143143
"\n",
144-
"dataset_uri = f's3://carbonplan-ocr/output/fire-risk/vector/production/v{version}/geoparquet/buildings.parquet/**'\n",
144+
"dataset_uri = f's3://us-west-2.opendata.source.coop/carbonplan/carbonplan-ocr/output/fire-risk/vector/production/v{version}/geoparquet/buildings.parquet/**/data_*.parquet'\n",
145145
"\n",
146146
"df = duckdb.sql(f\"\"\"\n",
147147
"SELECT rps_2011, rps_2047\n",
148-
"FROM read_parquet('{dataset_uri}', hive_partitioning = TRUE)\n",
148+
"FROM read_parquet('{dataset_uri}')\n",
149149
"\"\"\").df()\n",
150150
"\n",
151151
"df.head()"
@@ -171,7 +171,7 @@
171171
},
172172
{
173173
"cell_type": "code",
174-
"execution_count": 3,
174+
"execution_count": 4,
175175
"id": "60370ef7-00c3-47cd-b4fe-6f6f8fe6ca92",
176176
"metadata": {},
177177
"outputs": [],
@@ -189,7 +189,7 @@
189189
},
190190
{
191191
"cell_type": "code",
192-
"execution_count": 4,
192+
"execution_count": 5,
193193
"id": "b2af0a24-d100-4da8-ad9a-96e46b4e6aa2",
194194
"metadata": {},
195195
"outputs": [],
@@ -199,7 +199,7 @@
199199
},
200200
{
201201
"cell_type": "code",
202-
"execution_count": 5,
202+
"execution_count": 6,
203203
"id": "7404a402-498c-4910-934a-2926b9e6c8f8",
204204
"metadata": {},
205205
"outputs": [],
@@ -241,7 +241,7 @@
241241
},
242242
{
243243
"cell_type": "code",
244-
"execution_count": 6,
244+
"execution_count": 8,
245245
"id": "98f0a79b-7bd9-42fd-a356-78035f9391ee",
246246
"metadata": {},
247247
"outputs": [
@@ -251,7 +251,7 @@
251251
"Text(0.5, 1.0, 'Counts of buildings in each score bin')"
252252
]
253253
},
254-
"execution_count": 6,
254+
"execution_count": 8,
255255
"metadata": {},
256256
"output_type": "execute_result"
257257
},
@@ -310,7 +310,7 @@
310310
},
311311
{
312312
"cell_type": "code",
313-
"execution_count": 8,
313+
"execution_count": 9,
314314
"id": "b8f6806a-2f10-49e8-bbfa-d3e9f194281d",
315315
"metadata": {},
316316
"outputs": [],
@@ -328,7 +328,7 @@
328328
},
329329
{
330330
"cell_type": "code",
331-
"execution_count": 9,
331+
"execution_count": 10,
332332
"id": "d136ae30-f78d-42fc-8aba-ed05ad913f83",
333333
"metadata": {},
334334
"outputs": [
@@ -348,7 +348,7 @@
348348
},
349349
{
350350
"cell_type": "code",
351-
"execution_count": 10,
351+
"execution_count": 11,
352352
"id": "9136b317-64bb-497d-bff5-fdd5ce4337e4",
353353
"metadata": {},
354354
"outputs": [],
@@ -368,7 +368,7 @@
368368
},
369369
{
370370
"cell_type": "code",
371-
"execution_count": 11,
371+
"execution_count": 12,
372372
"id": "b42c89bf-1ab0-4d35-b65d-ae801d8ef2ba",
373373
"metadata": {},
374374
"outputs": [
@@ -390,7 +390,7 @@
390390
},
391391
{
392392
"cell_type": "code",
393-
"execution_count": 12,
393+
"execution_count": 13,
394394
"id": "0707c6a5-d2a8-478b-a2a2-4217a032a5d1",
395395
"metadata": {},
396396
"outputs": [
@@ -449,7 +449,7 @@
449449
},
450450
{
451451
"cell_type": "code",
452-
"execution_count": 13,
452+
"execution_count": 14,
453453
"id": "2335ccf7-576b-4ac6-ac54-a0ef48377391",
454454
"metadata": {},
455455
"outputs": [
@@ -497,14 +497,6 @@
497497
"# plt.tight_layout()\n",
498498
"plt.show()"
499499
]
500-
},
501-
{
502-
"cell_type": "code",
503-
"execution_count": null,
504-
"id": "316530ed-7819-4cf3-af4e-ad8e12518872",
505-
"metadata": {},
506-
"outputs": [],
507-
"source": []
508500
}
509501
],
510502
"metadata": {
@@ -523,7 +515,7 @@
523515
"name": "python",
524516
"nbconvert_exporter": "python",
525517
"pygments_lexer": "ipython3",
526-
"version": "3.13.9"
518+
"version": "3.13.11"
527519
}
528520
},
529521
"nbformat": 4,

mkdocs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ nav:
4848
- Access Data: access-data.md
4949
- Terms of Data Access: terms-of-data-access.md
5050

51-
5251
- Methods:
5352
- Overview: methods/fire-risk/overview.md
5453
- Horizontal Scaling via Spatial Chunking: methods/fire-risk/horizontal-scaling-via-spatial-chunking.ipynb
54+
- Score Bins: methods/fire-risk/score-bins.ipynb
5555
- Evaluation:
5656
- Overview: methods/fire-risk/evaluation.md
57-
- Benchmarking: methods/fire-risk/benchmarking.ipynb
58-
- Benchmarking Inputs: methods/fire-risk/benchmarking-make-inputs.ipynb
59-
- Benchmarking Process Inputs: methods/fire-risk/benchmarking-process-inputs.ipynb
57+
- Benchmarking:
58+
- Burn Probability Benchmarking: methods/fire-risk/benchmarking.ipynb
59+
- Processing Inputs: methods/fire-risk/benchmarking-process-inputs.ipynb
60+
- Creating Inputs: methods/fire-risk/benchmarking-make-inputs.ipynb
6061
- California Comparison: methods/fire-risk/california-comparison.ipynb
61-
- Score Bins: methods/fire-risk/score-bins.ipynb
6262
- Comparing Risk Rasters: methods/fire-risk/compare-risk-rasters.ipynb
6363
- Comparing Risk at Buildings: methods/fire-risk/compare-risk-buildings.ipynb
6464

notebooks/benchmarking.ipynb

Lines changed: 16 additions & 16 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)