Skip to content

Instantly share code, notes, and snippets.

@arvi1000
Last active April 12, 2019 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arvi1000/01b2f3c471651f335db066611addf275 to your computer and use it in GitHub Desktop.
Save arvi1000/01b2f3c471651f335db066611addf275 to your computer and use it in GitHub Desktop.
Richer map data with rnaturalearth
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)
@jesbrz
Copy link

jesbrz commented Apr 12, 2019

Hi @arvi1000. If I change Asia for Europe this happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment