I am making a map using sf::world, where I would only like to plot Europe, Africa, Asia and Ocenia:
library(sf)
map = spData::world %>%
dplyr::filter(!continent %in% c("South America", "North America", "Antarctica"))
ggplot() +
geom_sf(data=map, aes(geometry=geom))
As it stands, bits of Russia and Oceania are wrapping around and making a lot of empty space on the figure.
I have tried various combinations of st_crop from this answer, to crop out the whitespace doing:
st_crop(map, xmin=-30, xmax=180, ymin=-180, ymax=180)
But it seems to return a blank map with no geometries. I feel like the solution is a simple use of this function, but I can't get there.


