|
11 | 11 | "cell_type": "markdown", |
12 | 12 | "metadata": {}, |
13 | 13 | "source": [ |
14 | | - "#### What is an impact function?\n", |
| 14 | + "## What is an impact function?\n", |
15 | 15 | "\n", |
16 | 16 | "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." |
17 | 17 | ] |
|
20 | 20 | "cell_type": "markdown", |
21 | 21 | "metadata": {}, |
22 | 22 | "source": [ |
23 | | - "#### What is the difference between `ImpactFunc` and `ImpactFuncSet`?\n", |
| 23 | + "## What is the difference between `ImpactFunc` and `ImpactFuncSet`?\n", |
24 | 24 | "\n", |
25 | 25 | "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", |
26 | 26 | "\n", |
|
31 | 31 | "cell_type": "markdown", |
32 | 32 | "metadata": {}, |
33 | 33 | "source": [ |
34 | | - "#### What does an `ImpactFunc` look like in CLIMADA?\n", |
| 34 | + "### What does an `ImpactFunc` look like in CLIMADA?\n", |
35 | 35 | "\n", |
36 | 36 | "The `ImpactFunc` class requires users to define the following attributes.\n", |
37 | 37 | "\n", |
|
52 | 52 | "cell_type": "markdown", |
53 | 53 | "metadata": {}, |
54 | 54 | "source": [ |
55 | | - "#### What does an `ImpactFuncSet` look like in CLIMADA?\n", |
| 55 | + "### What does an `ImpactFuncSet` look like in CLIMADA?\n", |
56 | 56 | "\n", |
57 | 57 | "The `ImpactFuncSet` class contains all the `ImpactFunc` classes. Users are not required to define any attributes in `ImpactFuncSet`. \n", |
58 | 58 | "\n", |
|
77 | 77 | "cell_type": "markdown", |
78 | 78 | "metadata": {}, |
79 | 79 | "source": [ |
80 | | - "#### Generate a dummy impact function from scratch.\n", |
| 80 | + "### Generate a dummy impact function from scratch.\n", |
81 | 81 | "\n", |
82 | 82 | "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." |
83 | 83 | ] |
|
187 | 187 | "cell_type": "markdown", |
188 | 188 | "metadata": {}, |
189 | 189 | "source": [ |
190 | | - "#### Loading CLIMADA in-built impact function for tropical cyclones\n", |
| 190 | + "### Loading CLIMADA in-built impact function for tropical cyclones\n", |
191 | 191 | "\n", |
192 | 192 | "`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", |
193 | 193 | "\n", |
|
289 | 289 | "cell_type": "markdown", |
290 | 290 | "metadata": {}, |
291 | 291 | "source": [ |
292 | | - "#### Plotting all the impact functions in an `ImpactFuncSet`\n", |
| 292 | + "### Plotting all the impact functions in an `ImpactFuncSet`\n", |
293 | 293 | "\n", |
294 | 294 | "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." |
295 | 295 | ] |
|
321 | 321 | "cell_type": "markdown", |
322 | 322 | "metadata": {}, |
323 | 323 | "source": [ |
324 | | - "#### Retrieving an impact function from the `ImpactFuncSet`\n", |
| 324 | + "### Retrieving an impact function from the `ImpactFuncSet`\n", |
325 | 325 | "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." |
326 | 326 | ] |
327 | 327 | }, |
|
354 | 354 | "cell_type": "markdown", |
355 | 355 | "metadata": {}, |
356 | 356 | "source": [ |
357 | | - "#### Removing an impact function from the `ImpactFuncSet`\n", |
| 357 | + "### Removing an impact function from the `ImpactFuncSet`\n", |
358 | 358 | "\n", |
359 | 359 | "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", |
360 | 360 | "\n", |
|
423 | 423 | "cell_type": "markdown", |
424 | 424 | "metadata": {}, |
425 | 425 | "source": [ |
426 | | - "#### Reading impact functions from an Excel file\n", |
| 426 | + "### Reading impact functions from an Excel file\n", |
427 | 427 | "\n", |
428 | 428 | "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()`." |
429 | 429 | ] |
|
471 | 471 | "cell_type": "markdown", |
472 | 472 | "metadata": {}, |
473 | 473 | "source": [ |
474 | | - "#### Write impact functions\n", |
| 474 | + "### Write impact functions\n", |
475 | 475 | "\n", |
476 | 476 | "Users may write the impact functions in Excel format using `write_excel()` method." |
477 | 477 | ] |
|
570 | 570 | "metadata": { |
571 | 571 | "hide_input": false, |
572 | 572 | "kernelspec": { |
573 | | - "display_name": "climada_env", |
| 573 | + "display_name": "Python 3 (ipykernel)", |
574 | 574 | "language": "python", |
575 | 575 | "name": "python3" |
576 | 576 | }, |
|
584 | 584 | "name": "python", |
585 | 585 | "nbconvert_exporter": "python", |
586 | 586 | "pygments_lexer": "ipython3", |
587 | | - "version": "3.8.13" |
| 587 | + "version": "3.12.6" |
588 | 588 | }, |
589 | 589 | "latex_envs": { |
590 | 590 | "LaTeX_envs_menu_present": true, |
|
0 commit comments