I’ve been exceptionally tardy updating the Tardy Tuesday blog the last couple of weeks. So there are a couple of weeks worth of code to update with at once. Unlike previous times I’m going to list only myself as the author of this blog, as none of the contributors deserve any blame for my tardiness!
Additionally, the scripts will be presented more ‘as-is’ than on previous occasions, without as much additional discussion or amendments.
Common package dependencies
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.0 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Mutant Moneyball
This TidyTuesday dataset involved understanding the relationship between the value of old Mavel comics and the appearance of particular characters in those comics. I’m not sure it was a good or bad thing that we didn’t know the names of most of the characters…
The session was led by Brendan, who wrote (with our support) the script below:
tidytuesdayR::tt_load('2024-03-19')
--- Compiling #TidyTuesday Information for 2024-03-19 ----
For this session we focused more on regex than perhaps we thought we would, with a particular focus on how to produce nicely readable names for different characters. We also focused on producing metrics like appearances per year, given that some of the time periods were full decades, but others were just of a few years within the decade.
NCAA Men’s March Madness
This session was based around data from a basketball competition. It had information both on how well different teams performed against each other, and also how well various members of the public thought they would perform, meaning it can be used to assess how well expectations match with reality.
This particular session was led by Nic, who supplied the code below.
if (is.na(utils::packageVersion("pacman"))){install.packages("pacman")}library(pacman)p_load(tidytuesdayR)### Download last tuesday's datatt_data <-tt_load('2024-03-26')
--- Compiling #TidyTuesday Information for 2024-03-26 ----
--- There are 2 files available ---
--- Starting Download ---
Downloading file 1 of 2: `team-results.csv`
Downloading file 2 of 2: `public-picks.csv`
--- Download complete ---
tt_data
Available datasets:
team-results
public-picks
### Assign the datasets to our global environmentlist2env(tt_data, globalenv())