Skip to content

Montandon: Use Case 1 - #9

Draft
wrynearson wants to merge 11 commits into
mainfrom
montandon-use-cases
Draft

Montandon: Use Case 1#9
wrynearson wants to merge 11 commits into
mainfrom
montandon-use-cases

Conversation

@wrynearson

@wrynearson wrynearson commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This PR adds the full analysis workflow from @ddebarros-mapaction at MapAction in 60527e5 for Montandon Use Case 1 (hazard risk exposure
for people and infrastructure), then amends it to be publishable with MyST.

Update in ae0fac1: notebooks can be created and run with parameters. It's a little janky now, but it tests and validates the hypothesis. To create new notebooks using parameters:

Example uses KEN — swap the ISO3 code throughout.

cd notebooks/montandon_use_cases/1/GIS/7_Python/71_Jupyter
uv run papermill country_data_preparation.ipynb runs/KEN/country_data_preparation.ipynb --cwd . -p iso_code KEN
uv run papermill data_processing_population_exposure.ipynb runs/KEN/data_processing_population_exposure.ipynb --cwd . -p iso_code KEN
uv run papermill data_processing_infrastructure_exposure.ipynb runs/KEN/data_processing_infrastructure_exposure.ipynb --cwd . -p iso_code KEN
uv run papermill data_visualization.ipynb data_visualization_KEN.ipynb --cwd . -p iso_code KEN

Then, preview normally.

WIP

@wrynearson

Copy link
Copy Markdown
Contributor Author

@batpad I think this PR is in a state that it could be fed into the upcoming developmentseed/esa-montandon#27. I wouldn't call this notebook ready for delivery for the ESA contract.

The two notebooks are designed to test the limits of our publishing approach. The Kenya notebook is ~78MB (primarily due to complex geometries if I understand correctly), and both have a few different widgets and toggles to display all hazard data for admin 1 and admin 2 (separately).

A few remaining steps:

  1. Figure out what we actually want to display. What I have here is not polished
  2. Test with a few more countries, using papermill to inject the country as a parameter, to see if the executed notebooks ever get too big (e.g., with a larger country)
  3. Think how to better tie the pipeline of select country -> generate baseline data -> build and publish notebook. This could be packaged up into a single user-facing action.

cc @batpad @pantierra @emmanuelmathot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant