How cool is this? A map of Western Australia with all state roads marked in only 5 lines of R!
WARoads <- st_read(dsn = "data/", layer = "RoadNetworkMRWA_514", stringsAsFactors = FALSE) WALocalities <- st_read(dsn = "data/", layer = "WA_LOCALITY_POLYGON_shp", stringsAsFactors = FALSE) ggplot(WALocalities) + geom_sf() + geom_sf(data = dplyr::filter(WARoads, network_ty == "State Road"), colour = "red")
Figure 1: Map of WA state roads
Courtesy of the development version of ggplot2 - geomsf is not yet available in the version on CRAN.
Posted on Tuesday 17 October 2017 at 20:35