tmap: thematic maps in R
tmap is an actively maintained open-source R-library for drawing thematic maps, written by Martijn Tennekes. The API is based on A Layered Grammar of Graphics by Hadley Wickham and resembles the syntax of
ggplot2, a popular R-library for drawing charts.
tmap is available on CRAN (version 2.1-1). Installation is straightforward:
However, for some operating systems require additional libraries. The installation procedure is as follows:
Windows No additional installation required.
The latest development version can be installed using
devtools. In order to use the development version of
tmap, it is recommended to use the development version of
tmaptools as well (see tmaptools):
library(devtools) install_github("mtennekes/tmaptools") install_github("mtennekes/tmap")
Do you want to help with the development of the package? Please let me know! Any feedback, requests, tips, or bug reports are welcome!
This paper has been written for
tmap 1.11-2. The content of this paper using
tmap 2.x is the following:
- full reproduction code using tmap 2.x
- Example from Section 4.1: Metropolitan Areas
- Example from Section 4.2: Classic World Map
- Example from Section 4.3: Two World Views
- Example from Section 4.4: Obesity in the United States
- Example from Section 4.5: Crimes in Greater London
- [Plotting spatial data with R] (eRum 2018) https://github.com/mtennekes/tmap-workshop
- Exploring and presenting maps with tmap (useR!2017) (Abstract) (Presentation)
- tmap: creating thematic maps in a flexible way (useR!2015)
- Geocomputation with R; Making maps with R, Robin Lovelace, Jakub Nowosad, Jannes Muenchow
- Working with Spatial Data and using tmap, Samantha A. Alger
- Computer World: Mapping in R just got a whole lot easier
- National Socio-Environmental Synthesis Center: Maps in R
- Introduction to visualising spatial data in R
- Blog post StatialControl
- Blog post TWIAV
- Computer World: Create maps in R in 10 (fairly) easy steps
- Computer World: Great R packages for data import, wrangling and visualization
- Tutorial Visualising spatial data: from base to shiny - workshop
- Stack Overflow questions (#tmap)
There are two main places to get help with
- stackoverflow is a great source of answers to common tmap questions. It is also a great place to get help, once you have created a reproducible example that illustrates your problem. Please tag your questions with tmap.
- If you have a request or if think your problem is caused by a bug, please open an issue, preferably with a reproducible example.