Skip to content

alstat/resilience_indicator_phl

 
 

Repository files navigation

Resilience (socio-economic capacity) indicator for the Philippines' provinces

Contents

This repository contains several things. It will be updated regularly as the training dates approach.

Jupyter notebooks (*.ipynb)

  • socio_economic_capacity is the main demo of the model. Just click the link to see the demo. This notebook reads the socio-economic data, reads the hazard data, and runs the model.

  • data_gathering_demo demonstrates how Python and Pandas can be used to gather data from different sources. It is out of date and is kept only for proof-of-concept purpose.

  • draw_maps is the code used to draw maps from a dataset and a blank SVG map.

  • draw_plots demonstrates plots.

  • policy_assessment_demo makes systematic policy assessments and plots the result.

  • muli_hazard_multi_period_demo demonstrates how to ahndle several hazard and several return periods.

Data

All the data required to run the resilience indicator is gathered in all_data_compiled.xlsx.

This spreadsheet itself was compiled from diverse files Excel and csv data files in the inputs/ folder, using data_gathering_demo.

The blank map of the Philippines' provinces is stored in map/PHL_adm1.svg

Python libraries (*.py)

The *.py files contain function definitions. Among them, res_ind_lib.py contains the main set of equations of the model. The model, and thus this file, can be modified to be tailored to the PHL context.

Usage

Here is how to run these notebooks in your computer.

Dependencies

This program requires python3 and several libraries. The recommendation is to rely on the Anaconda python 3 distribution, available for free online. The standard anaconda installation includes all dependencies of this program. Make sure you chose python 3.x, not 2.x.

Optional dependencies to render maps are Inkscape to convert SVG in PDF, and imagemagick to convert PDF to PNG and resize images programatically. Joining all the policy assessment cards into a single pdf requires ghostscript.

All requirements and optional dependencies are available for free on all plateforms. Some of them are included by default in Linux and Mac distrirbutions. To use them make sure that they are installed and accessible in the PATH of your machine.

Launching

Just download and unzip this whole folder from github. The run.bat program will launch the jupyter notebook for you.

About

Code and data for the resilience indicator in the Philippines

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 97.4%
  • Python 2.6%