I'm trying to make a simple faceted plot of the EU, but overlaying a basemap of the EU. I'm just wondering if it's possible to accomplish this?
Right now, my code is as follows, which produces the following:
mydf %>%
ggplot(aes(x = x, y = y, group = name)) +
geom_line() +
coord_polar() +
facet_geo(~country, grid = "eu_grid1")
I am able to easily produce a map of Europe using the following:
world <- map_data("world")
world %>%
filter(region %in% eu_grid1$name) -> europe
ggplot() +
geom_polygon(data=europe, aes(x=long, y=lat, group=group), color="black", fill="white")
But cannot figure out how to sync (if possible) and layer them. Thank you!
Yes, this is possible. I'm not sure how well it works visually though. Obviously I don't have your data, but I'll use a built in dataset from
geofacet
to demonstrate.Created on 2022-03-09 by the reprex package (v2.0.1)