diff --git a/_sources/docs/EAI.md b/_sources/docs/EAI.md index d2109acd..891a3516 100644 --- a/_sources/docs/EAI.md +++ b/_sources/docs/EAI.md @@ -36,15 +36,10 @@ align: center - The exposure and impact estimates are then summarised for the chosen administrative boundary (ADM) level using `zonal statistic`. The expected annual impact (EAI) is computed by multiplying the impact value with its exceedence frequency depending on the scenario. The `exceedance frequency curve (EFC)` is plotted. These outputs represent the core of the disaster risk historical baseline. The output is exported in form of tables, statistics, charts (excel format) and maps (geopackage). -## DATA MANAGEMENT - -- Download country boundaries for multiple administrative levels sourced from [HDX](https://data.humdata.org/dataset) or [Geoboundaries](https://www.geoboundaries.org). Note that oftern there are several versions for the same country, so be sure to use the most updated from official agencies (eg. United Nations). Verify that shapes, names and codes are consistent across different levels. -- Download [exposure data](global-exposure.md). -- Download probabilistic [hazard data](global-hazard.md), consisting of multiple RP scenarios. - ## SETUP THE NOTEBOOK -- Create environment and folder structure as explained in [tool setup](tool-setup.md) +As explained in [tool setup](tool-setup.md): +- Create environment and folder structure - Move verified input data into the tools folders - Use the interface to select the settings and start the processing diff --git a/_sources/docs/tool-setup.md b/_sources/docs/tool-setup.md index 02c8ba55..03a93ba8 100644 --- a/_sources/docs/tool-setup.md +++ b/_sources/docs/tool-setup.md @@ -1,4 +1,4 @@ -# Tools setup +# TOOLS SETUP The analytical scripts can be downloaded as: @@ -7,24 +7,39 @@ Read more about [**Jupyter Notebooks**](https://jupyter-notebook.readthedocs.io/ - [**Python code**](https://github.com/GFDRR/CCDR-tools/tree/main/Top-down/parallelization): give the user more control, and has overall better performances making use of parallel processing. These can be downloaded and exectuted on any windows or linux machine. -In both cases, the script expects input data to be provided according to some rules. +In both cases, the script requires proper environment setup and input data to be provided according to the instructions below. -### Expected directories and input format +## Python environment -The script expects input data folders to be structured as: +- Python 3 needs to be installed on your system. We suggest the latest [Anaconda](https://www.anaconda.com/download) distribution. Mamba is also encouraged. +- Create new `CCDR-tools` environment according to your operating system: win.yml or linux.yml. + In Anaconda cmd prompt: -``` -Work dir/ - - Hazard.ipynb - - common.py - - Data/ - - ADM Administrative unit layer for each country - - HZD Hazard layers - - EXP Exposure layers - Population (count), Built-up (ratio or binary), Agriculture (ratio or binary) - - RSK Output directory -``` + `conda create --name CCDR --file ` + + `activate CCDR` + +## Input data management + +- Download the latest version of the notebooks or the the parallel code. +- Create folder structure as: + + ``` + Work dir/ + - Hazard.ipynb Place the notebooks and related files in the main work directory + - common.py + - Parallel/ Place the parallel processing script in a sub-folder + - ... + - Data/ + - ADM Administrative unit layer for each country + - HZD Hazard layers + - EXP Exposure layers - Population (count), Built-up (ratio or binary), Agriculture (ratio or binary) + - RSK Output directory + ``` -- **ADMINISTRATIVE** boundaries are provided as geopackage files named as `ISO`_ADM.gpkg (e.g. `NPL`_ADM.gpkg) made of multiple layers represening different administrative boundary levels. +- Download **country boundaries** for multiple administrative levels (national, sub-national) sourced from [HDX](https://data.humdata.org/dataset) or [Geoboundaries](https://www.geoboundaries.org). Note that oftern there are several versions for the same country, so be sure to use the most updated from official agencies (eg. United Nations). Verify that shapes, names and codes are consistent across different levels. + +Boundaries must be provided as a geopackage files named as `ISO`_ADM.gpkg (e.g. `NPL`_ADM.gpkg) containing multiple layers, each one represening a different administrative boundary levels: ``` - ISO_ADM @@ -42,7 +57,7 @@ align: center Example of sub-national administrative boundaries for Senegal. ``` -Each ADM layer should include relative ADMi_CODE and ADMi_NAME across levels to facilitate the summary of results: +Each layer should include relative ADMi_CODE and ADMi_NAME across levels to facilitate the summary of results: - **ADM0** @@ -68,13 +83,12 @@ Each ADM layer should include relative ADMi_CODE and ADMi_NAME across levels to |---|---|---|---|---|---|---|---| | Integer | String (20) | Integer | String(20) | Integer | String(20) | Integer | String(20) | -- **HAZARD** layers are expected as raster files (`.tif`) named as `ISO`_`HZD`_RPi.tif (exampe for Nepal flood, RP100: `NPL_FL_RP100.tif`). Any resolution should work, but using resolution below 90m over large countries could cause very long processing and memory cap issues. - -- **EXPOSURE** are expected as raster files (`.tif`) named as `ISO`_`EXP`.tif. The same suggestion about resolution applies here. +- Download probabilistic [**hazard data**](global-hazard.md), consisting of multiple RP scenarios. Each scenario is expected as a raster file (`.tif`) named as `ISO`_`HZD`_RPi.tif (exampe for Nepal flood, RP100: `NPL_FL_RP100.tif`). Any resolution should work, but using resolution below 90m over large countries could cause very long processing and memory cap issues. - - Population from GHSL, 90 m: `ISO`_POP.tif - - Built-up from World Settlement Footprint or equivalent, 90 m: `ISO`_BU.tif - - Agriculture from land cover map, ESA land cover or equivalent, 90 m: `ISO`_AGR.tif +- Download [**exposure data**](global-exposure.md) for population, built-up and agricolture. Layers are expected as raster files (`.tif`) named as `ISO`_`EXP`.tif. + - **`ISO`_POP.tif**: Population, as from [Global Human Settlement Layer](https://ghsl.jrc.ec.europa.eu/download.php?ds=pop) or [Worldpop](https://hub.worldpop.org/geodata/listing?id=79) + - **`ISO`_BU.tif**: Built-up from [Global Human Settlement Layer](https://ghsl.jrc.ec.europa.eu/download.php?ds=bu) or [World Settlement Footprint](https://download.geoservice.dlr.de/WSF2019/) + - **`ISO`_AGR.tif**: Agriculture from land cover map, [ESA land cover](https://esa-worldcover.org/en) or equivalent ```{caution} When resampling exposure layers to a lower resolution, it is **strongly recommended** to align the resampled grid to exactly match the hazard grid, or viceversa. @@ -82,20 +96,15 @@ When resampling exposure layers to a lower resolution, it is **strongly recommen -```{caution} -All spatial data must use the same CRS, suggested: `EPSG 4326` (WGS 84) -``` +- Move verified input data into the proper folders + ```{caution} + All spatial data must use the same CRS, suggested: `EPSG 4326` (WGS 84) + ``` +- Use the interface to select the settings and start the processing
-## Environment and libraries -- The script requires python3 - conda or mamba are encouraged -- Create a new environment named CCDR based on win_env.yml o linux_env.yml depending on your operating system. - In Anaconda cmd prompt: - - `conda create --name CCDR --file ` - - `activate CCDR` +## Settings Edit the `.env` file inside the notebook directories to specify the working directory: diff --git a/docs/EAE.html b/docs/EAE.html index 7833378b..fac43ecb 100644 --- a/docs/EAE.html +++ b/docs/EAE.html @@ -239,7 +239,7 @@

