Introduction

This document does three things

  1. highlight how GPT-4 can be super helpful in a way that I (Karl Rohe) believes is honest and fair for “internal documents”. Some people might disagree! I think that’s ok; we’re all still figuring it out. Note: “internal” is doing a bit of good work.
  2. Show you that I often use GPT to write code that I don’t yet fully understand. I think that’s ok. Some people might disagree! I think that’s ok too.

In short, I am the “senior author” + “the producer” on this document. Directing the way, but the words/characters are GPT-4’s (hopefully, not directly stollen from folks that didn’t want that; I trust openAI+microsoft are working on ensuring this).

Most importantly:

  1. this document writes R code that collects a bunch of information from the YouTube API. Then, it makes a convenient table at the end. I want you to scroll to a “random” line in that table and then scroll down a video that looks interesting to you.

I made this document in a conversation with GPT and I want to show you that conversation. Here goes GPT (with very minor edits from me):

Introduction

This document outlines the process of downloading video titles from a YouTube playlist using the YouTube Data API in R. It includes steps to obtain a Google API key, which is necessary for accessing the YouTube Data API.

Obtaining a Google API Key

  1. Create a Google Cloud Project:
    • Visit the Google Cloud Console.
    • Sign in with your Google account.
    • Click on “Select a project” at the top of the page, then click on “New Project”.
    • Give your project a name and optionally assign it to an organization.
    • Click “Create”.
  2. Enable YouTube Data API:
    • In the Dashboard of your project, navigate to the “Library” in the left-hand menu.
    • In the API Library, search for “YouTube Data API v3”.
    • Select it and click “Enable” to add it to your project.
  3. Create Credentials:
    • After enabling the API, go to the “Credentials” tab on the left-hand menu.
    • Click on “Create Credentials” at the top of the page.
    • Choose “API key” from the options. Google will then generate a new API key for you.
    • Once the API key is generated, you might see the option to restrict the key. This is recommended for security.
  4. Copy Your API Key:
    • After creating the API key, it will be displayed on your screen. Copy this key and use it in your application. Keep it secure.

R Script for Downloading Playlist Video Titles

First, install the necessary R packages:

Now, load the libraries and set your API key and the playlist ID:

library(httr)
library(jsonlite)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
# Set your API key and playlist ID
api_key <- source("../karls_google_api_key.R")
api_key = api_key$value
playlist_id <- "PL19ev-r1GBwkuyiwnxoHTRC8TTqP8OEi8"  # Replace with the playlist ID

Define a function to fetch playlist items and iterate over them to get all video titles:

fetch_playlist_items <- function(api_key, playlist_id, page_token = "") {
  base_url <- "https://www.googleapis.com/youtube/v3/playlistItems"
  params <- list(part = "snippet",
                 maxResults = 50,
                 playlistId = playlist_id,
                 key = api_key,
                 pageToken = page_token)
  response <- GET(url = base_url, query = params)
  content(response, "parsed", type = "application/json")
}
# Function to extract video details and return a tibble
extract_video_details <- function(item) {
  tibble(
    title = item$snippet$title,
    description = item$snippet$description,
    url = paste0("https://www.youtube.com/watch?v=", item$snippet$resourceId$videoId)
  )
}

# Initialize an empty tibble
video_details <- tibble(title = character(), description = character(), url = character())
next_page_token <- NULL

# Fetch and iterate over playlist items
repeat {
  data <- fetch_playlist_items(api_key, playlist_id, next_page_token)
  video_details <- bind_rows(video_details, lapply(data$items, extract_video_details))

  if (!is.null(data$nextPageToken)) {
    next_page_token <- data$nextPageToken
  } else {
    break
  }
}
# View the result
video_details |> select(title, url)
## # A tibble: 81 × 2
##    title                                                                url     
##    <chr>                                                                <chr>   
##  1 Tidy Tuesday live screencast: Analyzing water access points in R     https:/…
##  2 Tidy Tuesday live screencast: Analyzing Netflix titles in R          https:/…
##  3 Tidy Tuesday live screencast: Analyzing post offices in R            https:/…
##  4 Tidy Tuesday live screencast: Analyzing deforestation in R           https:/…
##  5 Tidy Tuesday live screencast: Analyzing UN votes in R                https:/…
##  6 Tidy Tuesday live screencast: Analyzing Video Games in R             https:/…
##  7 Tidy Tuesday live screencast: Analyzing the Bechdel test in R        https:/…
##  8 Tidy Tuesday live screencast: Analyzing Super Bowl ads in R          https:/…
##  9 Tidy Tuesday live screencast: Analyzing employment and earnings in R https:/…
## 10 Tidy Tuesday live screencast: Analyzing wealth and income in R       https:/…
## # ℹ 71 more rows
readr::write_csv(video_details,"video_details.csv")
# Assuming video_details is already populated
library(knitr)
library(kableExtra)
## 
## Attaching package: 'kableExtra'
## The following object is masked from 'package:dplyr':
## 
##     group_rows
# Function to create a hyperlink
make_clickable <- function(link) {
  sprintf('<a href="%s">%s</a>', link, link)
}

