Skip to content

Commit c7f76c6

Browse files
committed
Title level fixing and 10min to clim back in userguide
1 parent f934609 commit c7f76c6

9 files changed

+54
-56
lines changed

doc/user-guide/1_main_climada.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@
12351235
"metadata": {
12361236
"hide_input": false,
12371237
"kernelspec": {
1238-
"display_name": "climada_env",
1238+
"display_name": "Python 3 (ipykernel)",
12391239
"language": "python",
12401240
"name": "python3"
12411241
},
@@ -1249,7 +1249,7 @@
12491249
"name": "python",
12501250
"nbconvert_exporter": "python",
12511251
"pygments_lexer": "ipython3",
1252-
"version": "3.8.15"
1252+
"version": "3.12.6"
12531253
},
12541254
"vscode": {
12551255
"interpreter": {

doc/user-guide/climada_engine_Impact.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"#### Goal of this tutorial"
14+
"## Goal of this tutorial"
1515
]
1616
},
1717
{
@@ -30,7 +30,7 @@
3030
"cell_type": "markdown",
3131
"metadata": {},
3232
"source": [
33-
"#### What is an Impact?"
33+
"## What is an Impact?"
3434
]
3535
},
3636
{
@@ -44,7 +44,7 @@
4444
"cell_type": "markdown",
4545
"metadata": {},
4646
"source": [
47-
"#### Impact class data structure"
47+
"## Impact class data structure"
4848
]
4949
},
5050
{
@@ -97,7 +97,7 @@
9797
"cell_type": "markdown",
9898
"metadata": {},
9999
"source": [
100-
"#### How do I compute an impact in CLIMADA?"
100+
"### How do I compute an impact in CLIMADA?"
101101
]
102102
},
103103
{
@@ -2039,7 +2039,7 @@
20392039
"name": "python",
20402040
"nbconvert_exporter": "python",
20412041
"pygments_lexer": "ipython3",
2042-
"version": "3.8.13"
2042+
"version": "3.12.6"
20432043
},
20442044
"latex_envs": {
20452045
"LaTeX_envs_menu_present": true,

doc/user-guide/climada_engine_impact_data.ipynb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"metadata": {},
6363
"source": [
6464
"### clean_emdat_df()\n",
65+
"\n",
6566
"read CSV from EM-DAT into a DataFrame and clean up.\n",
6667
"\n",
6768
"Use the parameters countries, hazard, and year_range to filter. These parameters are the same for most functions shown here."
@@ -184,19 +185,19 @@
184185
"### emdat_to_impact()\n",
185186
"function to load EM-DAT impact data and return impact set with impact per event\n",
186187
"\n",
187-
"##### Parameters:\n",
188+
"#### Parameters:\n",
188189
"- emdat_file_csv (str): Full path to EMDAT-file (CSV)\n",
189190
"- hazard_type_climada (str): Hazard type abbreviation used in CLIMADA, e.g. 'TC'\n",
190191
"\n",
191-
"##### Optional parameters:\n",
192+
"#### Optional parameters:\n",
192193
"\n",
193194
"- hazard_type_emdat (list or str): List of Disaster (sub-)type according EMDAT terminology or CLIMADA hazard type abbreviations. e.g. ['Wildfire', 'Forest fire'] or ['BF']\n",
194195
"- year_range (list with 2 integers): start and end year e.g. [1980, 2017]\n",
195196
"- countries (list of str): country ISO3-codes or names, e.g. ['JAM', 'CUB']. Set to None or ['all'] for all countries \n",
196197
"- reference_year (int): reference year of exposures for normalization. Impact is scaled proportional to GDP to the value of the reference year. No scaling for reference_year=0 (default)\n",
197198
"- imp_str (str): Column name of impact metric in EMDAT CSV, e.g. 'Total Affected'; default = \"Total Damages\"\n",
198199
"\n",
199-
"##### Returns:\n",
200+
"#### Returns:\n",
200201
"- impact_instance (instance of climada.engine.Impact):\n",
201202
" Impact() instance (same format as output from CLIMADA impact computations).\n",
202203
" Values are scaled with GDP to reference_year if reference_year not equal 0.\n",
@@ -322,10 +323,10 @@
322323
"\n",
323324
"function to load EM-DAT impact data and return DataFrame with impact summed per year and country\n",
324325
"\n",
325-
"##### Parameters:\n",
326+
"#### Parameters:\n",
326327
"- emdat_file_csv (str): Full path to EMDAT-file (CSV)\n",
327328
"\n",
328-
"##### Optional parameters:\n",
329+
"#### Optional parameters:\n",
329330
"\n",
330331
"- hazard (list or str): List of Disaster (sub-)type according EMDAT terminology or CLIMADA hazard type abbreviations. e.g. ['Wildfire', 'Forest fire'] or ['BF']\n",
331332
"- year_range (list with 2 integers): start and end year e.g. [1980, 2017]\n",
@@ -334,7 +335,7 @@
334335
"- imp_str (str): Column name of impact metric in EMDAT CSV, e.g. 'Total Affected'; default = \"Total Damages\"\n",
335336
"- version (int): given EM-DAT data format version (i.e. year of download), changes naming of columns/variables (default: 2020)\n",
336337
"\n",
337-
"##### Returns:\n",
338+
"#### Returns:\n",
338339
"- pandas.DataFrame with impact per year and country"
339340
]
340341
},
@@ -430,9 +431,9 @@
430431
"name": "python",
431432
"nbconvert_exporter": "python",
432433
"pygments_lexer": "ipython3",
433-
"version": "3.8.12"
434+
"version": "3.12.6"
434435
}
435436
},
436437
"nbformat": 4,
437-
"nbformat_minor": 2
438+
"nbformat_minor": 4
438439
}