Climate & Disaster Risk Screening Tools
  • - Tools setup + TOOLS SETUP
  • @@ -767,7 +767,7 @@

    Present results
    All content (unless otherwise specified) is subject to the World Bank Master Community License Agreement. diff --git a/docs/EAI.html b/docs/EAI.html index d45df1fe..82f61717 100644 --- a/docs/EAI.html +++ b/docs/EAI.html @@ -239,7 +239,7 @@

    Climate & Disaster Risk Screening Tools
  • - Tools setup + TOOLS SETUP
  • @@ -471,11 +471,6 @@

    Climate & Disaster Risk Screening Tools

  • -
  • - - DATA MANAGEMENT - -
  • SETUP THE NOTEBOOK @@ -527,11 +522,6 @@

    Contents

    SCRIPT OVERVIEW
  • -
  • - - DATA MANAGEMENT - -
  • SETUP THE NOTEBOOK @@ -599,18 +589,11 @@

    SCRIPT OVERVIEWzonal statistic. The expected annual impact (EAI) is computed by multiplying the impact value with its exceedence frequency depending on the scenario. The exceedance frequency curve (EFC) is plotted. These outputs represent the core of the disaster risk historical baseline. The output is exported in form of tables, statistics, charts (excel format) and maps (geopackage).

  • -
    -

    DATA MANAGEMENT#

    -
      -
    • Download country boundaries for multiple administrative levels sourced from HDX or Geoboundaries. Note that oftern there are several versions for the same country, so be sure to use the most updated from official agencies (eg. United Nations). Verify that shapes, names and codes are consistent across different levels.

    • -
    • Download exposure data.

    • -
    • Download probabilistic hazard data, consisting of multiple RP scenarios.

    • -
    -

    SETUP THE NOTEBOOK#

    +

    As explained in tool setup:

      -
    • Create environment and folder structure as explained in tool setup

    • +
    • Create environment and folder structure

    • Move verified input data into the tools folders

    • Use the interface to select the settings and start the processing

    @@ -744,7 +727,7 @@

    Present results
    All content (unless otherwise specified) is subject to the World Bank Master Community License Agreement. diff --git a/docs/climate-indices.html b/docs/climate-indices.html index 1195390f..d5ee5206 100644 --- a/docs/climate-indices.html +++ b/docs/climate-indices.html @@ -239,7 +239,7 @@

    Climate & Disaster Risk Screening Tools
  • - Tools setup + TOOLS SETUP
  • @@ -794,7 +794,7 @@

    Output presentation
    All content (unless otherwise specified) is subject to the World Bank Master Community License Agreement. diff --git a/docs/climate-risk.html b/docs/climate-risk.html index 339c8000..4fff08a1 100644 --- a/docs/climate-risk.html +++ b/docs/climate-risk.html @@ -239,7 +239,7 @@

    Climate & Disaster Risk Screening Tools
  • - Tools setup + TOOLS SETUP
  • @@ -595,7 +595,7 @@

    Climate outlook
    All content (unless otherwise specified) is subject to the World Bank Master Community License Agreement. diff --git a/docs/disaster-data.html b/docs/disaster-data.html index 312c63ab..61156d40 100644 --- a/docs/disaster-data.html +++ b/docs/disaster-data.html @@ -239,7 +239,7 @@

    Climate & Disaster Risk Screening Tools
  • - Tools setup + TOOLS SETUP
  • @@ -582,7 +582,7 @@

    Disaster records
    All content (unless otherwise specified) is subject to the World Bank Master Community License Agreement. diff --git a/docs/external-data.html b/docs/external-data.html index fb392dfc..4e039a6d 100644 --- a/docs/external-data.html +++ b/docs/external-data.html @@ -239,7 +239,7 @@

    Climate & Disaster Risk Screening Tools
  • - Tools setup + TOOLS SETUP
  • @@ -563,7 +563,7 @@

    Additional data sources - Last updated on Oct 04, 2023.
    + Last updated on Oct 13, 2023.