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
tribble_df <- tribble(~day, ~person, ~action, | |
"Monday", "Tom", "sprinting", | |
"Tuesday", "Susan", "strolling", | |
"Saturday", "Wonder Woman", "flying") | |
tribble_df %>% | |
mutate(glue_output = glue::glue("On {day} I realized {person} was {action} by the street")) |
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
This is a test of gistfo | |
# https://git.io/fhOAx |
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
This is a test of gistfo | |
# https://git.io/fhOxv |
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: "The Best Tacos in Austin according to Caitlin Hudon" | |
output: | |
flexdashboard::flex_dashboard: | |
orientation: column | |
vertical_layout: fill | |
--- | |
```{r setup, include=FALSE} | |
library(flexdashboard) |
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: "Tweet Test" | |
author: "Thomas Mock" | |
date: "1/16/2019" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
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) | |
# get the data | |
url <- "https://en.wikipedia.org/wiki/List_of_most-streamed_songs_on_Spotify" | |
df <- url %>% | |
read_html() %>% | |
html_table(fill = TRUE) %>% |
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(tidyverse) | |
library(rvest) | |
library(ggrepel) | |
# url for the o-line stats | |
url_ol <- "https://www.footballoutsiders.com/stats/ol" | |
ol_rank <- url_ol %>% | |
read_html() %>% | |
html_table() %>% |
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
# load | |
library(tidyverse) | |
library(ggridges) | |
library(ggtext) | |
library(gt) | |
# read data | |
pbp_df <- read_rds("pbp_all.rds") | |
# 2018 and pass plays |
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
filter_data <- df_clean %>% | |
filter(yard_line >= 20, down %in% c(1, 2), between(defenders_in_the_box, 5, 9)) %>% | |
mutate(defenders_in_the_box = factor(defenders_in_the_box)) %>% | |
filter(distance <= 10) %>% | |
group_by(nfl_id_rusher, game_id, play_id) %>% | |
slice(1) | |
filter_data2 <- df_clean %>% | |
filter(yard_line >= 20, down %in% c(1, 2), between(defenders_in_the_box, 5, 9)) %>% | |
mutate(defenders_in_the_box = factor(defenders_in_the_box)) %>% |
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
# Resources | |
# Please note this will eventually make it's way over to my NFL Plotting Guide | |
# Check it out at: https://jthomasmock.github.io/nfl_plotting_cookbook/ | |
original_url <- "http://www.espn.com/nfl/qbr/_/type/player-week/week/1" | |
gganimate_wiki <- "https://github.com/thomasp85/gganimate/wiki/Temperature-time-series" | |
gganimate_homepage <- "https://gganimate.com/" | |
# Load Libraries ---------------------------------------------------------- |