Spain
Raw Country-Specific Data for Spain
data/214.csv: Contains Cell Tower (gNB) locations for Spain (MCC 214).- Source: OpenCellID.
data/municipalities_coordinates.csv: Essential for population data (used to distribute agents realistically) and municipality centroids.- Source: CNIG (Centro Nacional de Información Geográfica) via Datos Abiertos del CNIG.
data/esri_municipios.geojson: Essential for geometric boundaries (polygons), used to verify if agents are located within valid municipality borders.- Source: IGN (Instituto Geográfico Nacional).
Both municipality files are required because the GeoJSON lacks population statistics, while the CSV lacks the polygon shapes needed for spatial containment checks.
Helper Script
To ensure the simulation can read these files correctly, we use a Python script to standardize the data formats (column names, coordinate systems, etc.).
data/processing_scripts/standardize_spain.py
This script performs the following actions:
- Reads the raw
municipalities_coordinates.csv. - Renames columns to the standard format (
id,name,population,lat,lon). - Filters out invalid coordinates and locations outside mainland Spain (e.g., Canary Islands) to focus the simulation.
- Reads the
esri_municipios.geojson. - Ensures each feature has a standard
idproperty matching the CSV. - Generates a
cities.csvfile for plotting major cities. - Saves the processed files to
data/spain/:municipalities.csvregions.geojsoncities.csv
Environment Setup & Execution
To ensure reproducibility, use a dedicated Python virtual environment for these scripts.
- Set up the Environment:
cd data/processing_scripts
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cd ../.. # Return to project root
- Run the Script:
source data/processing_scripts/.venv/bin/activate
python3 data/processing_scripts/standardize_spain.py
Visualizations
Here are some visualizations of the generated topology for Spain (Movistar).
Topology Map

Network Graph
