Show & tell: making historical thematic maps in R

Show & tell: making historical thematic maps in R


In this session I will give an informal introduction on how to make thematic maps in R, specifically for historians. The formula is show and tell: not a course as such, but going together through a worked example to show what is possible, how to do the most common steps, and where you can find information to further apply and teach yourself. We’ll discuss (dis)advantages of using R for thematic maps, and use 19th century historical spatial and census-data in the worked example to illustrate.

Doctoral training program KU Leuven Faculty of Arts – Digitalisation of geographic information
Leuven, Belgium


The worked examples that we will be disussing are available online. You can also download (41.8MB) the entire set of materials, or clone from Github.

The workshop material is structured in the form of R Markdown-documents, with code you can run interspersed with comments, tips, and links to further documentation and tutorials.

Practical info

  • Time session : 11.00h – 13.00h.
  • Language: English.
  • Expected knowledge: familiarity with R is an advantage, but the material is aimed at illustration and self-study, so everyone should be able to follow along.
  • Please send an email if you wish to (no longer) attend.


KU Leuven, Faculty of Arts, Erasmusplein 2 , 3000 Leuven, room MSI 01.20 (info on facilities and accesability).


In the last few years the R ecosystem has seen a sizeable expansion of applied spatial analysis and visualisation packages. This allows researchers without a GIS-background or specialized software to more easily integrate spatial data into their work(flow).

Using these packages, the show-and-tell sessions focus on how to make thematic maps – more specifically choroplet maps. In these maptypes areas are colored in proportion to the measurement of a variable being displayed on the map, such as income or unemployment rates. This can be overlayed with other spatial features, such as dots for cities, lines for railways, etc.

The worked example uses historical 1851 census-data from The occupational structure of Britain 1379-1911-project to demonstrate how to load, explore and plot spatial data, with a focus on showing how spatial data can be integrated in an “regular” R tidyverse data-analysis workflow.

The worked example demonstrates how to make static thematic maps using the R library tmap, and interactive thematic maps for data-exploration using the mapview library.

The intended audience are basic R users – or those interested in seeing what R can do – who wish integrate spatial data into their “regular” (exploratory) data-analysis workflow. More advanced GIS-topics such as projection fall outside of the scope.

The worked examples and code are provided in advance in the form of online (R Markdown) documents and downloadable material you can run and adapt yourself.

Maarten Hermans
Senior research associate