doc/user-guide/climada_entity_Exposures.ipynb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,17 @@
1212
"cell_type": "markdown",
1313
"metadata": {},
1414
"source": [
15-
"### What is an exposure?\n",
15+
"## What is an exposure?\n",
1616
"\n",
1717
"Exposure describes the set of assets, people, livelihoods, infrastructures, etc. within an area of interest in terms of their geographic location, their value etc.; in brief - everything potentially exposed to hazards. \n",
1818
"\n",
19-
"\n",
20-
"\n",
21-
"### What options does CLIMADA offer for me to create an exposure?\n",
19+
"## What options does CLIMADA offer for me to create an exposure?\n",
2220
"\n",
2321
"CLIMADA has an `Exposures` class for this purpuse. An `Exposures` instance can be filled with your own data, or loaded from available default sources implemented through some Exposures-type classes from CLIMADA. <br>\n",
2422
"If you have your own data, they can be provided in the formats of a `pandas.DataFrame`, a `geopandas.GeoDataFrame` or simply an `Excel` file. \n",
2523
"If you didn't collect your own data, exposures can be generated on the fly using CLIMADA's [LitPop](climada_entity_LitPop.ipynb), [BlackMarble](https://climada-petals.readthedocs.io/en/stable/tutorial/climada_entity_BlackMarble.html) or [OpenStreetMap](https://climada-petals.readthedocs.io/en/stable/tutorial/climada_exposures_openstreetmap.html) modules. See the respective tutorials to learn what exactly they contain and how to use them.\n",
2624
"\n",
27-
"\n",
28-
"\n",
29-
"### What does an exposure look like in CLIMADA?\n",
25+
"## What does an exposure look like in CLIMADA?\n",
3026
"\n",
3127
"An exposure is represented in the class `Exposures`, which contains a [geopandas](https://geopandas.readthedocs.io/en/latest/gallery/cartopy_convert.html) [GeoDataFrame](https://geopandas.readthedocs.io/en/latest/docs/user_guide/data_structures.html#geodataframe) that is accessible through the `Exposures.data` attribute.\n",
3228
"A \"geometry\" column is initialized in the `GeoDataFrame` of the `Exposures` object, other columns are optional at first but some have to be present or make a difference when it comes to do calculations.\n",
@@ -1689,7 +1685,6 @@
16891685
},
16901686
{
16911687
"cell_type": "markdown",
1692-
"id": "5d078d09",
16931688
"metadata": {},
16941689
"source": [
16951690
"Optionally use climada's save option to save it in pickle format. This allows fast to quickly restore the object in its current state and take up your work right were you left it the next time.\n",
@@ -1727,7 +1722,7 @@
17271722
"name": "python",
17281723
"nbconvert_exporter": "python",
17291724
"pygments_lexer": "ipython3",
1730-
"version": "3.11.9"
1725+
"version": "3.12.6"
17311726
},
17321727
"latex_envs": {
17331728
"LaTeX_envs_menu_present": true,

doc/user-guide/climada_entity_ImpactFuncSet.ipynb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"#### What is an impact function?\n",
14+
"## What is an impact function?\n",
1515
"\n",
1616
"An impact function relates the percentage of damage in the exposure to the hazard intensity, also commonly referred to as a \"vulnerability curve\" in the modelling community. Every hazard and exposure types are characterized by an impact function."
1717
]
@@ -20,7 +20,7 @@
2020
"cell_type": "markdown",
2121
"metadata": {},
2222
"source": [
23-
"#### What is the difference between `ImpactFunc` and `ImpactFuncSet`?\n",
23+
"## What is the difference between `ImpactFunc` and `ImpactFuncSet`?\n",
2424
"\n",
2525
"An `ImpactFunc` is a class for a single impact function. E.g. a function that relates the percentage of damage of a reinforced concrete building (exposure) to the wind speed of a tropical cyclone (hazard intensity). \n",
2626
"\n",
@@ -31,7 +31,7 @@
3131
"cell_type": "markdown",
3232
"metadata": {},
3333
"source": [
34-
"#### What does an `ImpactFunc` look like in CLIMADA?\n",
34+
"### What does an `ImpactFunc` look like in CLIMADA?\n",
3535
"\n",
3636
"The `ImpactFunc` class requires users to define the following attributes.\n",
3737
"\n",
@@ -52,7 +52,7 @@
5252
"cell_type": "markdown",
5353
"metadata": {},
5454
"source": [
55-
"#### What does an `ImpactFuncSet` look like in CLIMADA?\n",
55+
"### What does an `ImpactFuncSet` look like in CLIMADA?\n",
5656
"\n",
5757
"The `ImpactFuncSet` class contains all the `ImpactFunc` classes. Users are not required to define any attributes in `ImpactFuncSet`. \n",
5858
"\n",
@@ -77,7 +77,7 @@
7777
"cell_type": "markdown",
7878
"metadata": {},
7979
"source": [
80-
"#### Generate a dummy impact function from scratch.\n",
80+
"### Generate a dummy impact function from scratch.\n",
8181
"\n",
8282
"Here we generate an impact function with random dummy data for illustrative reasons. Assuming this impact function is a function that relates building damage to tropical cyclone (TC) wind, with an arbitrary id 3."
8383
]
@@ -187,7 +187,7 @@
187187
"cell_type": "markdown",
188188
"metadata": {},
189189
"source": [
190-
"#### Loading CLIMADA in-built impact function for tropical cyclones\n",
190+
"### Loading CLIMADA in-built impact function for tropical cyclones\n",
191191
"\n",
192192
"`ImpfTropCyclone` is a derivated class of `ImpactFunc`. This in-built impact function estimates the insured property damages by tropical cyclone wind in USA, following the reference paper [Emanuel (2011)](https://doi.org/10.1175/WCAS-D-11-00007.1). <br>\n",
193193
"\n",
@@ -289,7 +289,7 @@
289289
"cell_type": "markdown",
290290
"metadata": {},
291291
"source": [
292-
"#### Plotting all the impact functions in an `ImpactFuncSet`\n",
292+
"### Plotting all the impact functions in an `ImpactFuncSet`\n",
293293
"\n",
294294
"The method `plot()` in `ImpactFuncSet` also uses the the [matplotlib's axes plot function](https://matplotlib.org/3.3.2/api/_as_gen/matplotlib.axes.Axes.plot.html) to visualise the impact functions, returning a figure with all the subplots of impact functions. Users may modify these plots."
295295
]
@@ -321,7 +321,7 @@
321321
"cell_type": "markdown",
322322
"metadata": {},
323323
"source": [
324-
"#### Retrieving an impact function from the `ImpactFuncSet`\n",
324+
"### Retrieving an impact function from the `ImpactFuncSet`\n",
325325
"User may want to retrive a particular impact function from `ImpactFuncSet`. Using the method `get_func(haz_type, id)`, it returns an `ImpactFunc` class of the desired impact function. Below is an example of extracting the TC impact function with id 1, and using `plot()` to visualise the function."
326326
]
327327
},
@@ -354,7 +354,7 @@
354354
"cell_type": "markdown",
355355
"metadata": {},
356356
"source": [
357-
"#### Removing an impact function from the `ImpactFuncSet`\n",
357+
"### Removing an impact function from the `ImpactFuncSet`\n",
358358
"\n",
359359
"If there is an unwanted impact function from the `ImpactFuncSet`, we may remove it using the method `remove_func(haz_type, id)` to remove it from the set. \n",
360360
"\n",
@@ -423,7 +423,7 @@
423423
"cell_type": "markdown",
424424
"metadata": {},
425425
"source": [
426-
"#### Reading impact functions from an Excel file\n",
426+
"### Reading impact functions from an Excel file\n",
427427
"\n",
428428
"Impact functions defined in an excel file following the template provided in sheet `impact_functions` of `climada_python/climada/data/system/entity_template.xlsx` can be ingested directly using the method `from_excel()`."
429429
]
@@ -471,7 +471,7 @@
471471
"cell_type": "markdown",
472472
"metadata": {},
473473
"source": [
474-
"#### Write impact functions\n",
474+
"### Write impact functions\n",
475475
"\n",
476476
"Users may write the impact functions in Excel format using `write_excel()` method."
477477
]
@@ -570,7 +570,7 @@
570570
"metadata": {
571571
"hide_input": false,
572572
"kernelspec": {
573-
"display_name": "climada_env",
573+
"display_name": "Python 3 (ipykernel)",
574574
"language": "python",
575575
"name": "python3"
576576
},
@@ -584,7 +584,7 @@
584584
"name": "python",
585585
"nbconvert_exporter": "python",
586586
"pygments_lexer": "ipython3",
587-
"version": "3.8.13"
587+
"version": "3.12.6"
588588
},
589589
"latex_envs": {
590590
"LaTeX_envs_menu_present": true,

doc/user-guide/climada_hazard_Hazard.ipynb

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@
66
"source": [
77
"# Hazard class\n",
88
"\n",
9-
"#### What is a hazard?\n",
9+
"## What is a hazard?\n",
1010
"A hazard describes weather events such as storms, floods, droughts, or heat waves both in terms of probability of occurrence as well as physical intensity.\n",
1111
"\n",
12-
"<br>\n",
13-
"\n",
14-
"#### How are hazards embedded in the CLIMADA architecture?\n",
12+
"## How are hazards embedded in the CLIMADA architecture?\n",
1513
"Hazards are defined by the base class `Hazard` which gathers the required attributes that enable the impact computation (such as centroids, frequency per event, and intensity per event and centroid) and common methods such as readers and visualization functions. Each hazard class collects historical data or model simulations and transforms them, if necessary, in order to construct a coherent event database. Stochastic events can be generated taking into account the frequency and main intensity characteristics (such as local water depth for floods or gust speed for storms) of historical events, producing an ensemble of probabilistic events for each historical event. CLIMADA provides therefore an event-based probabilistic approach which does not depend on a hypothesis of a priori general probability distribution choices. Note that one can also reduce the probabilistic approach to a deterministic approach (e.g., story-line or forecasting) by defining the frequency to be 1. The source of the historical data (e.g. inventories or satellite images) or model simulations (e.g. synthetic tropical cyclone tracks) and the methodologies used to compute the hazard attributes and its stochastic events depend on each hazard type and are defined in its corresponding Hazard-derived class (e.g. `TropCylcone` for tropical cyclones, explained in the tutorial [TropCyclone](climada_hazard_TropCyclone.ipynb)). This procedure provides a solid and homogeneous methodology to compute impacts worldwide. In the case where the risk analysis comprises a specific region where good quality data or models describing the hazard intensity and frequency are available, these can be directly ingested by the platform through the reader functions, skipping the hazard modelling part (in total or partially), and allowing us to easily and seamlessly combine CLIMADA with external sources. Hence the impact model can be used for a wide variety of applications, e.g. deterministically to assess the impact of a single (past or future) event or to quantify risk based on a (large) set of probabilistic events. Note that since the `Hazard` class is not an abstract class, any hazard that is not defined in CLIMADA can still be used by providing the `Hazard` attributes.\n",
1614
"\n",
17-
"<br>\n",
18-
"\n",
19-
"#### What do hazards look like in CLIMADA?\n",
15+
"## What do hazards look like in CLIMADA?\n",
2016
"\n",
2117
"A `Hazard` contains events of some hazard type defined at `centroids`. There are certain variables in a `Hazard` instance that _are needed_ to compute the impact, while others are _descriptive_ and can therefore be set with default values. The full list of looks like this:\n",
2218
"\n",
@@ -779,9 +775,7 @@
779775
{
780776
"cell_type": "code",
781777
"execution_count": 13,
782-
"metadata": {
783-
"scrolled": false
784-
},
778+
"metadata": {},
785779
"outputs": [
786780
{
787781
"data": {
@@ -1009,7 +1003,7 @@
10091003
],
10101004
"metadata": {
10111005
"kernelspec": {
1012-
"display_name": "Python 3.8.13 ('climada_env')",
1006+
"display_name": "Python 3 (ipykernel)",
10131007
"language": "python",
10141008
"name": "python3"
10151009
},
@@ -1023,7 +1017,7 @@
10231017
"name": "python",
10241018
"nbconvert_exporter": "python",
10251019
"pygments_lexer": "ipython3",
1026-
"version": "3.9.18"
1020+
"version": "3.12.6"
10271021
}
10281022
},
10291023
"nbformat": 4,

doc/user-guide/climada_hazard_TropCyclone.ipynb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"cell_type": "markdown",
1414
"metadata": {},
1515
"source": [
16-
"#### What do tropical cyclones look like in CLIMADA?\n",
16+
"## What do tropical cyclones look like in CLIMADA?\n",
1717
"\n",
1818
"`TCTracks` reads and handles historical tropical cyclone tracks of the [IBTrACS](https://www.ncdc.noaa.gov/ibtracs/) repository or synthetic tropical cyclone tracks simulated using fully statistical or coupled statistical-dynamical modeling approaches. It also generates synthetic tracks from the historical ones using Wiener processes.\n",
1919
"\n",
@@ -2183,7 +2183,7 @@
21832183
"cell_type": "markdown",
21842184
"metadata": {},
21852185
"source": [
2186-
"### REFERENCES:\n",
2186+
"## REFERENCES:\n",
21872187
"\n",
21882188
"- Bloemendaal, N., Haigh, I. D., de Moel, H., Muis, S., Haarsma, R. J., & Aerts, J. C. J. H. (2020). Generation of a global synthetic tropical cyclone hazard dataset using STORM. Scientific Data, 7(1). https://doi.org/10.1038/s41597-020-0381-2\n",
21892189
"\n",
@@ -2195,6 +2195,13 @@
21952195
"\n",
21962196
"- Lee, C. Y., Tippett, M. K., Sobel, A. H., & Camargo, S. J. (2018). An environmentally forced tropical cyclone hazard model. Journal of Advances in Modeling Earth Systems, 10(1), 223–241. https://doi.org/10.1002/2017MS001186"
21972197
]
2198+
},
2199+
{
2200+
"cell_type": "code",
2201+
"execution_count": null,
2202+
"metadata": {},
2203+
"outputs": [],
2204+
"source": []
21982205
}
21992206
],
22002207
"metadata": {
@@ -2213,7 +2220,7 @@
22132220
"name": "python",
22142221
"nbconvert_exporter": "python",
22152222
"pygments_lexer": "ipython3",
2216-
"version": "3.8.12"
2223+
"version": "3.12.6"
22172224
},
22182225
"toc": {
22192226
"base_numbering": 1,

0 commit comments

Comments
 (0)