tmap
is an actively maintained open-source R-library for drawing thematic maps. The API is based on A Layered Grammar of Graphics and resembles the syntax of ggplot2
, a popular R-library for drawing charts.
See below the source code for these images.
tmap
is available on . Installation is straightforward:
install.packages("tmap")
For Linux and macOS users who are new to working with spatial data in R, this may fail since additional (non-R) libraries are required (which are automatically installed for Windows users).
Windows No additional installation required.
Linux (Ubuntu) See https://geocompx.org/post/2020/installing-r-spatial-packages-linux/. Please address installation issues in this issue.
macOS See https://www.kyngchaos.com/. Please address installation issues in this issue.
The latest development version can be installed using remotes
.
In order to use the development version of tmap
, it is recommended to use the development version of tmaptools as well:
# install.packages("remotes")
install_github("r-tmap/tmaptools")
install_github("r-tmap/tmap")
# On Linux, with pak
# install.packages("pak")
pak::pak("r-tmap/tmap")
# Or from r-universe
install.packages("tmap", repos = c("https://r-tmap.r-universe.dev", "https://cloud.r-project.org"))
See NEWS for the latest features and improvements and the issue list for discussions of enhancements and bugs.
Do you want to help with the development of the package? Please let us know! Any feedback, requests, tips, or bug reports are welcome!
library(tmap)
Tennekes, M., 2018, tmap: Thematic Maps in R, Journal of Statistical Software, 84(6), 1-39
This paper has been written for tmap
1.11-2. See the reproducible code using tmap
2.x.
tmap: what is changed in recent versions?
- Creating thematic maps in R (OpenGeoHUB Summer School 2019)
- Plotting spatial data with R (eRum 2018)
- Exploring and presenting maps with tmap (useR!2017)
- tmap: creating thematic maps in a flexible way (useR!2015)]
- Geocomputation with R; Making maps with R, Robin Lovelace, Jakub Nowosad, Jannes Muenchow
- R tip: Create maps in R
- 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 visualizing spatial data in R
- Blog post SpatialControl
- 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 Visualizing spatial data: from base to shiny - workshop
- Stack Overflow questions (#tmap)
There are two main places to get help with tmap
:
- 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.