Skip to content

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

2026 WMGIC x PIT-UN Tech for Change Hackathon Project

Stream 2: Climate Stability, Sustainability, and the Limits of Adaptation

As sea levels rise, some communities must move (managed retreat). Currently, these decisions are often top-down, favoring wealthy real estate over vulnerable neighborhoods.

This project is an Equity-First Managed Retreat Simulator: a participatory budgeting tool for coastal climate adaptation decisions in Miami-Dade.

Setup (5 minutes)

1. Install Python dependencies

pip install -r requirements.txt

2. Map usage

This project uses Leaflet + OpenStreetMap tiles

3. Run the app

python app.py

Then open http://localhost:5000 in your browser.


File structure

climate-retreat-app/
├── app.py                  # Flask backend — outcome model + API routes
├── requirements.txt        # pip dependencies
├── data/
│   └── tracts.geojson      # Census tract data (flood risk + demographics)
├── templates/
│   └── index.html          # Main HTML page
└── static/
    ├── css/
    │   └── style.css       # All styles
    └── js/
        ├── map.js          # Leaflet map + layer toggling + tract clicks
        ├── budget.js       # Slider UI + calls Flask API
        └── charts.js       # Chart.js equity chart + outcomes rendering

API endpoints

  • GET / — Serves the app
  • POST /api/outcomes — Takes {infra, soft, reloc} in JSON, returns outcome model
  • GET /api/scenarios — Returns strategy descriptions
  • GET /api/map-data — Returns GeoJSON tract data

Upgrading with real data

The sample data/tracts.geojson uses representative Miami-Dade neighborhoods. To use real Census + FEMA data:

  1. Download ACS 5-year tract data from https://data.census.gov
  2. Download FEMA flood zones from https://msc.fema.gov/portal/advanceSearch
  3. Join them by FIPS tract ID in Python (pandas + geopandas)
  4. Export as GeoJSON and replace data/tracts.geojson

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages