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
# Activate these packages | |
library(shiny) | |
library(DT) | |
library(shinythemes) | |
library(rvest) | |
library(expss) | |
library(dplyr) | |
library(tidyr) | |
library(stringr) |
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
# SCRAPE STATS | |
library(RCurl) | |
library(XML) | |
# Set URL (make sure to use 'getURL' for https/secure sites) | |
nebrasketball2017_url <- getURL("https://www.sports-reference.com/cbb/schools/nebraska/2018-schedule.html") | |
# Pull data from second table on the page into a data frame for analysis | |
nebrasketball2017 <- readHTMLTable(nebrasketball2017_url, header = T, as.data.frame = T)[[2]] |
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
# Activate these packages | |
library(shiny) | |
library(DT) | |
library(shinythemes) | |
library(rvest) | |
library(expss) | |
library(dplyr) | |
library(tidyr) | |
library(stringr) | |
library(sqldf) |
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
# Install/Library these functions: | |
library(forecast) | |
library (tidyr) | |
library (dplyr) | |
library (highcharter) | |
# Upload CSV file to R Studio, or other GUI containing only monthly sessions and dates | |
aa_data <- read.csv("~/[name of file].csv", stringsAsFactors = FALSE, header = TRUE, sep = ",") | |
# Check data structure of uploaded 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
library(dplyr) | |
library(tidyr) | |
library(rvest) | |
library(tabulizer) | |
# Manual Class A names | |
School <- | |
c( | |
'Omaha South', | |
'Omaha Central', |
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
# Access Twitter API using twitterR | |
# Need to have a Twitter account and can access keys, secrets, tokens by creating an app at apps.twitter.com | |
# Include the single quotes around your access codes | |
tw_consumer_key <- 'your_consumer_key' | |
tw_consumer_secret <- 'your_consumer_secret' | |
tw_access_token <- 'your_access_token' | |
tw_access_secret <- 'your_access_secret' | |
setup_twitter_oauth(tw_consumer_key, tw_consumer_secret, tw_access_token, tw_access_secret) |