Contents
How to make a map with TMap in R?
The Making maps with R chapter of the book provides many more context and abundant code examples of map making with tmap and other packages. Other good resources are the vignettes of the sf package, and the website rspatial.org . Hello World! A good place to start is to create a map of the world.
How is the + operator used in TMap?
The + operator can be used to add additional layers to visualize different types of geospatial data. With tmap objects can not only be plotted but can also be saved as objects of the class tmap. The saved object can be easily extended or retrieved at a later time in the console.
Can a TMap object be saved as an object?
With tmap objects can not only be plotted but can also be saved as objects of the class tmap. The saved object can be easily extended or retrieved at a later time in the console. Furthermore, additional layers can be added to the object with tm_shape (), which allows several maps to be combined into one.
Which is the default plot of an SF object?
The default plot of an sf object is a multi-plot of all attributes, up to a reasonable maximum: with a warning when not all attributes can be reasonably plotted. One can increase the maximum number of maps to be plotted by
What can I do with the TMap package?
With the tmap package, thematic maps can be generated with great flexibility. The syntax for creating plots is similar to that of ggplot2, but tailored to maps. This vignette is for those who want to get started with tmap within a couple of minutes.
How to make a GeoComputation map with R?
FIGURE 8.1: New Zealand’s shape plotted with fill (left), border (middle) and fill and border (right) layers added using tmap functions. The object passed to tm_shape () in this case is nz, an sf object representing the regions of New Zealand (see Section 2.2.1 for more on sf objects).