Git Product home page Git Product logo

opendrr-data-store's Introduction

(Français)

Parent repository for the Open Disaster Risk Reduction Platform

The OpenDRR platform is middleware between hazard or risk modeling environments like OpenQuake and end users who need to understand and evaluate risk to make economic and policy decisions. The end-user interface, launched as RiskProfiler, operates as a web application using standard web browsers in desktop, tablet or hand-held device environments.

Development and execution of hazard and risk assessment models is a separate concern, outside of the OpenDRR system. OpenDRR will receive output from these models as input, using one or more interfaces and interchange formats based on existing standards or on specifications developed by the implementation team if no standards meet requirements.

Download data

Key repositories

Progress tracking

Documentation

Contributing

  1. Fork a repository by following the GitHub guidelines here: https://docs.github.com/en/get-started/quickstart/fork-a-repo.
  2. Use the following steps to prepare a pull request:
    • git fetch upstream
    • git checkout upstream/master or git checkout upstream/main
    • git checkout -b my-contribution-description
    • test your additions
    • create a pull request

opendrr-data-store's People

Contributors

anthonyfok avatar drotheram avatar jvanulde avatar mjourneay avatar wkhchow avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

opendrr-data-store's Issues

Generate directories with economic region datasets

To support the GitHub pages work we require a set of folders as follows:

- PRUID
    - ERUID
        - dataset

So a folder for each Province containing subfolders for each Economic Region which contain the datasets for that Economic Region.

PostGIS Sandbox Environment

Create a sandbox environment with pre-processed scenario outputs. This sandbox will be used to generate static GeoJSON files from database views that can be ingested by RiskProfiler and GeoViewer visualizations.

Explore github actions to automate geopackage exports

Currently, geopackage exports of the db are generated locally on my win 10 desktop machine. After newest stack build, Drew backups the db onto S3. I restore the DB locally on my end to run my .bat gdal ogr2ogr scripts to generate the geopackage exports. The geopackages are then uploaded to my cloud storage (one drive / google drive) for dissemination. Whole process may take a few hours and upwards of 30+ gbs.
Would be great if able to automate this process and store the data somewhere (could be compressed?).

location of my bat scripts I use to run on local win 10 env.
https://github.com/OpenDRR/opendrr-data-store/tree/master/scripts/Data%20Export

investigate shakemap to filter out asset points

Current shakemap points/grid has asset/sauid points incorporated / interpolated for the settled area centroids. For viewing purposes in ES, check to see if we can filter out those sauid points to only have grid points for shakemap

Occasional "b2.exception.DestFileNewer: source file is older than destination" error

Will notified me of two GitHub Actions error as seen at https://github.com/OpenDRR/opendrr-data-store/actions, in particular:

It turns out that the Backblaze B2 tool errors out occasionally when it detected the source files being older than what is already on the B2 bucket:

  File "/usr/lib/python3/dist-packages/b2/sync/policy.py", line 99, in files_are_different
    raise DestFileNewer(
b2.exception.DestFileNewer: source file is older than destination: local://view_outputs/all_indicators/multi_hazard_threat/economic_region/nhsl_hazard_threat_all_indicators_b_1010.zip with a time of 1621298707917 cannot be synced to b2://view_outputs/all_indicators/multi_hazard_threat/economic_region/nhsl_hazard_threat_all_indicators_b_1010.zip with a time of 1621299046514, unless --skipNewer or --replaceNewer is provided
ERROR: source file is older than destination: local://view_outputs/all_indicators/multi_hazard_threat/economic_region/nhsl_hazard_threat_all_indicators_b_1010.zip with a time of 1621298707917 cannot be synced to b2://view_outputs/all_indicators/multi_hazard_threat/economic_region/nhsl_hazard_threat_all_indicators_b_1010.zip with a time of 1621299046514, unless --skipNewer or --replaceNewer is provided

Issues:

  • The "GeoPackage exports" GitHub workflow, which takes 4 hours or so to run, is being triggered on every single push and pull request, and that is probably too frequent.
  • With it being triggered on each push, and each instance taking 3 or 4 hours to run, when there are multiple pushes in close succession, more than one instance might be trying to uploading to B2 bucket at the same time.
  • The error avoids a race condition, so it is "good".
  • The error message can easily be overridden with --skipNewer or --replaceNewer, but there should be a better way to resolve this issue.

Revise DSRA indicators

As per discussion with @tieganh @plesueur @mjourneay, changes to be revised for DSRA (for all building, sauid, b0, r1 if applicable):

  • sLm_Asset / sLm_Bldg - divided by replacement value instead of building number (what is replacement value?)
  • remove sH_RuppAbbr, resource sH_RupName from sH_RuppAbbr
  • sH_GMPE (OpenDRR/model-factory#57) @drotheram
  • remove SH_PGV
  • add SH_PGA
  • Recalculate all displaced household and shelter indicators with updated Et_SFHshld / Et_MFHshl values (#53). Implement new intermediate tables to handle calculation of each portion of the equation to avoid confusion and for ease of pinpointing errors so that the final equation to calculate the displaced household / shelter can be reduced in size.

Finish update to transformation scripts

Complete validation review of existing transformation scripts for converting OpenQuake model outputs into risk profile indicators for 1) physical exposure layer, 2) multi-hazard threat layer, 3) social vulnerability layer, and 4) sample scenario risk layer. Define additional scenario risk profile indicators for A) Shelter requirements, and B) Return on Mitigation Investment

