Skip to content

oi-analytics/oi-risk-vis

Repository files navigation

OIA Risk Visualisation Tool

This project provides interactive data visualisations of risk analysis results.

The tool presents the infrastructure systems and hazards considered in the analysis, then presents results as modelled for the whole system at a fine scale.

The concepts and model results presented here are documented in the study report:

Pant, R., Russell, T., Glasgow, G., Verschuur, J., Gavin, H., Fowler, T. & Hall, J.W. (2021). Analytics for Financial Risk Management of Critical Infrastructure in Southeast Asia – Final Report. Oxford Infrastructure Analytics Ltd., Oxford, UK. Available online at: thedocs.worldbank.org/en/doc/1019bd2696cf0660968910763351f601-0240012021/analytics-for-financial-risk-management-of-critical-infrastructure-in-southeast-asia-scoping-feasibility-study

Results are archived in the World Bank Data Catalog:

The Southeast Asia analytics are produced using the code here:

Features

Summarise risk analysis at an admin-1 regional scale

Nghe An summary

See an overview of infrastructure networks

Networks

Zoom in to see networks in detail

Networks in detail

See an overview of hazard data

Hazards

Inspect details of hazard layers

Hazards in detail

Query attributes of elements of the system

System attributes

Range of potential economic impacts of failure

Consisting of direct damages to infrastructure assets and indirect economic losses resulting from infrastructure service disruption (loss of power, loss of access):

Impact of flooding

Cost-benefit analysis

In the Vietnam case study (and in version 0.1 of this tool showing analysis done in Argentina), explore a cost-benefit analysis (under uncertainty, with options to explore some parameters) of adaptation measures:

Cost-benefit analysis of adaptation measures

Development

This README covers requirements and steps through how to prepare data for visualisation and how to run the tool.

  1. Data preparation requirements
  2. Prepare data
  3. Build and run requirements
  4. Run

Data preparation requirements

ogr2ogr

ogr2ogr is used for spatial data processing. On Ubuntu, run:

sudo apt-get install gdal-bin

Tippecanoe

The data preparation steps use Mapbox tippecanoe to build vector tiles from large feature sets.

The easiest way to install tippecanoe on OSX is with Homebrew:

brew install tippecanoe

On Ubuntu it will usually be easiest to build from the source repository:

sudo apt-get install build-essential g++ libsqlite3-dev zlib1g-dev
git clone https://github.com/mapbox/tippecanoe
cd tippecanoe
make -j
make

Prepare data

This step is not necessary if you already have a prepared set MBTiles files - the simplest option is to place them directly in the /data folder.

Otherwise, to prepare results of analysis for visualisation in this tool, you will need to build a set of MBTiles files which contain the data as Mapbox Vector Tiles for the map visualisations, and a set of CSV files for the charts.

Download boundaries, network and flood_data usage results from the shared folder.

Either link to the synced/downloaded data directories:

ln -s 'path/to/results' incoming_data/results

Or unzip within /incoming_data folder:

unzip ~/Downloads/boundaries.zip -d incoming_data/
unzip ~/Downloads/network.zip -d incoming_data/

Convert the incoming data to JSON files first:

python scripts/files_to_json_for_vis.py

Create the *.pmtiles files for visualisation:

make

Build and run requirements

Node and npm

The build and run steps use node.js - this provides the npm command.

Install required packages. Run from the project root:

npm install

Run

Running the application in development mode:

npm run dev

This should automatically open a browser tab. If not, open:

firefox http://localhost:5173/

Deployment

Build the application:

npm run build

The dist folder should then have everything needed for a static site deployment, e.g. behind a web server, or from an object store.

For example, configure an AWS S3 bucket to host a static website (docs), then upload dist to the bucket:

aws s3 cp --recursive dist s3://bucket-name

Acknowledgments

This tool was originally developed by Oxford Infrastructure Analytics as part of a project led by the Disaster Risk Financing and Insurance Program (DRFIP) of the World Bank with support from the Japan—World Bank Program for Mainstreaming DRM in Developing Countries, which is financed by the Government of Japan and managed by the Global Facility for Disaster Reduction and Recovery (GFDRR) through the Tokyo Disaster Risk Management Hub.

About

Risk analysis visualisation tool

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors