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.


News

version 1.6-1

  • improved projections: code is more efficient now and shortcuts are renewed. Also, CRS objects are now supported for all project arguments (e.g. tm_shape, set_projection), and as.CRS is added to get_projection and get_proj4.
  • Rscript works: methods is moved from imports to depends

version 1.6

  • [!] tm_symbols added, to create proportional symbol maps: besides bubbles, it also supports other symbol shapes, png icons, and small ggplot2 plots
  • [!] imported cartogram function from cartogram package (tnx Sebastian!)
  • [!] reverse geocoding function rev_geocode_OSM added
  • [!] tm_logo added
  • added popup.vars to base layer functions
  • bounding box (argument bbox in tm_shape) working in view mode
  • geocode_OSM improved: a SpatialPointsDataFrame can now be returned
  • last_map added, which retrieves the last produced map
  • crop_shape can also handle polygons as cropping area
  • append_data improved; the under and over coverage information can be retrieved with under_coverage and over_coverage
  • interpolate parameter added to tm_rasters
  • added support for custom legend formating functions
  • legend items can now be stacked horizontally
  • legend width and height can be determined fully manually (with negative values for legend.height and legend.width)
  • argument interval.closure added to layer functions to determine where intervals are closed
  • added warnings for non-supported elements in view mode
  • fixed raster brick bug
  • fixed save_tmap/get_asp_ratio bug

version 1.4-1

  • add just argument as anchor for text labels, legend and attributes position
  • map attributes (such as scale bar) can be placed outside the frame
  • added tm_xlab and tm_ylab
  • RGB raster support, see tm_raster
  • static text (i.e titles, credits, legend titles, labels) support expressions
  • updated Europe shape: projection and boundig box are now consistent with Eurostat publications
  • added crop_shape, a convenient wrapper around raster::crop

version 1.4

  • [!] interactive mapping added. Now, tmap has two modes: "plot" (graphics device) and "view" (interactive viewer, which is a leaflet widget)
  • [!] facets (small multiples) improved: group by two variables possible, panel layout added, missing data can be shown separately
  • added geocode_OSM, a function to find coordinates
  • improved set_projection for raster objects
  • added double_line and offset_line
  • added insets option in save_tmap
  • improved default settings for contrast arugment regarding seq and div palettes
  • improved automatic positions of legend and map attributes (more specifically, legend snaps to righthand-side without need to adjust legend.width, and legend and attributes position improved when double frame is enabled)
  • improved tm_layouts's design.mode output
  • lwd parameter added to tm_scale_bar and tm_compass
  • fixed bb bug

version 1.2-1

  • fixed bug with PROJ.4 version < 4.9.1
  • improved error messages
  • rd projection reset to +init=epsg:28992, since the latter now has a +towgs item
  • fixed bug of print.tmap returned object

version 1.2

  • added read_osm, a function to read Open Street Map data
  • added bb, a handy bounding box function
  • added layout themes with tm_style and tm_format
  • added automatic text labeling
  • added interactive SVG, that can be opend in RStudio (see itmap)
  • added map compass (tm_compass)
  • added text aesthetics size and col
  • added automatic map coloring
  • added earth boundary, which is useful for projected world maps
  • added warped grid lines (e.g. long-lat lines can be shown in projected maps)
  • added new color scale modes (enabled with style="cat", "cont", and "order")
  • added save_tmap
  • added smooth_map, smooth_raster_cover, sample_dots, points_to_raster and poly_to_raster
  • added read_GPX
  • improved automatic layout regarding title, legend, and map attributes
  • layer arguments, e.g. palette, can take multiple values for small multiples
  • improved grid lines (labels can also be placed outside frame)
  • arguments free.coords and drop.shapes of tm_facets working
  • updated examples and vignette
  • fixed viewport bug
  • see ?tmap for a structured overview of all tmap functions

version 1.0

  • added tm_credits and tm_scale_bar
  • added is.master argument to tm_shape, that determines which shape is the master
  • added unit and unit.size arguments to tm_shape that correlates the coordinates with the desired units
  • added tm_polygons, which is a combination of tm_fill and tm_borders
  • fixed several small bugs

version 0.8

  • added tm_raster
  • improved legend behaviour: legend titles should be set in the layer functions (instead of in tm_layout)
  • removed crop_shape, since raster::crop does the same job, but, but faster
  • out-of-scope functions migrated to spatialToolbox package, available on github.com/mtennekes/spatialToolbox

version 0.7.1

  • fixed big in scale parameter (global scale set in tm_layout)

version 0.7

  • enhanced small multiples (tm_facets) with respect to scaling and free coordinate scales
  • added alpha argument to tm layers for transparency
  • added text shadow argument
  • added function split to split a shape object and sbind to combine shape objects.
  • added automatic legend positioning when legend.position=NULL
  • improved number formatting in legend
  • improved inner.margins and outer.margins. Both can take one value (e.g. outer.margins=0 rather than outer.margins=c(0,0,0,0))
  • improved qtm: tm_facets parameters working, and also fixed scale parameter bug
  • improved all examples for approx_areas, calc_densities
  • fixed bug regarding drawing a frame with outer.margins=0.
  • fixed bug in plotting blubbles
  • improved temp file handling in animation_tmap
  • added functions to get and set polygon directions, and to calculate the intersection ratios of polygons (intersection_shapes)

version 0.6

  • this is the the first CRAN version
  • a newer version may be available on https://github.com/mtennekes/tmap
  • to get started, see the package vignette 'tmap in a nutshell' and the help files
  • if you have any questions or suggestions, please contact me (mtennekes at gmail dot com)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("tmap")

1.8-1 by Martijn Tennekes, 21 days ago


https://github.com/mtennekes/tmap


Report a bug at https://github.com/mtennekes/tmap/issues


Browse source code at https://github.com/cran/tmap


Authors: Martijn Tennekes [aut, cre], Joel Gombin [ctb], Sebastian Jeworutzki [ctb], Kent Russell [ctb], Richard Zijdeman [ctb]


Documentation:   PDF Manual  


Task views: Official Statistics & Survey Methodology, Analysis of Spatial Data


GPL-3 license


Imports tmaptools, sp, raster, grid, rgdal, rgeos, RColorBrewer, classInt, spdep, htmltools, htmlwidgets, leaflet, mapview, stats

Depends on methods

Suggests rmarkdown, knitr, png, cartogram, ggplot2, dplyr, tidyr


Suggested by stplanr, tmaptools.


See at CRAN