Skip to contents

Thematic Maps

tmap tmap-package
Thematic Map Visualization

Create a quick plot

qtm()
Quick thematic map plot

Stacking tmap elements

`+`(<tmap>)
Stacking of tmap elements

Specify spatial data

tm_shape()
Shape (spatial object) specification
tm_crs()
Set the map projection (CRS)

Add data-driven map layers

Specify facets

Add auxiliary map layers

tm_basemap() tm_tiles()
Map layer: basemap / overlay tiles
tm_rgb() tm_rgba() opt_tm_rgb()
Map layer: rgb images
tm_grid()
Coordinate grid / graticule lines
tm_graticules()
Coordinate grid / graticule lines

Add map components

tm_title() tm_title_in() tm_title_out()
Map component: title
tm_credits()
Map component: (credits) text
tm_compass()
Map component: compass
tm_scalebar()
Map component: scale bar
tm_logo()
Map component: logo
tm_minimap()
Map component: minimap
tm_mouse_coordinates()
Map component: mouse coordinates
tm_xlab() tm_ylab()
Map: x and y labels

Set scale for a visual variable

Always use those in this form <vv>.scale = tm_scale*()

Set legend for a visual variable

Always use those in this form <vv>.legend = tm_legend*()

Set charts for a visual variable

Always use those in this form <vv>.chart = tm_chart*()

Set layout options

tm_style() tm_layout()
Layout options
tm_options()
tmap options
tm_view()
View mode options
tm_group()
Layer group control
tm_plot()
Plot mode options

Set options globally for tmap

tm_check_fix() tmap_options() tmap_options_mode() tmap_options_diff() tmap_options_reset() tmap_options_save()
tmap options
tmap_style()
Set or get the default tmap style
tmap_style_catalogue() tmap_style_catalog()
Create a style catalogue
tmap_mode() ttm() ttmp()
Set tmap mode to static plotting or interactive viewing
tmap_devel_mode()
Set the development mode
tmap_design_mode()
Set the design mode

Export a tmap object

tmap_save()
Save tmap
tmap_leaflet() tmap_grob()
Export tmap to the format of the used graphics mode

Datasets included in tmap

World
World dataset
World_rivers
Spatial data of rivers
land
Spatial data of global land cover
metro
Spatial data of metropolitan areas
NLD_prov NLD_muni NLD_dist
Netherlands datasets

Use tmap in shiny

renderTmap() tmapOutput() tmapProxy() tm_remove_layer()
Wrapper functions for using tmap in shiny
tmap_last()
Retrieve the last map to be modified or created
print(<tmap>) knit_print(<tmap>)
Draw thematic map
tmap_animation()
Create animation
tmap_arrange() knit_print(<tmap_arrange>) print(<tmap_arrange>)
Arrange small multiples in grid layout

Helper functions

tm_const()
tmap function to define a constant visual value
tm_pos() tm_pos_in() tm_pos_out() tm_pos_on_top() tm_pos_auto_out() tm_pos_auto_in()
Set the position of map components
tm_seq()
Specify a numeric sequence
tm_vars()
tmap function to specify variables
tm_plot_order()
Determine plotting order of features
theme_ps()
ggplot2 theme for proportional symbols
tmap_tip()
Print a random tip to the console
tmap_icons() marker_icon()
Specify icons