Skip to content

nismod/jamaica-infrastructure

Repository files navigation

Jamaica Infrastructure Risk and Resilience Assessment

This repository contains project-specific codes and configuration to run climate-related risk and resilience analysis of infrastructure networks in Jamaica.

For an initial overview of the style of analysis, a table of potential data requirements is presented in data-categories.csv.

Setup and installation

Clone or download this repository from GitHub:

git clone [email protected]:nismod/jamaica-infrastructure.git

Next, install required python packages:

We recommend using micromamba to install the packages and manage installing libraries into a conda environment, usually handling non-Python dependencies well.

Create a conda environment once (per machine/user):

micromamba create --file environment.yml

Usage

The principal goal of this repository is to produce analysis results, (damages, losses and adaptation options) that can be ingested by the ETL pipeline in irv-jamaica.

The analysis is comprised of Python scripts wrapped in snakemake rules. Snakemake is a workflow management system that can be used to break up complex modelling chains and improve the reproducibility of analyses. To invoke a rule, call snakemake followed by the file you want to produce.

Environment

To make snakemake and other software dependencies available, activate the environment we previously created.

micromamba activate jsrat

Invoke rules

To invoke the rule (and all necessary predecessor rules) to compute commuter flows across the transport network:

snakemake --dry-run --cores 1 -- results/flow_mapping/labour_to_sectors_flow_paths.csv

Note that the --dry-run flag asks snakemake to report on what work (if any) is necessary. As jobs can be long running, this is useful to check beforehand. To actually run the rules, remove the dry run flag.

The --cores flag indicates how many processors snakemake will use to execute the rules. If rules do not depend on one another and enough processors are available, they may execute simultaneously. Also, some rules invoke scripts that are parallelised and can make use more than one processor themselves.

Available rules

See the following files within workflow/ for available rules and their input and output files:

  • direct_damages.smk
  • losses.smk
  • transport_model.smk
  • hotspots.smk

Required data

To run any rules you will need the processed_data/ folder which contains data that has been cleaned and can be consumed by the rules. Contact the maintainers for access to this folder. Outputs are written to the results/ folder. These paths can be configured by editing the config.json file.

Related repositories

Energy

The Jamaica Energy Model (JEM) is a high-level power flow model of Jamaica's electricity network.

Visualisation tool

The J-SRAT web-based visualisation tool is implemented in irv-jamaica

snail

snail is a supporting library, used here for hazard-network intersections, under continuing development to support risk analysis.

open-gira

open-gira is a supporting library and set of workflows, used here for road network generation

Acknowledgments

This work is supported by the Coalition for Climate Resilient Investment (CCRI) project on infrastructure risk assessment and resilient investment prioritisation in Jamaica, funded by the UK Foreign, Commonwealth and Development Office (FCDO).

About

Jamaica Infrastructure Risk and Resilience Assessment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published