We’ve finally arrived at creating our first maps based on the data we imported and cleaned in the previous sessions. Let’s start super simple.
Yet, remember that we had to fix geometries with sf::st_make_valid() during the session? tmap has a global option to do that automatically for you. Now that’s nice, right? Run it first in order to conduct the exercises.
tmap::tmap_options(check.and.fix = TRUE)
corona_cologne dataset. Create a map with only the outline of Cologne is visible.
tm_XYZ() functions for polygon data.
col argument.
col argument is within the function call for the polygons.
a_7_100.)
viridis. You can also try magma, plasma, inferno, and cividis. Generally, it is worthwhile to run the function tmaptools::palette_explorer() to have a look at different color palettes.
?tm_layout
?tm_compass)
hospitals_cologne data and plot them as points onto the map. Chose a proper color.
?tm_compass)