Pretty street maps in R with the osmdata package

And ggplot2

This tutorial is going to demonstrate how to make gorgeous maps of cities using streets and other geographic features. This is enabled by the osmdata package.

I borrow heavily from the excellent tutorial at ggplot2tutor.com. I extend this tutorial in order to a) demonstrate deeper functionality of this package; and b) to provide additional instruction and application in ggplot, the tidyverse, and rvest.

I’ve given one of these maps as a gift, printed in a large poster format and framed. You’ll be able to make and customize your own maps and learn some new R functionality along the way.