Barcelona Public Water Fountains Analysis

Data Science project using Open Data (2019–2024)

Exploring urban infrastructure equity through spatial and statistical analysis.

Role: Data Scientist & Analyst
Focus: Urban equity · Open data · Spatial analysis

Project Overview

This project analyzes the distribution and accessibility of public drinking fountains in Barcelona between 2019 and 2024, using open data provided by Barcelona City Council.

The objective is to understand how the city's water infrastructure serves residents and visitors, identify areas with limited access, and evaluate equity in the distribution of these essential resources.

💡 Key Findings
  • Eixample Paradox: highest population but lowest per capita access.
  • Persistent Inequality: distribution patterns remain stable over time.
  • Limited Correlation: population is not the only determining factor.
  • Spatial Clustering: higher density in tourist areas vs. peripheral districts.

Interactive Water Fountains Map

Allow location access to find the nearest public drinking fountain to your current position.
📊 Map Statistics

Loading statistics...

🔍 Spatial Insights

The map reveals fountain clusters in tourist areas and gaps in peripheral districts, highlighting disparities in public water access across Barcelona's urban landscape.

Data Analysis

Fountains by District (latest year)

Uneven distribution between districts, with Eixample having more fountains in absolute numbers but lower per capita access.

Temporal Evolution (2019–2024)

Modest growth in infrastructure over the years, with stable distribution patterns maintained across districts.

Density per 1,000 Inhabitants (latest year)

The Eixample paradox: highest population but lowest fountain density per capita, highlighting infrastructure distribution challenges.

Population vs Fountains Correlation

Non-linear relationship between population and fountain count indicates that other urban factors influence distribution beyond resident numbers.

Methodology

1. Data Collection

Use of Barcelona's open data portal:

  • Drinking water fountains (2019–2024)
  • Population data by district (2019–2024)
  • District boundaries (for contextual analysis)
2. Data Processing & Cleaning

Python with Pandas for:

  • Standardization of district codes
  • Missing value treatment
  • Dataset merging by year and district
  • Calculation of fountain density metrics
3. Spatial Analysis

Geopandas and Folium for:

  • Geographic visualization of fountains
  • Cluster analysis and distribution patterns
  • Interactive maps with filtering capabilities
4. Statistical Analysis

Matplotlib, Seaborn and Scikit-learn for:

  • Temporal trend analysis
  • Comparative statistics between districts
  • Correlation analysis and pattern identification

Technical Implementation

Data Science Stack
Python Pandas NumPy Geopandas Scikit-learn
Matplotlib Seaborn Folium Jupyter Notebook
Web Visualization
HTML5 CSS3 JavaScript Bootstrap
Leaflet.js Chart.js PapaParse GitHub Pages

Conclusion & Impact

This analysis reveals significant spatial and temporal patterns in Barcelona's public water infrastructure:

🏙️ Urban Planning Implications
  • Infrastructure distribution does not always align with population density.
  • Tourist areas receive disproportionate resource allocation.
  • Peripheral districts show consistent access limitations.
📈 Data-Driven Recommendations
  • Targeted infrastructure development in high-population, low-access areas.
  • Seasonal adjustments for tourist-heavy districts.
  • Regular monitoring of access equity metrics.

This project shows how open data can illuminate urban equity issues and support evidence-based public policy decisions.