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
# Parse MA Gubernatorial Race 2010 | |
############################# | |
# Purpose: use R to scrape data and plot results in real-time | |
# NOTE: I am still new to R, so this is very basic! | |
# source of code snippet as help for this: | |
# http://stackoverflow.com/questions/1395528/scraping-html-tables-into-r-data-frames-using-the-xml-package | |
############################# |
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
####################################################################### | |
# Create social network from NCES 2008 migration data | |
# Helpful resources: | |
# R in a Nutshell -- Adler | |
# R for SAS and SPSS Users | |
# statmethods.net -- Quick R | |
# igraph.sourceforge.net | |
####################################################################### | |
# Load libraries |
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
################################################################ | |
# Author: @BrockTibert | |
# Date: January 2011 | |
# | |
# Purpose: Study the relationship of freshmen yield rate and grad rate | |
# Comes from Chronicle blog post on research done about college selection | |
# and more likely to be selected if have higher grad rate. Let's use | |
# actual data to see if this is true. | |
# | |
# http://chronicle.com/blogs/headcount/how-graduation-rates-shape-college-choice/27770 |
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
############################################################################### | |
# Author: @BrockTibert | |
# | |
# Used: R Version 2.12.1, Windows 7 Pro, StatET Plugin for Eclipse | |
# | |
# | |
############################################################################### | |
#----------------------------------------------------------------------- | |
# set up script level basics |
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
############################################################################### | |
# Author: @BrockTibert | |
# Purpose: Collect Historical NHL Skater Stats 1960 - 2011 (in progress) | |
# Date: February 2011 | |
# | |
# Used: R Version 2.12.1, Windows 7 Pro, StatET Plugin for Eclipse | |
# | |
# # Copyright (c) 2011, under the Simplified BSD License. | |
# For more information on FreeBSD see: http://www.opensource.org/licenses/bsd-license.php | |
# All rights reserved. |
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
############################################################################### | |
# Date: Feb 13, 2011 | |
# Author: @BrockTibert | |
# Filename: NHL PBP and Tableau.R | |
# R version: 2.12.1 | |
# | |
# Purpose: Grab the Play by Play event data and visualize live using Tableau | |
# | |
# | |
# Copyright (c) 2011, under the Simplified BSD License. |
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
## basics | |
# R 2.12.2 | |
# windows xp; Yes, I know | |
## libraries | |
library(XML) | |
library(plyr) | |
library(lubridate) | |
library(ggplot2) |
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
# Source the file with the Grab Skaters function | |
setwd("~/My Dropbox/Eclipse/Projects/R/NHL/Blog Posts/Scripts") | |
source("SkaterStats.R") | |
## set the working directory | |
setwd("~/My Dropbox/Eclipse/Projects/R/NHL/Blog Posts/30 Goals 100 PIM") | |
## set the seasons | |
SEASON <- as.character(c(1960:2004, 2006:2011)) |
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
# set working directory | |
setwd("/My Dropbox/Projects/NHL Defensemen 2011 performance") | |
# load the libraries I commonly use | |
library(XML) | |
library(plyr) | |
library(lubridate) | |
library(ggplot2) | |
# grab the data |
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
#=================================================================== | |
# load the libraries | |
#=================================================================== | |
library(XML) | |
library(plyr) | |
#=================================================================== | |
# grab the first page of data | |
#=================================================================== | |
# U<-"http://www.nhl.com/ice/app?service=page&page=playerstats&fetchKey=20113ALLAASAll&viewName=summary&sort=points&pg=1" |
OlderNewer