Skip to contents

English · Castellano · Català

mapSpainHist is an R package with the municipal boundaries of Spain for each population census between 1900 and 2001 (1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1981, 1991 and 2001) and the higher-level territorial units built from these municipalities: provinces, judicial districts and historical electoral districts. It also includes the basic census figures of every municipality between 1842 and 2011.

All maps come from a single partition of the territory, so they have no gaps or overlaps and can be aggregated without leaving holes between units.

Important warning. The shape of most historical municipalities is an approximate reconstruction. The maps are especially useful to represent municipal data graphically, but they must be used with caution when geographic variables such as area or distances matter. See the methodology.

Installation

# Development version, from GitHub
# install.packages("remotes")
remotes::install_github("pauvallprat/mapSpainHist")

The geometries are downloaded from Zenodo the first time they are used (about 6.5 MB) and stored in a local cache; afterwards they are read directly from disk.

Usage

library(mapSpainHist)

# Municipalities of the 1930 census, with census figures
m1930 <- esp_get_munic_hist(1930)

# Canary Islands next to the Peninsula, as in the `mapSpain` package, with their box
m1930 <- esp_get_munic_hist(1930, moveCAN = TRUE)
library(ggplot2)
ggplot(m1930) + geom_sf() + geom_sf(data = mapSpain::esp_get_can_box())

# Higher-level units
esp_get_prov_hist(1930)   # provinces (available for every census)
esp_get_pj_hist(1910)     # judicial districts (1900-1930)
esp_get_circ_hist(1920)   # districts for the Cortes of the Restoration
esp_get_circ_hist(1933)   # constituencies of the Second Republic (also 1931 and 1936)

# Tables
head(censos)    # census figures of every municipality, 1842-2011
head(unitats)   # higher-level unit of every municipality
Function Content Years
esp_get_munic_hist() Municipalities 1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1981, 1991, 2001
esp_get_prov_hist() Provinces the same censuses
esp_get_pj_hist() Judicial districts 1900, 1910, 1920, 1930
esp_get_circ_hist() Districts for the Cortes during the Restoration (1920) and constituencies of the Second Republic 1920, 1931, 1933, 1936

Problems and suggestions

If you find an error in the maps or the data, or have a suggestion, use the contact form, write to pau.vall@ub.edu or open an issue on GitHub.

How to cite

If you use the package and/or its data, please cite them. You can get the reference with:

citation("mapSpainHist")

Licenses

The reference municipal boundaries derive from SIANE (© Instituto Geográfico Nacional, CC BY 4.0), downloaded for the earliest year available in the mapSpain package; census figures come from the population censuses of the INE; municipal changes from the document by the Ministerio de Administraciones Públicas Variaciones de los municipios de España desde 1842. See the methodology for details.