Last active
April 12, 2019 17:24
-
-
Save arvi1000/01b2f3c471651f335db066611addf275 to your computer and use it in GitHub Desktop.
Richer map data with rnaturalearth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rnaturalearth) | |
library(tidyverse) | |
world <- ne_countries(scale = "medium", returnclass = "sf") | |
world %>% | |
filter(continent == 'Asia') %>% | |
ggplot() + | |
geom_sf(aes(fill=income_grp), | |
color='#A98743', size=0.1) + | |
# vandergrinten | |
coord_sf(crs = '+proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +datum=WGS84 +units=m +no_defs ', | |
datum = NA) + | |
theme(plot.background = element_rect(fill = '#EEEBD3'), | |
legend.background = element_blank(), | |
panel.background = element_blank()) + | |
labs(fill = 'Income Group') + | |
scale_fill_brewer(palette = 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @arvi1000. If I change Asia for Europe this happens.