From db659f395f822c39baf78371c52e242d0539e41a Mon Sep 17 00:00:00 2001 From: Jake Thompson Date: Sun, 5 Nov 2023 15:38:28 -0600 Subject: [PATCH] add surprise song data --- R/data.R | 18 ++++++++++++++++++ data-raw/surprise-songs.R | 28 ++++++++++++++++++++++++++++ data-raw/surprise-songs.xlsx | Bin 0 -> 14284 bytes data/eras_tour_surprise.rda | Bin 0 -> 2357 bytes man/eras_tour_surprise.Rd | 29 +++++++++++++++++++++++++++++ pkgdown/_pkgdown.yml | 1 + tests/testthat/test-data.R | 18 ++++++++++++++++++ 7 files changed, 94 insertions(+) create mode 100644 data-raw/surprise-songs.R create mode 100644 data-raw/surprise-songs.xlsx create mode 100644 data/eras_tour_surprise.rda create mode 100644 man/eras_tour_surprise.Rd diff --git a/R/data.R b/R/data.R index c289f56..568b65c 100644 --- a/R/data.R +++ b/R/data.R @@ -156,3 +156,21 @@ #' @source \url{https://en.wikipedia.org/wiki/Taylor_Swift_albums_discography} #' @source \url{https://www.metacritic.com/person/taylor-swift} "taylor_albums" + +#' The Eras Tour Surprise Songs +#' +#' A data set containing all of the surprise songs played on The Eras Tour +#' through the first North American leg of the tour. +#' +#' @format A [tibble][tibble::tibble-package] with `r nrow(eras_tour_surprise)` +#' rows and `r ncol(eras_tour_surprise)` variables: +#' * `leg`: The leg of the tour (e.g., North America, South America, etc.). +#' * `date`: The date of the show in ISO 8601 format (yyyy-mm-dd). +#' * `city`: The location of the show. For US shows, the location is the city +#' and state. For international shows, the location is the city and country. +#' * `night`: The show number within each city. +#' * `dress`: The color of the dress Taylor wore on the given night. +#' * `instrument`: The instrument used to play the song (guitar or piano). +#' * `song`: The track name of the song. +#' * `guest`: The special guest (if any) that joined Taylor to play the song. +"eras_tour_surprise" diff --git a/data-raw/surprise-songs.R b/data-raw/surprise-songs.R new file mode 100644 index 0000000..a325725 --- /dev/null +++ b/data-raw/surprise-songs.R @@ -0,0 +1,28 @@ +library(tidyverse) +library(readxl) +library(here) + +devtools::load_all() + +eras_tour_surprise <- read_xlsx(here("data-raw", "surprise-songs.xlsx")) %>% + mutate(date = as_date(date), + night = as.integer(night)) %>% + filter(date < today()) + +# QC data file ----------------------------------------------------------------- +# Check for track names are consistent. Should be 0 rows. +(bad_name <- eras_tour_surprise %>% + filter(!(song %in% taylor_all_songs$track_name))) + +# Check that we're using Taylor's Version when possible. Should be 0 rows. +(not_tv <- eras_tour_surprise %>% + left_join(taylor_all_songs %>% + filter(is.na(ep) | !ep) %>% + distinct(track_name, album_name), + join_by(song == track_name), + relationship = "many-to-one") %>% + filter(!is.na(album_name), + !album_name %in% taylor_album_songs$album_name) %>% + distinct(song, album_name)) + +use_data(eras_tour_surprise, overwrite = TRUE) diff --git a/data-raw/surprise-songs.xlsx b/data-raw/surprise-songs.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..96ee890663f984dcbf2d86690e56e0e1ee4e5a68 GIT binary patch literal 14284 zcmeHu1y@{MvUcOH!GZ^OcejM#?ykWhKyW8P0t9zSy+X8A1U7F|Yu@3jiXto}{CL ztA&HBk-Ddog^K};hrJzn4lFbs5C9E%{{OE3#TF<_7*gzJ!+d@9_Fi&}S$4Tb43Ya+ zP#-pfibzLKd~b=FUY51>Q&#vLrbITb4R1B}*s?dr>4;U0gMEEaSZ}i`YD8dvhlU{$ zFYAxKL+W$g9A~E)tMn+MV>422?4c)3-QtRTfWrS9^cp?FtnTvgzSZlpa zs3p2Z{QXOvAVtkpEWW|wDa_4@7t=P@^xlT&o6It>5ft9bcy5OI%CEH5=uK6doNtrm z+Fa-wIcJQ`pjX*KVp`ExM%Un*+jvP8xCm>CKZ8qjdt+=F+kNzXyxQr$M1YlVzw_W) z88Pc+i3Pq2nw$qH+eXylm2)_Z`Syt7=E@J9bdj&zQLn!s?pY%;|DF{cW3EU*Vb280 z@5_=>;^$=u@+<5gXyofq`ejD!<4`bxum$`2`U&R}Yw!DchXm$8$15t|&|jebJwflo z@ol}}qtm24e~w3Z0O08f2B7?JZds?nMhS*+O&;QPC=jA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fpb+-E>W>p^MFw>QoJK(}rHGQFXX5L*vOUzY(`dQMMuqzBoyTYBJC zULZ>?bJQUynaQ6r7Gd&d7dF?Z`6Ttw65nCzcDF*f1GTbyHFy!caT{wb=?(=OoZWbA zPy#Rsh(ML~kO=@_4pd+*NXP(I1Na0b#A@DzCAq{1^*enuK#D08GGWk%jW&wj97|MicKmzECPPF4Dngko~I zs9CkutXP8HncbXWb*2_Dz)%*K`uTHFNUOL2aN>?zsF>GWsT9N>=Uo>E5(tnfq2$`BqbE>|M}i4f0s%SH=+Ne@Q8W<-?ZY`csOF9n zw5DIhxahA%|L0ut?Ok}N^2>h)(fwhtdz zb!ei4D=leD)fJt?g$qRFrKBp{5#OHyPPrfo>40sFjd8`rYH~`H1-Z{+!u*#=&Nwv= zeKRd}Mb?7sfD4jB1S2t0v*@gB2^^$z!1OR4XZWGoC|kRT;xQPHh{StlBLd^@5GD75 b{bL>g0>sdg6nf+V0{<6sML1B9kxS~2eH#C5 literal 0 HcmV?d00001 diff --git a/man/eras_tour_surprise.Rd b/man/eras_tour_surprise.Rd new file mode 100644 index 0000000..a18db0f --- /dev/null +++ b/man/eras_tour_surprise.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{eras_tour_surprise} +\alias{eras_tour_surprise} +\title{The Eras Tour Surprise Songs} +\format{ +A \link[tibble:tibble-package]{tibble} with 114 +rows and 8 variables: +\itemize{ +\item \code{leg}: The leg of the tour (e.g., North America, South America, etc.). +\item \code{date}: The date of the show in ISO 8601 format (yyyy-mm-dd). +\item \code{city}: The location of the show. For US shows, the location is the city +and state. For international shows, the location is the city and country. +\item \code{night}: The show number within each city. +\item \code{dress}: The color of the dress Taylor wore on the given night. +\item \code{instrument}: The instrument used to play the song (guitar or piano). +\item \code{song}: The track name of the song. +\item \code{guest}: The special guest (if any) that joined Taylor to play the song. +} +} +\usage{ +eras_tour_surprise +} +\description{ +A data set containing all of the surprise songs played on The Eras Tour +through the first North American leg of the tour. +} +\keyword{datasets} diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 2b7cae6..b1793dc 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -36,6 +36,7 @@ reference: - taylor_album_songs - taylor_all_songs - taylor_albums + - eras_tour_surprise - title: Plotting - subtitle: Color palettes diff --git a/tests/testthat/test-data.R b/tests/testthat/test-data.R index 4366bb7..fca8a74 100644 --- a/tests/testthat/test-data.R +++ b/tests/testthat/test-data.R @@ -10,6 +10,9 @@ test_that("data has expected dimensions", { # albums expect_equal(ncol(taylor_albums), 5L) + # surprise songs + expect_equal(ncol(eras_tour_surprise), 8L) + albums <- unique(taylor_all_songs[which((!taylor_all_songs$ep) & !is.na(taylor_all_songs$album_name)), @@ -51,6 +54,11 @@ test_that("column names match documentation expectation", { # albums expect_equal(colnames(taylor_albums), c("album_name", "ep", "album_release", "metacritic_score", "user_score")) + + # surprise songs + expect_equal(colnames(eras_tour_surprise), c("leg", "date", "city", "night", + "dress", "instrument", "song", + "guest")) }) test_that("non-TV versions are excluded when possible", { @@ -66,3 +74,13 @@ test_that("non-TV versions are excluded when possible", { expect_false(any(exclude_albums %in% taylor_album_songs$album_name)) }) + +test_that("surprise songs are the correct version", { + expect_true(all(eras_tour_surprise$song %in% taylor_all_songs$track_name)) + + no_tv_songs <- eras_tour_surprise$song[grep("Taylor's Version", + eras_tour_surprise$song, + invert = TRUE)] + expect_false(any(paste(no_tv_songs, "(Taylor's Version)") %in% + taylor_all_songs$track_name)) +})