Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/danizd/urbanviable/llms.txt

Use this file to discover all available pages before exploring further.

UrbanViable is built entirely on open public data published by Spanish and Galician government bodies and the OpenStreetMap community. No proprietary datasets are used. The table below summarizes all five sources; detailed sections follow with exact URLs, license terms, and the variables each source contributes to the tile schema.

Summary

SourceOrganismLicenseAttributionUpdate Frequency
Secciones CensalesCNIG / INECC BY 4.0Fuente: IGN / INEAnnual
Atlas de Renta de los HogaresINEFree reuse (Ley 37/2007)Fuente: INEAnnual (~1 yr lag)
Indicadores de PoboaciónIGEPublic domain (Xunta de Galicia)Fonte: IGE - Instituto Galego de EstatísticaAnnual
OpenStreetMap GaliciaOSM / GeofabrikODbL 1.0© OpenStreetMap contributorsContinuous
Catastro VectorialSede Electrónica del CatastroFree reuse (RD 663/2007)Fonte: Sede Electrónica do CatastroAnnual

1. CNIG Secciones Censales

Organism: Centro Nacional de Información Geográfica (CNIG) / Instituto Nacional de Estadística (INE)
License: Creative Commons Attribution 4.0 International (CC BY 4.0)
Attribution text: Fuente: IGN / INE
Update frequency: Annual
URL: https://www.ine.es/dyngs/DAB/index.htm?cid=1389
This is the geometric backbone of the entire project. It provides the polygon boundaries for all ~3,800 Galician census sections (secciones censales), each identified by a unique 10-digit CUSEC code. Every other data source is joined to this geometry by CUSEC. Format: Shapefile compressed in ZIP
Native CRS: ETRS89 — EPSG:25829 (zone 29N, western Galicia) or EPSG:25830
Output CRS: WGS84 — EPSG:4326 (required by Tippecanoe and MapLibre GL JS)
Variables contributed to tile schema: geometry (polygon), cusec

2. INE Atlas de Renta de los Hogares

Organism: Instituto Nacional de Estadística (INE)
License: Free reuse under Ley 37/2007 de reutilización de la información del sector público
Attribution text: Fuente: INE
Update frequency: Annual, with approximately one year of publication lag
URL: https://www.ine.es/dynt3/inebase/index.htm?padre=12385&capsel=12384
Provides net mean household income (renta neta media por hogar) broken down by census section. This is the primary demand-side indicator in the scouting model: high-income sections tend to support higher-ticket retail and service businesses. Format: CSV in long format (one row per section × indicator × year combination)
Key parsing challenge: The CUSEC code is embedded in a free-text field and must be extracted via regex. The INE changes this field’s exact format between annual releases — always inspect the raw CSV before running the ETL.
Missing data: Sections with fewer than 100 households are suppressed by the INE (appear as . or blank). These are filled with 0 before normalization.
Variables contributed to tile schema: renta_abs, renta_norm

3. IGE Indicadores de Poboación por Seccións Censais

Organism: Instituto Galego de Estatística (IGE) — Xunta de Galicia
License: Public domain (Xunta de Galicia open data policy)
Attribution text: Fonte: IGE - Instituto Galego de Estatística
Update frequency: Annual
URL: https://www.ige.gal/igebdt/selector.jsp?COD=6057&idioma=es
Selector code: 6057 — Indicadores de poboación. Datos por seccións censais
Provides demographic indicators by census section, including population totals and age-group breakdowns. UrbanViable uses the under-20 and over-64 age cohorts to compute the jovenes_norm and mayores_norm scoring variables, which allow scouting for businesses whose clientele skews young (toy shops, sports stores) or older (pharmacies, medical services). Format: CSV
Variables contributed to tile schema: poblacion_abs, jovenes_norm, mayores_norm

4. OpenStreetMap Galicia

