tmap v1.11

Thematic Maps

Thematic maps are geographical maps in which spatial data distributions are visualized. This package offers a flexible, layer-based, and easy to use approach to create thematic maps, such as choropleths and bubble maps.


tmap: thematic maps in R

Build Status AppVeyor Build Status License CRAN Downloads

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.

Classic World Map Bubble Map Bubble Map World facets US Choropleth US Choropleth London Crimes London Crimes London Crimes London Crimes


tmap is available on CRAN. The latest version is 1.10 (2017-05-10).

The tmap packages relies on the R packages rgdal and rgeos, which depend on the external libraries gdal, proj.4 and geos. On Windows, these are embedded in rgdal and rgeos. On Linux (Ubuntu), these libraries can be installed as follows:

sudo apt-get install libgdal-dev
sudo apt-get install libproj-dev
sudo apt-get install libgeos-dev

See source pages for gdal, proj, and geos. For Mac OS users, see

Also, tmap relies indirectly on the R package V8. For Linux (Ubuntu), the v8 library needs to be installed for this:

sudo apt-get install libv8-3.14-dev


Odd numbered versions will be development versions and even numbered versions stable CRAN releases.

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)


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 me know! Any feedback, requests, tips, or bug reports are welcome!



Vignettes and Examples

tmap in a nutshell

tmap modes: plot and interactive view

Example 1: Metropolitan Areas

Example 2: Classic World Map

Example 3: Two World Views

Example 4: Obesity in the United States

Example 5: Crimes in Greater London


Other resources

Getting help

There are two main places to get help with tmap:

  1. 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.
  2. If you have a request or if think your problem is caused by a bug, please open an issue, preferably with are reproducible example.

Functions in tmap

Name Description
World World, Europe, and Netherlands map
animation_tmap Create animation
qtm Quick thematic map plot
rivers Spatial data of rivers
+.tmap Stacking of tmap elements
print.tmap Draw thematic map
last_map Retrieve the last map to be modified or created
metro Spatial data of metropolitan areas
tm_xlab Axis labels
land Spatial data of global land cover
save_tmap Save tmap
tm_compass Map compass
theme_ps ggplot2 theme for proportional symbols
tm_add_legend Add manual legend
style_catalogue Create a style catalogue
tm_credits Credits text
tm_iso Draw iso (contour) lines with labels
tm_layout Layout of cartographic maps
tm_facets Small multiples
tm_grid Coordinate grid lines
tm_fill Draw polygons
tm_raster Draw a raster
tm_scale_bar Scale bar
tm_shape Specify the shape object
tmap_mode Set tmap mode to static plotting or interactive viewing
tmap_options Options for tmap
tm_lines Draw spatial lines
tm_logo Logo
tmap_style Set the default tmap style
tm_view Options for the interactive tmap viewer
tmap-element tmap element
tmap-package Thematic Map Visualization
tmap_arrange Arrange small multiples in grid layout
tm_symbols Draw symbols
tm_text Add text labels
tmap_icons Specify icons
tmap_leaflet Create a leaflet widget from a tmap object
No Results!

Vignettes of tmap

No Results!


Include our badge in your README