Skip to content

Commit 7c2426c

Browse files
committed
Fixes header display in doc
1 parent 6922834 commit 7c2426c

1 file changed

Lines changed: 76 additions & 46 deletions

File tree

doc/user-guide/climada_trajectories.ipynb

Lines changed: 76 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"tags": []
4141
},
4242
"source": [
43-
"## Interpolation of risk can be... risky"
43+
"### Interpolation of risk can be... risky"
4444
]
4545
},
4646
{
@@ -77,7 +77,7 @@
7777
"tags": []
7878
},
7979
"source": [
80-
"## Memory and computation requirements\n",
80+
"### Memory and computation requirements\n",
8181
"\n",
8282
"This module adds a new dimension (time) to the risk, as such, it **multiplies** the memory and computation requirement along that dimension (although we avoid running a full-fledge impact computation for each \"interpolated\" point, we still have to define an impact matrix for each of those). \n",
8383
"\n",
@@ -95,7 +95,7 @@
9595
"tags": []
9696
},
9797
"source": [
98-
"# Using the `trajectories` module"
98+
"## Using the `trajectories` module"
9999
]
100100
},
101101
{
@@ -135,7 +135,7 @@
135135
"tags": []
136136
},
137137
"source": [
138-
"## `Snapshot`: A snapshot of risk at a specific year"
138+
"### `Snapshot`: A snapshot of risk at a specific year"
139139
]
140140
},
141141
{
@@ -195,8 +195,8 @@
195195
"name": "stdout",
196196
"output_type": "stream",
197197
"text": [
198-
"2026-02-26 10:26:18,953 - climada.entity.exposures.base - INFO - Reading /home/sjuhel/climada/data/exposures/litpop/LitPop_150arcsec_HTI/v3/LitPop_150arcsec_HTI.hdf5\n",
199-
"2026-02-26 10:26:24,113 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_HTI_1980_2020/v2/tropical_cyclone_10synth_tracks_150arcsec_HTI_1980_2020.hdf5\n"
198+
"2026-02-26 10:48:49,071 - climada.entity.exposures.base - INFO - Reading /home/sjuhel/climada/data/exposures/litpop/LitPop_150arcsec_HTI/v3/LitPop_150arcsec_HTI.hdf5\n",
199+
"2026-02-26 10:48:54,125 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_HTI_1980_2020/v2/tropical_cyclone_10synth_tracks_150arcsec_HTI_1980_2020.hdf5\n"
200200
]
201201
}
202202
],
@@ -257,14 +257,14 @@
257257
"name": "stdout",
258258
"output_type": "stream",
259259
"text": [
260-
"2026-02-26 10:26:32,258 - climada.util.coordinates - INFO - Raster from resolution 0.04166665999999708 to 0.04166665999999708.\n"
260+
"2026-02-26 10:48:54,165 - climada.util.coordinates - INFO - Raster from resolution 0.04166665999999708 to 0.04166665999999708.\n"
261261
]
262262
},
263263
{
264264
"name": "stderr",
265265
"output_type": "stream",
266266
"text": [
267-
"/home/sjuhel/Repos/climada_python/climada/util/coordinates.py:3130: FutureWarning: The `drop` keyword argument is deprecated and in future the only supported behaviour will match drop=False. To silence this warning and adopt the future behaviour, stop providing `drop` as a keyword to `set_geometry`. To replicate the `drop=True` behaviour you should update your code to\n",
267+
"/home/sjuhel/Repos/climada_python/climada/util/coordinates.py:3134: FutureWarning: The `drop` keyword argument is deprecated and in future the only supported behaviour will match drop=False. To silence this warning and adopt the future behaviour, stop providing `drop` as a keyword to `set_geometry`. To replicate the `drop=True` behaviour you should update your code to\n",
268268
"`geo_col_name = gdf.active_geometry_name; gdf.set_geometry(new_geo_col).drop(columns=geo_col_name).rename_geometry(geo_col_name)`.\n",
269269
" df_poly.set_geometry(\n"
270270
]
@@ -327,7 +327,7 @@
327327
"tags": []
328328
},
329329
"source": [
330-
"## Evaluating risk from multiple snapshots using trajectories"
330+
"### Evaluating risk from multiple snapshots using trajectories"
331331
]
332332
},
333333
{
@@ -366,7 +366,7 @@
366366
"name": "stdout",
367367
"output_type": "stream",
368368
"text": [
369-
"2026-02-26 10:26:45,358 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2040/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2040.hdf5\n"
369+
"2026-02-26 10:49:01,309 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2040/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2040.hdf5\n"
370370
]
371371
}
372372
],
@@ -402,7 +402,7 @@
402402
" exposure=exp_future, hazard=haz_future, impfset=impf_set, date=str(future_year)\n",
403403
")\n",
404404
"\n",
405-
"# Now we can define a list of two snapshots, present and future:\n",
405+
"### Now we can define a list of two snapshots, present and future:\n",
406406
"snapcol = [snap1, snap2]"
407407
]
408408
},
@@ -486,7 +486,7 @@
486486
"tags": []
487487
},
488488
"source": [
489-
"### Tidy format\n",
489+
"#### Tidy format\n",
490490
"\n",
491491
"We use the \"tidy\" format to output most of the results.\n",
492492
"\n",
@@ -526,7 +526,7 @@
526526
"tags": []
527527
},
528528
"source": [
529-
"### Static and Interpolated trajectories"
529+
"#### Static and Interpolated trajectories"
530530
]
531531
},
532532
{
@@ -559,7 +559,7 @@
559559
"name": "stdout",
560560
"output_type": "stream",
561561
"text": [
562-
"2026-02-26 10:26:48,575 - climada.trajectories.calc_risk_metrics - WARNING - No group id defined in the Exposures object. Per group aai will be empty.\n"
562+
"2026-02-26 10:49:01,429 - climada.trajectories.calc_risk_metrics - WARNING - No group id defined in the Exposures object. Per group aai will be empty.\n"
563563
]
564564
},
565565
{
@@ -730,7 +730,7 @@
730730
"name": "stdout",
731731
"output_type": "stream",
732732
"text": [
733-
"2026-02-26 10:26:50,530 - climada.trajectories.calc_risk_metrics - WARNING - No group id defined in at least one of the Exposures object. Per group aai will be empty.\n"
733+
"2026-02-26 10:49:01,923 - climada.trajectories.calc_risk_metrics - WARNING - No group id defined in at least one of the Exposures object. Per group aai will be empty.\n"
734734
]
735735
},
736736
{
@@ -850,7 +850,7 @@
850850
"name": "stdout",
851851
"output_type": "stream",
852852
"text": [
853-
"2026-02-26 10:26:51,731 - climada.trajectories.calc_risk_metrics - WARNING - No group id defined in at least one of the Exposures object. Per group aai will be empty.\n"
853+
"2026-02-26 10:49:01,941 - climada.trajectories.calc_risk_metrics - WARNING - No group id defined in at least one of the Exposures object. Per group aai will be empty.\n"
854854
]
855855
},
856856
{
@@ -1133,7 +1133,7 @@
11331133
"tags": []
11341134
},
11351135
"source": [
1136-
"### DiscRates"
1136+
"#### DiscRates"
11371137
]
11381138
},
11391139
{
@@ -1247,7 +1247,7 @@
12471247
"tags": []
12481248
},
12491249
"source": [
1250-
"# Advanced usage\n",
1250+
"## Advanced usage\n",
12511251
"\n",
12521252
"In this section we present some more advanced features and use of this module."
12531253
]
@@ -1263,7 +1263,7 @@
12631263
"tags": []
12641264
},
12651265
"source": [
1266-
"## Exposure sub groups"
1266+
"### Exposure sub groups"
12671267
]
12681268
},
12691269
{
@@ -1545,7 +1545,7 @@
15451545
"tags": []
15461546
},
15471547
"source": [
1548-
"## Results caching"
1548+
"### Results caching"
15491549
]
15501550
},
15511551
{
@@ -1579,7 +1579,7 @@
15791579
"tags": []
15801580
},
15811581
"source": [
1582-
"## Higher number of snapshots"
1582+
"### Higher number of snapshots"
15831583
]
15841584
},
15851585
{
@@ -1616,11 +1616,11 @@
16161616
"name": "stdout",
16171617
"output_type": "stream",
16181618
"text": [
1619-
"2026-02-26 10:27:03,971 - climada.entity.exposures.base - INFO - Reading /home/sjuhel/climada/data/exposures/litpop/LitPop_150arcsec_HTI/v3/LitPop_150arcsec_HTI.hdf5\n",
1620-
"2026-02-26 10:27:09,060 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_HTI_1980_2020/v2/tropical_cyclone_10synth_tracks_150arcsec_HTI_1980_2020.hdf5\n",
1621-
"2026-02-26 10:27:14,238 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2040/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2040.hdf5\n",
1622-
"2026-02-26 10:27:19,335 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2060/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2060.hdf5\n",
1623-
"2026-02-26 10:27:24,547 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2080/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2080.hdf5\n"
1619+
"2026-02-26 10:49:04,288 - climada.entity.exposures.base - INFO - Reading /home/sjuhel/climada/data/exposures/litpop/LitPop_150arcsec_HTI/v3/LitPop_150arcsec_HTI.hdf5\n",
1620+
"2026-02-26 10:49:09,406 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_HTI_1980_2020/v2/tropical_cyclone_10synth_tracks_150arcsec_HTI_1980_2020.hdf5\n",
1621+
"2026-02-26 10:49:14,468 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2040/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2040.hdf5\n",
1622+
"2026-02-26 10:49:19,501 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2060/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2060.hdf5\n",
1623+
"2026-02-26 10:49:24,689 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2080/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2080.hdf5\n"
16241624
]
16251625
}
16261626
],
@@ -1802,7 +1802,7 @@
18021802
"tags": []
18031803
},
18041804
"source": [
1805-
"## Non-default return periods"
1805+
"### Non-default return periods"
18061806
]
18071807
},
18081808
{
@@ -2163,7 +2163,7 @@
21632163
"tags": []
21642164
},
21652165
"source": [
2166-
"## Non-yearly date index"
2166+
"### Non-yearly date index"
21672167
]
21682168
},
21692169
{
@@ -2472,12 +2472,12 @@
24722472
}
24732473
],
24742474
"source": [
2475-
"# snapcol = [snap, snap2]\n",
2475+
"## snapcol = [snap, snap2]\n",
24762476
"\n",
2477-
"# Here we use \"1MS\" to get a monthly basis\n",
2477+
"## Here we use \"1MS\" to get a monthly basis\n",
24782478
"risk_traj.time_resolution = \"1M\"\n",
24792479
"\n",
2480-
"# We would have to divide results by 12 to get \"average monthly impacts\"\n",
2480+
"## We would have to divide results by 12 to get \"average monthly impacts\"\n",
24812481
"risk_traj.per_date_risk_metrics()"
24822482
]
24832483
},
@@ -2492,7 +2492,7 @@
24922492
"tags": []
24932493
},
24942494
"source": [
2495-
"## Non-linear interpolation"
2495+
"### Non-linear interpolation"
24962496
]
24972497
},
24982498
{
@@ -2530,7 +2530,7 @@
25302530
"name": "stdout",
25312531
"output_type": "stream",
25322532
"text": [
2533-
"2026-02-26 10:27:39,361 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2080/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2080.hdf5\n"
2533+
"2026-02-26 10:49:36,137 - climada.hazard.io - INFO - Reading /home/sjuhel/climada/data/hazard/tropical_cyclone/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2080/v2/tropical_cyclone_10synth_tracks_150arcsec_rcp60_HTI_2080.hdf5\n"
25342534
]
25352535
},
25362536
{
@@ -2613,7 +2613,7 @@
26132613
"tags": []
26142614
},
26152615
"source": [
2616-
"## Spatial mapping"
2616+
"### Spatial mapping"
26172617
]
26182618
},
26192619
{
@@ -2887,13 +2887,19 @@
28872887
"tags": []
28882888
},
28892889
"source": [
2890-
"## Custom Impact Computation strategy"
2890+
"### Custom Impact Computation strategy"
28912891
]
28922892
},
28932893
{
28942894
"cell_type": "markdown",
28952895
"id": "825b9b95-3343-4250-8e1c-e89120359482",
2896-
"metadata": {},
2896+
"metadata": {
2897+
"editable": true,
2898+
"slideshow": {
2899+
"slide_type": ""
2900+
},
2901+
"tags": []
2902+
},
28972903
"source": [
28982904
"By default, trajectory objects use `ImpactCalc().impact()` to compute the `Impact` object and the resulting metric, but you can customize this behaviour via the `impact_computation_strategy` argument.\n",
28992905
"\n",
@@ -2906,7 +2912,13 @@
29062912
"cell_type": "code",
29072913
"execution_count": 26,
29082914
"id": "f3b8d931-e4e5-40bf-b702-31183c6c7ec3",
2909-
"metadata": {},
2915+
"metadata": {
2916+
"editable": true,
2917+
"slideshow": {
2918+
"slide_type": ""
2919+
},
2920+
"tags": []
2921+
},
29102922
"outputs": [],
29112923
"source": [
29122924
"from climada.trajectories.impact_calc_strat import ImpactComputationStrategy\n",
@@ -2927,7 +2939,13 @@
29272939
{
29282940
"cell_type": "markdown",
29292941
"id": "998fa84d-12e7-4e18-aa96-41ca4bac3ed7",
2930-
"metadata": {},
2942+
"metadata": {
2943+
"editable": true,
2944+
"slideshow": {
2945+
"slide_type": ""
2946+
},
2947+
"tags": []
2948+
},
29312949
"source": [
29322950
"Note that you now have to assign the centroids before running the computations or else they will fail:"
29332951
]
@@ -2936,17 +2954,23 @@
29362954
"cell_type": "code",
29372955
"execution_count": 27,
29382956
"id": "8d8d3b88-2c17-471e-acc3-afd8391a469d",
2939-
"metadata": {},
2957+
"metadata": {
2958+
"editable": true,
2959+
"slideshow": {
2960+
"slide_type": ""
2961+
},
2962+
"tags": []
2963+
},
29402964
"outputs": [
29412965
{
29422966
"name": "stdout",
29432967
"output_type": "stream",
29442968
"text": [
2945-
"2026-02-26 10:27:43,864 - climada.entity.exposures.base - INFO - Reading /home/sjuhel/climada/data/exposures/litpop/LitPop_150arcsec_HTI/v3/LitPop_150arcsec_HTI.hdf5\n",
2946-
"2026-02-26 10:27:43,880 - climada.entity.exposures.base - INFO - Matching 1329 exposures with 1332 centroids.\n",
2947-
"2026-02-26 10:27:43,883 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 0.08333333333331439 degree\n",
2948-
"2026-02-26 10:27:43,886 - climada.entity.exposures.base - INFO - Matching 1329 exposures with 1332 centroids.\n",
2949-
"2026-02-26 10:27:43,889 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 0.08333333333331439 degree\n"
2969+
"2026-02-26 10:49:39,233 - climada.entity.exposures.base - INFO - Reading /home/sjuhel/climada/data/exposures/litpop/LitPop_150arcsec_HTI/v3/LitPop_150arcsec_HTI.hdf5\n",
2970+
"2026-02-26 10:49:39,258 - climada.entity.exposures.base - INFO - Matching 1329 exposures with 1332 centroids.\n",
2971+
"2026-02-26 10:49:39,261 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 0.08333333333331439 degree\n",
2972+
"2026-02-26 10:49:39,264 - climada.entity.exposures.base - INFO - Matching 1329 exposures with 1332 centroids.\n",
2973+
"2026-02-26 10:49:39,267 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 0.08333333333331439 degree\n"
29502974
]
29512975
}
29522976
],
@@ -2978,13 +3002,19 @@
29783002
"cell_type": "code",
29793003
"execution_count": 28,
29803004
"id": "a94d99b5-2c7b-418e-88e9-a9dff39ab21e",
2981-
"metadata": {},
3005+
"metadata": {
3006+
"editable": true,
3007+
"slideshow": {
3008+
"slide_type": ""
3009+
},
3010+
"tags": []
3011+
},
29823012
"outputs": [
29833013
{
29843014
"name": "stdout",
29853015
"output_type": "stream",
29863016
"text": [
2987-
"2026-02-26 10:27:43,942 - climada.trajectories.calc_risk_metrics - WARNING - No group id defined in the Exposures object. Per group aai will be empty.\n"
3017+
"2026-02-26 10:49:39,321 - climada.trajectories.calc_risk_metrics - WARNING - No group id defined in the Exposures object. Per group aai will be empty.\n"
29883018
]
29893019
},
29903020
{

0 commit comments

Comments
 (0)