Organism: OpenStreetMap contributors, extract distributed by Geofabrik
License: Open Database License (ODbL) 1.0
Attribution text: © OpenStreetMap contributors
Update frequency: Continuous (Geofabrik extracts updated daily)
URL: https://download.geofabrik.de/europe/spain/galicia.html
Provides the locations of commercial establishments — shops, restaurants, bars, pharmacies, banks, offices, and similar amenities — as point features. These are spatially joined to census sections to produce a count and density metric for commercial activity. Format: OSM Protocol Buffer Format (.osm.pbf, binary)
Processing library: osmium (Python)
OSM tags extracted:
  • shop=* — all retail establishments
  • amenity=restaurant, cafe, bar, fast_food, bank, pharmacy, clinic, school, supermarket, marketplace
  • office=* — office uses
Normalization: Log-normalized (log(1 + density)) before Min-Max normalization, to prevent urban centers from monopolizing the top of the color ramp. See Scoring Formula for details. Variables contributed to tile schema: actividad_abs, actividad_norm

5. Catastro Vectorial

Organism: Dirección General del Catastro — Sede Electrónica del Catastro
License: Free reuse under Real Decreto 663/2007
Attribution text: Fonte: Sede Electrónica do Catastro
Update frequency: Annual
URL: https://www.sedecatastro.gob.es/DescargaDatos/SECFormularioDescargas.aspx
Provides building-level data including current use classification and construction dates. UrbanViable uses this to characterize the commercial fabric and modernity of each census section’s built environment. Format: ZIP per municipality, containing multiple Shapefile layers
Relevant layers:
  • building — polygon geometries with currentUse field
  • buildingpart — building parts with beginning (construction date) field
Use classification codes:
  • 1_residential, 2_agriculture, 3_industrial, 4_office, 5_retail, 6_publicServices
Variables contributed to tile schema: uso_comercial_norm, antiguedad_norm
antiguedad_norm direction: The column encodes building modernity, not age. A section with newer buildings receives a higher value (closer to 1.0). The formula is minmax_norm(mean_construction_year) — the mean year is normalized directly, so a higher (more recent) mean year produces a higher score.

Update cadence: INE income data (Atlas de Renta) is published with approximately a one-year lag — the 2023 reference year is typically published in late 2024 or early 2025. The ETL is designed to run once per year after each INE release cycle. Running it more frequently than annually will not produce meaningfully different results for the income and demographic variables, though OSM-derived activity data would benefit from more frequent refresh.

Required Attribution Block

The following attribution text must appear in the application footer and on the ¿Cómo usar? page:
Fuente: IGN / INE (secciones censales) · Fuente: INE (Atlas de Renta) ·
Fonte: IGE - Instituto Galego de Estatística · © OpenStreetMap contributors ·
Fonte: Sede Electrónica do Catastro
All five attributions are required simultaneously when the application is in use, as all five sources contribute to the rendered map.

last_update.json Schema

The ETL writes a last_update.json file at the end of each run, recording which sources were incorporated and when. This file is served as the /api/status endpoint and consumed by the DataStatus component in the header.
{
  "updated_at": "2026-04-26T11:06:05.485510+00:00",
  "sections_count": 2134,
  "year_data": "2023",
  "sources": {
    "geometries": "CNIG secciones censales",
    "renta": "INE Atlas de Renta (año 2023)",
    "osm": "OpenStreetMap Galicia (Geofabrik)",
    "catastro": "Sede Electronica del Catastro"
  },
  "variables": [
    "renta_norm",
    "densidad_norm",
    "jovenes_norm",
    "mayores_norm",
    "actividad_norm",
    "uso_comercial_norm",
    "antiguedad_norm"
  ]
}
The variables array documents which _norm columns were computed and included in the current MBTiles file, so the frontend can determine whether to expect non-zero values for any given variable. The year_data field records the INE reference year of the income data, which may differ from the year of the ETL run.

Build docs developers (and LLMs) love