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.
pip install -r requirements.txt
This project uses Leaflet + OpenStreetMap tiles
python app.py
Then open http://localhost:5000 in your browser.
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
GET /— Serves the appPOST /api/outcomes— Takes{infra, soft, reloc}in JSON, returns outcome modelGET /api/scenarios— Returns strategy descriptionsGET /api/map-data— Returns GeoJSON tract data
The sample data/tracts.geojson uses representative Miami-Dade neighborhoods.
To use real Census + FEMA data:
- Download ACS 5-year tract data from https://data.census.gov
- Download FEMA flood zones from https://msc.fema.gov/portal/advanceSearch
- Join them by FIPS tract ID in Python (pandas + geopandas)
- Export as GeoJSON and replace
data/tracts.geojson