Skip to content

lucas-vivier/geo-sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geo Sandbox

Region Builder and geospatial utilities for working with World Bank administrative boundaries.

What this project does

  • Interactive Streamlit app to group ADM1 regions and export merged group borders as GeoJSON.
  • Utility CLI to filter, plot, merge, and simplify geospatial datasets.

Project layout

  • app.py: Streamlit Region Builder UI.
  • utils.py: CLI utilities for plotting, merging, and simplifying boundaries.
  • data_config.yaml: Paths and column settings for datasets.
  • dataset/: Source geospatial data (not tracked here if large).
  • output/: Generated maps and merged datasets.

Setup

Create a virtual environment and install dependencies:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Configure data

Edit data_config.yaml to point at your local datasets. By default it expects:

  • World Bank admin boundaries (Admin 0 and Admin 1) in dataset/wb_admin_boundaries/
  • Natural Earth cities in dataset/ne_10m_populated_places_simple/

Run the Region Builder app

streamlit run app.py

CLI usage (utils)

# Static map for a region or country
python utils.py static --region AFR --filter kenya uganda

# Interactive map (opens in browser)
python utils.py interactive --region SAR

# Merge CSV attributes into a GPKG
python utils.py merge

# Simplify geometries
python utils.py simplify dataset/wb_admin_boundaries/World\ Bank\ Official\ Boundaries\ -\ Admin\ 1.gpkg --tolerance 0.01

Outputs

Generated maps and merged datasets are written to output/ by default.

Notes

  • data_config.yaml controls default layers, merge keys, and label columns.
  • The Streamlit app uses ADM1 boundaries and assigns regions to user-defined groups.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors