Last active
May 2, 2019 23:14
-
-
Save rafapereirabr/b360b92dbaad4d78aef26c612d2ffcfe to your computer and use it in GitHub Desktop.
Simple code to create a world map of cities with population > than 40K in R
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(tidyverse) | |
library(maps) | |
temp <- maps::world.cities %>% | |
ggplot() + | |
geom_point(aes(x=long, y=lat, size=pop, fill=pop, color=pop), alpha=.1, show.legend = FALSE) + | |
theme_void() + | |
coord_equal() | |
ggsave( temp, file="pop.png", dpi = 300, width = 20, height = 10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment