Learn R Programming

tmap (version 1.11)

tmap-package: Thematic Map Visualization

Description

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. It is based on the grammar of graphics, and resembles the syntax of ggplot2.

Arguments

Quick plotting method

qtm Plot a thematic map
--------------------------- ---------------------------------------------------------------------------------------------------

Main plotting method

Shape specification:

tm_shape Specify a shape object
--------------------------- ---------------------------------------------------------------------------------------------------

Aesthetics base layers:

tm_polygons Create a polygon layer (with borders)
tm_symbols Create a layer of symbols
tm_lines Create a layer of lines
tm_raster Create a raster layer
tm_text Create a layer of text labels

Aesthetics derived layers:

tm_fill Create a polygon layer (without borders)
tm_borders Create polygon borders
tm_bubbles Create a layer of bubbles
tm_squares Create a layer of squares
tm_dots Create a layer of dots
tm_markers Create a layer of markers
tm_iso Create a iso/contour lines
--------------------------- ---------------------------------------------------------------------------------------------------

Facetting (small multiples)

tm_facets Define facets
--------------------------- ---------------------------------------------------------------------------------------------------

Attributes:

tm_grid Create grid lines
tm_scale_bar Create a scale bar
tm_compass Create a map compass
tm_credits Create a text for credits
tm_logo Create a logo
tm_xlab and tm_ylab Create axis labels
--------------------------- ---------------------------------------------------------------------------------------------------

Layout element:

tm_layout Adjust the layout (main function)
tm_legend Adjust the legend
tm_view Configure the interactive view mode
--------------------------- ---------------------------------------------------------------------------------------------------

Change options:

tmap_mode Set the tmap mode: "plot" or "view"
ttm Toggle between the modes
tmap_style Set the default style
--------------------------- ---------------------------------------------------------------------------------------------------

Create icons:

tmap_icons Specify icons for markers or proportional symbols
--------------------------- ---------------------------------------------------------------------------------------------------

Output functions

print Plot in graphics device or view interactively in web browser or RStudio's viewer pane
last_map Redraw the last map
tmap_leaflet Obtain a leaflet widget object
animation_tmap Create an animation
save_tmap Save thematic maps (both in plot and view mode)
--------------------------- ---------------------------------------------------------------------------------------------------

Spatial datasets

World World country data (spatial polygons)
Europe European country data (spatial polygons)
NLD_prov Netherlands province data (spatial polygons)
NLD_muni Netherlands municipal data (spatial polygons)
metro Metropolitan araes (spatial points)
rivers Rivers (spatial lines)
land Global land cover (spatial grid)
--------------------------- ---------------------------------------------------------------------------------------------------

Details

This page provides a brief overview of all package functions. See vignette("tmap-nutshell") for a short introduction with examples. See vignette("tmap-modes") for a short demo of the two output modes: plot and interactive view.

See Also

vignette("tmap-nutshell")

vignette("tmap-modes")