Skip to content

Instantly share code, notes, and snippets.

@N0taN3rd
Last active February 3, 2016 00:43
Show Gist options
  • Select an option

  • Save N0taN3rd/29d9a21fc5d8b1f3f581 to your computer and use it in GitHub Desktop.

Select an option

Save N0taN3rd/29d9a21fc5d8b1f3f581 to your computer and use it in GitHub Desktop.
ICW2

John Berlin ICW2 Group Members: John Berlin

Scatter Matrix scattermatrix

setwd(getwd())
playerStats <- read.csv('passing-stats-2014.csv')
pairs(~playerStats$Passing.Yards+playerStats$Passing.TD+playerStats$Rate+playerStats$Rushing.Yards+playerStats$Rushing.TD)

Yards Per Player

pyrdsperplayer

library(ggplot2)
setwd(getwd())
playerStats <- read.csv('passing-stats-2014.csv')
yardsConf = data.frame(yrds=playerStats$Passing.Yards,player=playerStats$Player,conf=playerStats$Conf)
ggplot(yardsConf,aes(x=player,y=yrds,fill=conf)) +  geom_bar(stat="identity") + coord_flip()

Average Rushing TD avrushingtd

library(ggplot2)
setwd(getwd())
playerStats <- read.csv('passing-stats-2014.csv')
two <- playerStats[, c("Conf","Rushing.TD")]
ret <- aggregate(two,by=list(two$Conf),FUN="mean")
present <- data.frame(Conf=ret$Group.1,Av.Russing.TD=ret$Rushing.TD)
ggplot(present,aes(x=Conf,y=Av.Russing.TD,fill=Conf)) +  geom_bar(stat="identity") 
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@N0taN3rd

N0taN3rd commented Feb 2, 2016

Copy link
Copy Markdown
Author

pyrdsperplayer

avrushingtd
scattermatrix

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