Static maps in R
Content for Wednesday, November 16, 2022
We are going to take a little more time to understand some of the options for building static maps in R and look at a few packages that can help you build publication-quality maps without having to move into a new software.
Resources
The Drawing Beautiful Maps Programatically with
R,sf, andggplot2chapter by Mel Moreno and Mathieu Basille provides a nice series of blogposts designed to help you build maps withsfobjects.Creating beautiful demographic maps in
Rwith thetidycensusandtmappackages by Zev Ross illustrates the simplicity of mapping withtmap.Displaying time series, spatial and space-time data with R by Oscar Perpiñán Lamigueiro has a bunch of interesting code for producing maps contained in the book by the same name.
Objectives
By the end of today you should be able to:
Construct a map using
ggplot2andtmapCombine vector and raster data in the same map
Add annotations and inset maps to decorate your map
Slides
The slides for today’s lesson are available online as an HTML file. Use the buttons below to open the slides either as an interactive website or as a static PDF (for printing or storing for later). You can also click in the slides below and navigate through them with your left and right arrow keys.
View all slides in new window Download PDF of all slides