video_details$url <- sapply(video_details$url, make_clickable)

knitr::kable(video_details, "html", escape = FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover"))
title description url
Tidy Tuesday live screencast: Analyzing water access points in R

I’ll analyze a dataset about water access points, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-05-04/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=5ub92c-5xFQ
Tidy Tuesday live screencast: Analyzing Netflix titles in R

I’ll analyze a dataset about Netflix titles, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-04-20/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=3PecUbnuYC4
Tidy Tuesday live screencast: Analyzing post offices in R

I’ll analyze a dataset about US post office locations in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-04-13/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=Sx9uo2tCOFM
Tidy Tuesday live screencast: Analyzing deforestation in R

I’ll analyze a dataset about deforestation in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-04-06/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=0q-qmNkhWyY
Tidy Tuesday live screencast: Analyzing UN votes in R

I’ll analyze a dataset about United Nations votes, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-03-23/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=2RadZrpzTaA
Tidy Tuesday live screencast: Analyzing Video Games in R

I’ll analyze a dataset about video games, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-03-16/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=Kd9BNI6QMmQ
Tidy Tuesday live screencast: Analyzing the Bechdel test in R

I’ll analyze a dataset about the Bechdel test for gender representation, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-03-09/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=7NTowAZeeC0
Tidy Tuesday live screencast: Analyzing Super Bowl ads in R

I’ll analyze a dataset about Super Bowl ads, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-03-02/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=EHqFDXa-sH4
Tidy Tuesday live screencast: Analyzing employment and earnings in R

I’ll analyze a dataset about employment and earnings over time, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-02-23/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=gkZ5n8sfXns
Tidy Tuesday live screencast: Analyzing wealth and income in R

I’ll analyze a dataset about wealth and income inequality over time, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-02-09/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=WxKSauhOY4g
Tidy Tuesday live screencast: Analyzing HBCU enrollment in R

I’ll analyze a dataset about enrollment in historically Black colleges & universities (HCBUs), without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-02-02/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=TSG74voJQ3E
Tidy Tuesday live screencast: Analyzing the Kenya census in R

I’ll analyze a dataset about the Kenya census, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-01-19/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=dM_0zjj4TtM
Tidy Tuesday live screencast: Analyzing art collections in R

I’ll analyze a dataset about art collections, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-01-12/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=AqwA5EJfLXo
Tidy Tuesday live screencast: Analyzing transit costs in R

I’ll analyze a dataset about transit costs, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-01-05/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=8jNQzce13SE
Tidy Tuesday live screencast: Analyzing the Big Mac index in R

I’ll analyze a dataset about the Big Mac index, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-12-22/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=pxJ5wtxL5Kw
Tidy Tuesday live screencast: Analyzing Ninja Warrior in R

I’ll analyze a dataset about the Ninja Warrior obstacle course TV series, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-12-15/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=4AhXvMsCooM
Tidy Tuesday live screencast: Analyzing historical phones in R

I’ll analyze a dataset about historical phone adoption, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-11-10/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=pJPqAIb8MKA
Tidy Tuesday live screencast: Analyzing IKEA furniture in R

I’ll analyze a dataset about the IKEA furniture, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-11-03/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=lY0YLDZhT88
Tidy Tuesday live screencast: Analyzing the Great American Beer Festival

I’ll analyze a dataset about the Great American Beer Festival, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-10-20/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=BV_afpCDQ70
Tidy Tuesday live screencast: Analyzing NCAA Women’s Basketball

I’ll analyze a dataset about NCAA Women’s Basketball, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-10-06/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=-RD8GNCNsCk
Tidy Tuesday live screencast: Analyzing Beyonce and Taylor Swift lyrics in R

I’ll analyze a dataset about Beyonce and Taylor Swift lyrics without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-09-29/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=vYbDyfv_v4Q
Tidy Tuesday live screencast: Analyzing Himalayan climbers in R

I’ll analyze a dataset about Himalayan climbers without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-09-22/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=WT7FMn-_jPY
Tidy Tuesday live screencast: Analyzing government spending on kids in R

I’ll analyze a dataset about government spending on kids, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-09-15/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=dHRPrVsnNwo
Tidy Tuesday live screencast: Analyzing Friends transcripts in R

I’ll analyze a dataset of transcripts from the sitcom Friends, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-09-08/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timestamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=bgcBEBqVnx8
Tidy Tuesday live screencast: Analyzing global crop yields in R

I’ll analyze a dataset about global crop yields, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-09-01/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timstamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=0uqAhIiK9Rc
Tidy Tuesday live screencast: Analyzing Chopped epiodes in R

I’ll analyze a dataset about the TV series Chopped, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-08-25/readme.md

Code: https://github.com/dgrtwo/data-screencasts

Timstamped annotations of specific tricks, tips and tools used: https://github.com/dgrtwo/data-screencasts/tree/master/screencast-annotations
https://www.youtube.com/watch?v=6V0vAx2Km7U
Tidy Tuesday live screencast: Analyzing extinct plants in R

I’ll analyze a dataset on extinct plants in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-08-18/readme.md
https://www.youtube.com/watch?v=f7Rc1bvMgZY
Tidy Tuesday live screencast: Analyzing European energy in R

I’ll analyze a dataset on European energy in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-08-04/readme.md
https://www.youtube.com/watch?v=Rcmu5e-9FSc
Tidy Tuesday live screencast: Analyzing penguins in R

I’ll analyze a dataset on penguins in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-07-28/readme.md
https://www.youtube.com/watch?v=ImpXawPNCfM
Tidy Tuesday live screencast: Analyzing Australian animal outcomes in R

I’ll analyze a dataset on Australian animal outcomes in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-07-21/readme.md
https://www.youtube.com/watch?v=E2amEz_upzU
Tidy Tuesday live screencast: Analyzing coffee ratings in R

I’ll analyze a dataset on coffee ratings in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-07-07/readme.md
https://www.youtube.com/watch?v=-1x8Kpyndss
Tidy Tuesday live screencast: Analyzing X-Men comics in R

I’ll analyze a dataset on the Chris Claremont run on Uncanny X-Men comics in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-06-30/readme.md
https://www.youtube.com/watch?v=NY0-IFet5AM
Tidy Tuesday live screencast: Analyzing caribou locations in R

I’ll analyze a dataset on caribou locations in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-06-23/readme.md
https://www.youtube.com/watch?v=7G7SVODhVo4
Tidy Tuesday live screencast: Analyzing African-American history in R

I’ll analyze a dataset on African-American history in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-06-16/readme.md
https://www.youtube.com/watch?v=2L-jA-Me3zg
Tidy Tuesday live screencast: Analyzing African-American achievements in R

I’ll analyze a dataset on African-American achievements in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-06-09/readme.md
https://www.youtube.com/watch?v=-W-OopvhNPo
Tidy Tuesday live screencast: Analyzing cocktail recipes in R

I’ll analyze a dataset on cocktail recipes in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-05-26/readme.md
https://www.youtube.com/watch?v=EC0SVkFB2OU
Tidy Tuesday live screencast: Analyzing beach volleyball in R

I’ll analyze a dataset on beach volleyball matches in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-05-19/readme.md
https://www.youtube.com/watch?v=MfDdmsW3OMo
Tidy Tuesday live screencast: Analyzing volcano eruptions in R

I’ll analyze a dataset on volcano eruptions in R, without looking at the dataset in advance.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-05-12/readme.md
https://www.youtube.com/watch?v=pZINGjQ86Hc
Tidy Tuesday live screencast: Analyzing Animal Crossing in R

I’ll analyze a dataset on the popular game Animal Crossing, performed without looking at the data in advance (or knowing much of anything about Animal Crossing!)

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-05-05/readme.md
https://www.youtube.com/watch?v=Xt7ACiedRRI
Tidy Tuesday live screencast: Analyzing Broadway shows in R

I’ll analyze a dataset on Broadway shows in R, without looking at the data in advance. I’ll be analyzing the dataset as a live stream instead of prerecording it.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-04-28/readme.md
https://www.youtube.com/watch?v=OhY5ZaILRpg
Tidy Tuesday live screencast: Analyzing GDPR violations in R

I’ll analyze a dataset on GDPR violations in R, without looking at the data in advance. For the second time, I’ll be analyzing the dataset as a live stream instead of prerecording it.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-04-21/readme.md
https://www.youtube.com/watch?v=EVvnnWKO_4w
Tidy Tuesday live screencast: Analyzing Tour de France data in R

I’ll analyze a dataset on the Tour de France competition in R, without looking at the data in advance. For the first time (and just as an experiment), I’ll be analyzing the dataset as a live stream instead of prerecording it.

The dataset comes from the Tidy Tuesday project: https://github.com/rfordatascience/tidytuesday/blob/master/data/2020/2020-04-07/readme.md
https://www.youtube.com/watch?v=vT-DElIaKtE
Tidy Tuesday screencast: exploring US beer production

I analyze a dataset of US beer production wins as an example of exploratory data analysis in R, performed without looking at the data in advance. In particular, I show how the (in-development) tidymetrics and shinymetrics packages can create interactive visualizations of metrics like ingredient usage over time.

For more about the tidymetrics/shinymetrics framework, see this package: https://github.com/ramnathv/tidymetrics and this talk by Kaelen Medeiros: https://www.youtube.com/watch?v=BL5NBRxnl3E

This data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=1R4X09w7tQ8
Tidy Tuesday screencast: analyzing ratings and scripts from The Office

I analyze a dataset of ratings and dialogue for the sitcom The Office. This includes examining the average rating of episodes across seasons, using TF-IDF to find words specific to each character, and using LASSO regression to determine which characters, writers and directors tended to have the highest (or lowest) rated episodes.

This data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=_IvAubTDQME
Tidy Tuesday screencast: analyzing code in CRAN packages

I analyze a dataset of CRAN packaes wins as an example of exploratory data analysis in R, performed without looking at the data in advance. I look at the number of lines of code and comments by each language, and examine some of the most code-heavy packages in CRAN and in the tidyverse specifically. I also join in a few other datasets, such as the number of downloads per day of each package.

This data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=dr4qw8o0nYU
Tidy Tuesday screencast: analyzing squirrels in NYC

I analyze a dataset of squirrels in NYC as an example of exploratory data analysis and machine learning in R, performed without looking at the data in advance. This leads to some visualization of spatial patterns in squirrel behavior, including importing shapefiles and plotting them with ggplot2.

This data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=6GV9sAD6Pi0
Tidy Tuesday screencast: predicting horror movie ratings

I analyze a dataset of horror movies as an example of exploratory data analysis and machine learning in R, performed without looking at the data in advance. This includes demonstrating the machine learning method of lasso regression to predict horror movie ratings based on cast, genre, and plot.

This data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=yFRSTlk3kRQ
Tidy Tuesday screencast: analyzing car fuel efficiency in R

I analyze a dataset of cars and their fuel efficiency, and see how it relates to the type of car and engine. This includes some nonlinear regression with natural cubic splines, as well as visual explorations of how fuel economy differs between city and highway driving or how efficiency has been changing over time.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=RpeioixHOHw
Tidy Tuesday screecast: analyzing pizza ratings

I analyze two datasets of pizza restaurant ratings in R, without looking at the data in advance. This includes calculating and visualizing confidence intervals for restaurants, as well as some dplyr and forcats tricks.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=Mkac8DHScps
Tidy Tuesday screencast: analyzing Simpsons guest stars and dialogue in R

I analyze a dataset on Simpsons guest stars as an example of exploratory data analysis in R, performed without looking at the data in advance. I also bring in data on Simpsons quotes, and look at metrics like “lines per episode” to distinguish between types of guest stars.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=EYuuAGDeGrQ
Tidy Tuesday screencast: analyzing Bob Ross paintings in R

I analyze a dataset of elements in Bob Ross paintings as an example of exploratory data analysis in R, performed without looking at the data in advance. This includes a tidy approach to principal component analysis to find the dimensions that explain the most variation among paintings.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=sD993H5FBIY
Tidy Tuesday screencast: analyzing Women’s World Cup data

I analyze a dataset on Women’s World Cup results since 1992 as an example of exploratory data analysis in R, performed without looking at the data in advance. I also do some exploration of a very rich dataset of soccer play-by-play statistics from StatsBomb.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=ZOQSuapvHqA
Tidy Tuesday screencast: analyzing franchise revenue

I analyze a dataset on franchises (Pokémon, Harry Potter, etc) as an example of exploratory data analysis in R, performed without looking at the data in advance. This includes reconstructing a stacked bar plot to explore the top money-making franchises of all time, and examining how they’ve changed over time.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=1xsbTs9-a50
Tidy Tuesday screencast: scraping and analyzing ramen reviews in R

I analyze a dataset on ramen ratings as an example of exploratory data analysis in R, performed without looking at the data in advance. This episode features web scraping with the rvest package to download several hundred ramen reviews from the original website, then analyzing them with tidytext and widyr.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=tCa2di7aEP4
Tidy Tuesday screencast: predicting wine ratings

I analyze a dataset of WineEnthusiast ratings as an example of statistical modeling and machine learning in R, performed without looking at the data in advance. This includes fitting a linear regression to predict wine ratings based on price, country, and taster, and then using tidytext and glmnet to fit a sparse regression based on text descriptions.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=AQzZNIyjyWM
Tidy Tuesday screencast: analyzing plastic waste across countries

I analyze a dataset on plastic waste generated by country as an example of exploratory data analysis in R, performed without looking at the data in advance. This includes creating a choropleth with ggplot2 and downloading country indicators with the WDI package.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=BRdLOYtJk9o
Tidy Tuesday screencast: analyzing Nobel Prize winners in R

I analyze a dataset on Nobel Prize winners as an example of exploratory data analysis in R, performed without looking at the data in advance. This includes determining when in someone’s career they tend to do Nobel-Prize winning work, and how long they have to wait for the prize after publishing.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=yWSpLfmES7w
Tidy Tuesday screencast: analyzing student/teacher ratios and other country statistics

I analyze a dataset on student/teacher ratios across countries as an example of exploratory data analysis in R, performed without looking at the data in advance. This includes using the WDI package to retrieve country statistics from the World Bank, and to explore relationships with multiple linear regression.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=NoUHdrailxA
Tidy Tuesday screencast: analyzing bird collisions with bootstrapping in R

I analyze a dataset of bird collisions with buildings in Chicago as an example of exploratory data analysis in R, performed without looking at the data in advance. This includes using the rsample package for tidy bootstrapping to examine the relationship between artificial lighting and the frequency of collisions.

The data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=zjWm__nFLXI
Tidy Tuesday screencast: analyzing tennis tournaments in R

I analyze a dataset of tennis Grand Slam wins as an example of exploratory data analysis in R, performed without looking at the data in advance. I demonstrate using someone’s previous performance to predict the probability of winning a tournament.

This data comes from the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=YWUCUfEeNJI
Tidy Tuesday screencast: bike frequencies in Seattle

I analyze a dataset of bike counters in Seattle as an example of exploratory data analysis in R, performed without looking at the data in advance. I use visualizations to discover which direction Seattle residents typically commute in, and therefore which are likely north or south of major commercial areas.

The dataset comes thanks to the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts
https://www.youtube.com/watch?v=sBho2GJE5lc
Tidy Tuesday screencast: analyzing pet names in Seattle

I analyze a dataset of pet names in Seattle as an example of exploratory data analysis in R, performed without looking at the data in advance. This screencast includes introductions to the hypergeometric test, examining p-value histograms, and FDR control, as I investigate the question of whether particular dog breeds are more likely to have particular names.

You can find all the code from my screencasts here: https://github.com/dgrtwo/data-screencasts

This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday
https://www.youtube.com/watch?v=EF4A4OtQprg
Tidy Tuesday screencast: analyzing board games and predicting ratings in R

I analyze a dataset of board games from boardgamegeek.com as an example of exploratory data analysis in R, performed without looking at the data in advance. This screencast includes fitting a lasso regression model to predict game rating using the glmnet and broom packages, as well as highlighting the steps of feature engineering and model exploration with tidy tools.

This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday
https://www.youtube.com/watch?v=qirKGdQvy9U
Tidy Tuesday screencast: analyzing data on women in the workplace I analyze a dataset on female participation in the workforce and the gender pay gap as an example of exploratory data analysis in R, performed without looking at the data in advance. This includes creating interactive graphics with plotly and turning it into a dashboard with Shiny. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=fv9SQ4IFNr4
Tidy Tuesday screencast: analyzing train delays in France

I analyze a dataset about delays in French train stations as an example of exploratory data analysis in R, performed without looking at the data in advance. This episode includes some data cleaning and the creation of heatmaps.

This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday
https://www.youtube.com/watch?v=bmaigtpKyiM
Tidy Tuesday screencast: tidying and analyzing US PhDs in R

I analyze a dataset about PhDs awarded in the US as an example of exploratory data analysis in R, performed without looking at the data in advance. This episode focuses on importing, cleaning and tidying messy data from Excel spreadsheets.

This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday
https://www.youtube.com/watch?v=KzRP40PzopY
Tidy Tuesday screencast: Analyzing US dairy consumption in R

I analyze a dataset of college majors as an example of exploratory data analysis in R, performed without looking at the data in advance. Includes tidy time series modeling and forecasting with the timetk and sweep packages.

This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday
https://www.youtube.com/watch?v=13iG_HkEPVc
Tidy Tuesday screencast: Analyzing incarceration data in R I analyze a dataset of incarceration by county and time as an example of exploratory data analysis in R, performed without looking at the data in advance. Includes examples of an choropleth of US counties, animated maps, and examining missing data and its effect on an analysis. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=78kv808ZU6o
Tidy Tuesday screencast: analyzing space launches in R I analyze a dataset on the quality of Maryland bridges as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=ZyPrP_Yo1BA
Tidy Tuesday Screencast: the golden age of television I analyze a dataset about IMDb ratings of television seasons, performed without looking at the data in advance. This video is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=oYGi2wgSJaM
Tidy Tuesday screencast: Analyzing #tidytuesday and #rstats tweets in R I analyze a dataset about tweets in the #tidytuesday and #rstats hashtags as an example of exploratory data analysis in R, performed without looking at the data in advance. It includes using the tidytext package to tokenize tweets and a bit of web scraping with rvest to get additional data about Tidy Tuesday projects. This video is itself part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=KE9ItC3doEU
Tidy Tuesday: Analyzing dolphin data in R I analyze a dataset about whales and dolphins as an example of exploratory data analysis in R, performed without looking at the data in advance. It includes fuzzy matching of strings with the fuzzyjoin package and a tidy approach to survival analysis. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=KiqpX-gNIS4
Tidy Tuesday screencast: analyzing NYC restaurant inspections with R I analyze a dataset on NYC restaurant inspections as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=em4FXPf4H-Y
Tidy Tuesday screencast: analyzing Medium articles with R I analyze a dataset of Medium article titles and tags as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=C69QyycHsgE
Tidy Tuesday Screencast: analyzing Maryland bridges with R I analyze a dataset on the quality of Maryland bridges as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=kzM-4jMh9Qs
Tidy Tuesday Screencast: Analyzing Thanksgiving dinners in R I analyze a survey dataset about Thanksgiving dinner as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=rxJZT0duwfU
Tidy Tuesday screencast: analyzing malaria incidence in R I analyze a dataset of malaria incidence across countries as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=5_6O2oDy5Jk
Tidy Tuesday Screencast: analyzing US wind data in R I analyze a dataset of wind turbines in the US as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=O1oDIQV6VKU
Tidy Tuesday screencast: analyzing data on R downloads I analyze a dataset of R and R package downloads as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=nms9F-XubJU
Tidy Tuesday Screencast: Analyzing horror movie profits in R I analyze a dataset of movie profits and budgets as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday https://www.youtube.com/watch?v=3-DRwg9yeNA
Tidy Tuesday Screencast: analyzing college major & income data in R

I analyze a dataset of college majors as an example of exploratory data analysis in R, performed without looking at the data in advance. This is part of the #tidytuesday project: https://github.com/rfordatascience/tidytuesday

The data comes from 538: https://github.com/fivethirtyeight/data/tree/master/college-majors

You can find the code produced in the session here: https://github.com/dgrtwo/data-screencasts/blob/master/college-majors.Rmd
https://www.youtube.com/watch?v=nx5yhXAQLxw

Conclusion

This RMarkdown document demonstrates how to use the YouTube Data API to download video titles from a specific playlist. Remember to replace the placeholder API key and playlist ID with your actual credentials.