R: Inserting a geom_sf layer on top of another geom_sf layer

Advertisements I would like to plot a map of France using geom_sf and then add a layer to map Germany. Here’s what I did library(ggplot2) library(sf) library(raster) fr_sf = st_as_sf(getData("GADM",country="FRA",level=1)) de_sf = st_as_sf(getData("GADM",country="DEU",level=0)) ggplot(fr_sf) + geom_sf(fill = "gray90") + geom_sf(de_sf, fill = "gray90") but I get an error mapping` must be created by `aes() I… Read More R: Inserting a geom_sf layer on top of another geom_sf layer

{{sf}} commands now giving "Error: (converted from warning) message

Advertisements Some of my code which previously yielded a warning message is now giving an error. Here is an example: library(sf) states <- tigris::states(cb = T) %>% select(state = NAME) %>% filter(state == "Wisconsin") wi.counties <- tigris::counties(state = "WI", cb = T) %>% select(county = NAME) st_crs(states) == st_crs(wi.counties) [1] TRUE intersection <- st_intersection(states, wi.counties)… Read More {{sf}} commands now giving "Error: (converted from warning) message