Skip to content

Instantly share code, notes, and snippets.

@medewitt
Created January 2, 2019 20:39
Show Gist options
  • Save medewitt/d01877741fdbd39cbc7493ba14442ee3 to your computer and use it in GitHub Desktop.
Save medewitt/d01877741fdbd39cbc7493ba14442ee3 to your computer and use it in GitHub Desktop.
library(tidyverse)
humphries <- tribble(
~"Year", ~"G", ~"Rec", ~"Yards", ~"Avg", ~"TD",
2011, 14, 15, 130, 8.7, 0,
2012, 13, 41, 280, 6.8, 1,
2013, 12, 41, 483, 11.8, 2,
2014, 13, 30, 204, 6.8, 0) %>%
mutate(player = "Humphries") %>%
select(Year, Rec, Avg, TD, player)
grisham<-tribble(
~"Year", ~"School", ~"Conf", ~"Class", ~"Pos", ~"G", ~"Rec", ~"Yards", ~"Avg", ~"TD",
2005, "Clemson", "ACC", "FR", "WR", 11, 10, 101, 10.1, 0,
2006, "Clemson", "ACC", "SO", "WR", 13, 25, 264, 10.6, 3,
2007, "Clemson", "ACC", "JR", "WR", 13, 60, 653, 10.9, 4,
2008, "Clemson", "ACC", "SR", "WR", 13, 37, 372, 10.1, 1) %>%
mutate(player = "Grisham") %>%
select(Year, Rec, Avg, TD, player)
renfroe <- tribble(
~"Year", ~"Rec", ~"Yards", ~"Avg", ~"LNG", ~"TD",
2018, 47, 534, 11.4, 40, 1,
2017, 60, 602, 10.0, 61, 3,
2016, 44, 495, 11.3, 35, 6,
2015, 33, 492, 14.9, 57, 5,) %>%
mutate(player = "Renfroe") %>%
select(Year, Rec, Avg, TD, player)
combined_white <- rbind(humphries, grisham, renfroe)
combined_white %>%
ggplot(aes(Year, Rec, group = player, color = player))+
geom_line(size = 2)+
scale_x_continuous(breaks = seq(2005, 2018, 1))+
theme_minimal()+
labs(
title = "Clemson Posession Receiver Receptions"
)+
theme(axis.text = element_text(size = 14))
combined_white %>%
ggplot(aes(Year, TD, group = player, color = player))+
geom_line(size = 2)+
scale_x_continuous(breaks = seq(2005, 2018, 1))+
theme_minimal()+
labs(
title = "Clemson Posession Receiver Touch Downs",
caption = "ESPN and Shit"
)+
theme(axis.text = element_text(size = 14))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment