Inspiration

Cities generate huge amounts of environmental and urban data, but most people do not know how to use it in their daily lives.

Whether someone wants to go for a walk, run outdoors, discover a greener area, or simply avoid congested locations, finding the right place often requires checking multiple sources of information.

I created UrbanSense Agent to transform fragmented urban datasets into practical recommendations. Instead of showing raw data, the platform acts as an intelligent assistant that helps users discover healthier areas of Barcelona through natural language conversations.

What it does

UrbanSense Agent is an AI-powered urban wellness assistant that recommends healthier areas of the city based on environmental and urban indicators.

Users can ask questions such as:

  • Where should I go for a healthy walk?
  • Which area has better air quality?
  • Where can I find green spaces and drinking fountains?
  • What is a good area for running today?

The platform analyzes urban data, identifies suitable areas, explains the reasoning behind each recommendation, and displays the result on an interactive map.

Users can also generate routes to the recommended area using different activity modes such as walking, running, and cycling.

How I built it

The application combines artificial intelligence, geospatial visualization, environmental datasets, and cloud-based services. MongoDB Atlas serves as the central data layer, storing urban areas, points of interest, air quality indicators and agent query history used by the recommendation engine.

Frontend:

  • React
  • Vite
  • Tailwind CSS
  • Leaflet

Backend:

  • FastAPI
  • Python

Artificial Intelligence:

  • Gemini API

Database:

  • MongoDB Atlas

External Services:

  • Open-Meteo Weather API
  • Google Routes API

I store urban areas, points of interest, air quality indicators and agent query history in MongoDB Atlas. The backend analyzes user requests and combines structured urban data with Gemini-generated explanations.

Recommendations are then visualized on an interactive map together with relevant points of interest and route generation capabilities.

Challenges I ran into

One of the biggest challenges was transforming heterogeneous urban datasets into meaningful recommendations.

Raw environmental information is often difficult for non-technical users to interpret. I needed to design a recommendation system capable of converting air quality indicators, green spaces, fountains and walkability information into simple and understandable suggestions.

Another challenge was balancing deterministic data-driven recommendations with AI-generated explanations while keeping the responses reliable and transparent.

Accomplishments that I am proud of

  • Building a complete end-to-end AI agent.
  • Integrating Gemini with real urban datasets.
  • Using MongoDB Atlas as the central data platform.
  • Creating an interactive map experience.
  • Generating contextual explanations instead of showing raw data.
  • Supporting multiple activity modes.
  • Adding route generation capabilities.
  • Delivering a clean and intuitive user experience.

What I learned

This project reinforced the importance of combining structured data with generative AI.

I learned that large language models become significantly more useful when grounded in real-world datasets and domain-specific information.

I also gained valuable experience working with geospatial data, environmental indicators, AI-assisted recommendations and cloud-based architectures.

What's next for UrbanSense Agent

Future improvements include:

  • Expanding to additional cities.
  • Integrating more real-time urban datasets.
  • Adding personalized user profiles.
  • Incorporating activity history and fitness integrations.
  • Enhancing weather-aware recommendations.
  • Providing deeper explainability for every recommendation.

Built With

Share this project:

Updates