This file contains hidden or 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(rvest) | |
library(tidyverse) | |
library(magrittr) | |
library(scales) | |
library(knitr) | |
library(lubridate) | |
url <- "https://www.imdb.com/title/tt0313038/episodes?season=" | |
timevalues <- 13:22 |
This file contains hidden or 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
```{r} | |
# general look | |
tele %>% | |
filter(marital == "M" & lor <= 12 & kid0_2 == "Y" | kid3_5 == "Y") %>% | |
ggplot(aes(x=months, y=totrev, colour = income)) + | |
geom_point() + | |
theme_classic() | |
``` | |
```{r} | |
# Married new home owners with a young child |
This file contains hidden or 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
```{r} | |
library(rtweet) | |
library(twitteR) | |
library(tidyverse) | |
library(tidytext) | |
library(httpuv) | |
data(stop_words) | |
``` | |
```{r} |
This file contains hidden or 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
```{r} | |
#https://cran.r-project.org/web/packages/rtweet/rtweet.pdf | |
# install from CRAN | |
install.packages("rtweet") | |
install.packages("httpuv") | |
install.packages("tidyverse") | |
install.packages("dplyr") | |
install.packages("tidytext") | |
# load rtweet |
This file contains hidden or 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
Full code for the model is here | |
http://statsbylopez.netlify.com/post/a-state-space-model-to-evaluate-sports-teams/ | |
```{r} | |
#Packages Used | |
library(tidyverse) | |
library(rjags) | |
library(gsheet) | |
library(lubridate) |
This file contains hidden or 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
--- | |
title: "TwitterBot" | |
author: "Jake" | |
date: "March 25, 2018" | |
output: html_document | |
--- | |
```{r} | |
#Packages | |
library(rvest) |
This file contains hidden or 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
```{r} | |
#packages | |
library(rvest) | |
library(tidyverse) | |
library(magrittr) | |
library(scales) | |
library(knitr) | |
library(lubridate) | |
``` |
This file contains hidden or 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
```{r} | |
install.packages("tidyverse") | |
library(tidyverse) | |
library(stringr) | |
churn <- read_csv(file.choose()) | |
``` | |
```{r} | |
#take numerics and remove high-correlation | |
ch <- data.frame(churn[,c(2,5:21)]) |
This file contains hidden or 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
--- | |
title: "StarWars" | |
output: html_document | |
--- | |
```{r } | |
#https://kkulma.github.io/2017-12-16-star-wars-vs-star-trek-word-battle/ | |
``` | |