Inspiration
Urban planners often lack an intuitive way to see how design changes affect a city’s environment.
We were inspired by the question:
“What if urban planners could instantly see how adding trees or reducing buildings changes a city’s livability?”
That question led to UrbanTwinAI, an AI-powered simulation tool that enables users to explore what-if urban design scenarios interactively using real map data and predictive modeling.
What it does
UrbanTwinAI allows users to select any area from OpenStreetMap (OSM) and experiment with urban design changes in real time.
Using interactive sliders, users can modify the percentage of buildings and greenery in that area.
Behind the scenes, machine learning models predict how these changes affect:
- Traffic congestion
- Urban Heat Island (UHI) intensity
- Air Quality (AQ)
Predictions are visualized as interactive heatmaps over the selected area.
The system also integrates Gemini Vertex AI, which analyzes the simulation results and generates textual insights summarizing environmental impacts — shown directly beneath the map visualization.
Live demo:
🔗 urbantwinai-generative-city-simulation.streamlit.app
How we built it
Frontend (Web Interface)
- Developed using Streamlit for simplicity and fast interaction.
- Integrated an interactive map view where users can select any area directly from OSM.
- Added sliders for adjusting the percentage of buildings and green areas.
- Developed using Streamlit for simplicity and fast interaction.
Backend (Prediction & AI Analysis Engine)
- Extracts spatial features from OpenStreetMap (OSM) such as:
- Building density
- Green cover ratio
- Road network metrics
- Building density
- Uses trained machine learning models (LightGBM, Linear Regression, and Spatio-Temporal Graph Neural Networks) to predict:
- Traffic congestion
- UHI (temperature anomaly)
- Air Quality Index
- Traffic congestion
- Integrates Gemini Vertex AI to analyze the simulation results and produce human-readable insights about environmental impacts.
- Extracts spatial features from OpenStreetMap (OSM) such as:
Visualization
- Predictions are displayed as heatmaps directly on the map interface.
- Gemini’s analysis appears below, helping users interpret how urban design choices influence traffic, temperature, and air quality.
- Predictions are displayed as heatmaps directly on the map interface.
Challenges we ran into
- Handling dynamic OSM data and converting it into a grid format suitable for model input.
- Ensuring consistent coordinate systems (CRS) between OSM layers, models, and heatmaps.
- Combining multiple ML models efficiently for near real-time updates.
- Integrating Gemini Vertex AI for meaningful interpretation of model results.
- Managing data pipelines and deployment entirely within Streamlit Cloud.
Accomplishments that we're proud of
- Built and deployed a fully functional prototype that connects OSM data, ML predictions, and AI-driven insights.
- Created an interactive geospatial interface that responds in real time to user inputs.
- Successfully integrated Gemini Vertex AI for contextual analysis of simulation outcomes.
- Developed a complete data-to-visualization pipeline within a hackathon timeframe.
- Made urban sustainability analysis approachable and engaging for everyone.
What we learned
- How to dynamically process and visualize OpenStreetMap (OSM) data.
- How to train and integrate multiple ML models for environmental impact prediction:
- ( f_{\text{traffic}}(x) ), ( f_{\text{UHI}}(x) ), ( f_{\text{AQ}}(x) )
- Each function ( f(x) ) maps spatial design variables (e.g., building density, green ratio) to predicted outcomes.
- How to connect ML predictions to Gemini Vertex AI for automated interpretation.
- The value of real-time interactivity and visual clarity in communicating environmental data.
- How AI can bridge the gap between data science and urban planning.
What’s next for UrbanTwinAI
- Integrate the Node.js + React frontend currently in development for enhanced interactivity.
- Add new variables such as population density, road width, and building height.
- Improve Gemini integration to provide deeper sustainability recommendations.
- Deploy the app as a decision-support tool for planners, researchers, and students exploring sustainable urban design.
UrbanTwinAI helps planners visualize future cities.
Predict how buildings or green spaces affect heat, air quality, and traffic — and watch your city evolve in real time.
Built With
- openstreetmap
- python
- streamlit

Log in or sign up for Devpost to join the conversation.