Skip to content

pycensus.census.countries.spain.mobility.mitma

MITMA open mobility data (mobile-phone study, movilidad-opendata.mitma.es) -> distance and long-distance columns per INE census section.

Public files carry no mode of transport (see README); they do carry trips, great-circle distance bands and trip-kilometres for all of Spain by MITMA district (zonificacion_distritos). A trip is attributed to the home district of the traveller: the origin when the origin activity is casa, else the destination when the destination activity is casa. Trips between two non-home activities are left out. Values are per day-average of the chosen dates divided by the district's INE population, then given to every census section of the district (relacion_ine_zonificacionMitma.csv maps sections to districts exactly, no spatial overlay needed).

Columns (year = year of the dates): {year}_trips_per_person, {year}_distance_km_per_person, {year}_long_distance_trip_share (distance band >50 km), {year}_long_distance_km_share, {year}_trip_share_{band} for the published bands 0.5-2, 2-10, 10-50 and >50 km.

load_sections(year=2024, dates=None, cache_dir=None)

Distance / long-distance columns indexed by INE census section (CUSEC 10 digits).

Parameters:

Name Type Description Default
year int

Survey year.

2024
dates Optional[Iterable[str]]

Days averaged (YYYYMMDD); None = the defaults.

None
cache_dir Optional[str]

Cache folder; None = the pycensus cache.

None

Returns:

Type Description
DataFrame

One row per census section.

load_commuting(year=2024, months=('202403', '202406', '202410'), cache_dir=None)

Regular trips from the home district, by how often, on census sections.

Columns: {year}_regular_flows_{bin} for all six published bins 1-2, 3-4, 5-7, 8-10, 11-13, 14 (person-pair counts per month, split evenly among the district's sections; 1-2 days is incidental travel), {year}_regular_flows_share_{bin} (bins 3-4 .. 14 over the regular flows, 3+ days), {year}_regular_flows_up_to_3_days_week_share_{min,est,max} (pairs with 3-6 of 14 days over all pairs with 3+ days; est counts 2/3 of the 5-7 bin, min counts none of it, max all of it).

Parameters:

Name Type Description Default
year int

Survey year.

2024
months Iterable[str]

Months averaged (YYYYMM).

('202403', '202406', '202410')
cache_dir Optional[str]

Cache folder; None = the pycensus cache.

None

Returns:

Type Description
DataFrame

One row per census section.