Urban Heat & Airflow Simulator for Smart-City Planning
A modular Streamlit + Plotly application that generates a synthetic 20×20 city grid and runs real-time heat and wind simulations. Designed with a clean backend/frontend separation so you can plug in a 3D renderer later.
cd smart-city
pip install -r requirements.txt
streamlit run app.pyThen open http://localhost:8501.
| File | Purpose |
|---|---|
data.py |
City grid generator (buildings, vegetation, water) |
model.py |
Heat computation with neighbour diffusion |
simulation.py |
Left→right wind simulation |
metrics.py |
Avg temp, max temp, wind efficiency, cooling score |
app.py |
Streamlit UI + Plotly heatmaps + JSON state export |
- Paint Tool — place buildings, vegetation, or water on the grid
- Real-time simulation — heat & wind recalculate instantly
- AI Insights — dynamic recommendations based on current metrics
- JSON Export — download full grid + simulation state for 3D integration
Python 3 · Streamlit · NumPy · Plotly