Upload GeoPackage files (compressed or not) to public S3 bucket

See also OpenDRR/opendrr-api#116.

  • Create new S3 bucket (no, not opendrr-api-prebuilt-cache-1)
  • Create IAM user (AWS Access key ID with write permission, etc.)
  • Edit workflow file (see example at OpenDRR/boundaries

But these files are static web contents and need to be publicly accessible IIRC... We may need to stick with Backblaze B2 for the time being? Updates: No worries, the application for public S3 bucket is pending.

Querying to find which earthquake scenarios are involved by different geometries, PGA etc.

possible solutions:

-in postgis: - create master dsra table that appends relevant information after each dsra scenario is generated in the stack (which indicators tbd, but the basics assetID, scenario name, pga?, all statscan tags DA,CD,CSD,FSA,PR etc). So a end user who wants to know what scenarios are in for example 'Greater Vancouver' can query against the master table to find out which scenarios are involved. They can then look at the specific scenario results views to get further info.

  • in es: ??

Issue : generate PSRA/DSRA profile indicators

issue - Current outputs on the scenario outputs are not clear to me and generating the specific 38 indicators looks like it needs to be manipulated in some ways. Need to meetup with Murray, Tiegan and others for clarification.

end goal - create views based views based on indicators from the scenario outputs

change Et_PPH indicator in physical exposure

Discussion with @plesueur and released Et_PPH (people per hectare) should be actually people per household. Suggest to fix this indicator to reflect people per household.
Additional indicators to be edited;
Et_Pop_km2, Et_Pop_Ha (new), Et_PPH, Et_Bldg_Km2, Et_Value_Km2

revise/update physical exposure indicators

As per meeting with @plesueur today:

  • update indicators E_AreaKm2, E_AreaHa (OpenDRR/openquake-inputs#15)

  • update exposure source daypop for 3 CD's (OpenDRR/openquake-inputs#17)

  • update indicators Et_BldgArea, Et_BldgAreaRes, Et_BldgAreaComm, Et_BldgAreaInd, Et_BldgAreaCivic, Et_BldgAreaAgr

  • rename indicators Et_Pop_Km2, Et_Pop_Ha to Et_PopDay_Km2, Et_PopDay_Ha

  • add new indicators Et_PopNight_Km2, Et_PopNight_Ha

  • remove indicators E_CensusBldg

  • Et_PPH, may need to be revised. Update to population per hectare, (sum(pop)/sauid_ha)

  • change Et_PPH to day pop per building, night pop per building

  • update Et_SFHshld / Et_MFHshld based on occupancy lut, include into building level indicators

  • investigate source exposure model popdu column and see if we can replicate the same values. May have to check with Murray if unable to recalculate column. unable to replicate popdu column after checking and comparing previous exposure data, using SA (proxied) census population, census dwellings, the values are slightly different compared to du. Need to check with Murray how he derived the indicator? confirmed census population / census dwelling unit

Add PSRA

Define specifications for transforming OpenQuake outputs of probabilistic risk assessment models (PSRA) into risk profile indicators for the national earthquake risk model.

add additional tags to all indicators

Add fsauid, dauid, sactype, saccode tags from sauid geometry to all indicators.
Add landuse tag from exposure to all indicators.
Fix changes in model_factory as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.