HistMapR: 12 Months from Coffee Break Musings to a Debut R Package

Post provided by Alistair Auffret

I was really happy to hear that our paper, ‘HistMapR: Rapid digitization of historical land‐use maps in R’ was shortlisted for the 2017 Robert May Prize, and to be asked to write a blog to mark the occasion. The paper was already recommended in an earlier blog post by Sarah Goslee (the Associate Editor who took care of our submission), and described by me in an instructional video, so I thought that I would write the story of our first foray into making an R package, and submitting a paper to a journal that I never thought I would ever get published in.

Background: Changing Land-Use and Digitizing Maps

Land-use change in Europe is often typified by land-drainage to create arable fields.

Land-use change in Europe is often typified by land-drainage to create arable fields.

Land-use change is largely accepted to be one of the major threats to biodiversity worldwide at the moment. At the same time, a warming climate means that species’ ranges need to move poleward – something that can be hampered by changing land use. Quantifying how land use has changed in the past can help us to understand how species diversity and distributions respond to environmental change.

Unfortunately, quantifying this change by digitizing historical maps is a pretty tedious business. It involves a lot of clicking around various landscape features in a desktop GIS program. So, in many cases, historical land use is only analyzed in a relatively small number of selected landscapes for each particular study. In our group at Stockholm University, we thought that it would be useful to digitize maps over much larger areas, making it possible to assess change in all types of landscape and assess biodiversity responses to land-use change at macroecological scales. The question was, how could we do this? Continue reading

Editor Recommendation – HistMapR: Rapid Digitization of Historical Land-Use Maps in R

Post provided by Sarah Goslee

For an ecologist interested in long-term dynamics, one of the most thrilling experiences is discovering a legacy dataset stashed away somewhere.

For an ecologist interested in long-term dynamics, one of the most daunting experiences is figuring how to turn that box full of paper into usable data.

The new tool HistMapR, described in ’HistMapR: Rapid digitization of historical land-use maps in R’ by Alistair Auffret and colleagues, makes one part of that task much easier.

Examples of input (©Lantmäteriet) and output maps from (a–b) the District Economic map and (c–d) the Economic map.

Examples of input (©Lantmäteriet) and output maps from (a–b) the District Economic map and (c–d) the Economic map.

Historical maps with coloured areas denoting different land cover or use are a valuable record, but difficult to analyse. This R package automates much of the time-consuming and tedious process of turning paper maps into classified categorical raster maps.

A map is scanned, imported into R, and the software is trained by clicking in different areas of each category. It then automatically classifies pixels based on which colour they are most similar to. The resulting classification is assessed manually. The process can be repeated with slightly different parameters until a good fit is achieved.

The authors found 80-90% agreement between HistMapR classification and manual digitisation (sources of error included clarity of original maps and scan quality). Using HistMapR reduced the time needed for digitising a series of historical land cover maps from two months to two days. Ecologists interested in long-term dynamics should be cheering!

The HistMapR package is available on GitHub and you can find example scripts on Figshare, so you can get right to work.

HistMapR: Rapid digitization of historical land-use maps in R‘ by Auffret et al. is a freely available Applications article (no subscription required).

Digitizing Historical Land-use Maps with HistMapR

Habitat destruction and degradation represent serious threats to biodiversity, and quantification of land-use change over time is important for understanding the consequences of these changes to organisms and ecosystem service provision.

Historical land-use maps are important for documenting how habitat cover has changed over time, but digitizing these maps is a time consuming process. HistMapR is an R package designed to speed up the digitization process, and in this video we take an example map to show you how the method works.

Digitization is fast, and agreement with manually digitized maps of around 80–90% meets common targets for image classification. We hope that the ability to quickly classify large areas of historical land use will promote the inclusion of land-use change into analyses of biodiversity, species distributions and ecosystem services.

This video is based on the Applications article ‘HistMapR: Rapid digitization of historical land-use maps in R‘ by Auffret et al. This article is freely available to anyone (no subscription required).

The package is hosted on GitHub and example scripts can be downloaded from Figshare.