Created
May 16, 2018 15:37
-
-
Save aleszu/276dc7c8765a8d6d037b628ad68a82fb to your computer and use it in GitHub Desktop.
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(ggplot2) | |
library(tidyverse) | |
library(fiftystater) | |
mapdata <- read.csv("state-medal-count.csv", header=TRUE, stringsAsFactors=FALSE) | |
mapdata %>% glimpse() | |
data("fifty_states") | |
ggplot() + geom_polygon( data=fifty_states, aes(x=long, y=lat, group = group),color="white", fill="grey10" ) | |
ggplot() + geom_polygon(data=fifty_states, aes(x=long, y=lat, group = group),color="white", fill="grey92" ) + | |
geom_point(data=mapdata, aes(x=lon, y=lat, size = medals), color="black") + | |
scale_size(name="", range = c(2, 20)) + | |
guides(size=guide_legend("GABF medals 1985-2015")) + | |
theme_void() | |
ggsave("beermap.png", width=14.4,height=7.43,units="in") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment