The column type moved from <dbl>, an ordinary number, to <dttm>, a date-time, and only from a date-time can you pull the hour, the weekday, or the calendar date.
Drop snapshots with no category, count how often each channel streamed each category, then keep only each channel’s modal category, one row per channel.
A wrangling script is a documented transformation chain connecting raw data to analysis-ready data
Every mutate(), filter(), and group_by() is a methodological decision
Which cases to exclude. How to handle missing values. How to bucket time.
A reviewer asks “how did you handle the streamer’s own username in chat?” and the answer is in the script, but only if it is version-controlled and commented
Identify three decisions a reviewer could challenge and comment each with its rule and its justification
Never overwrite raw data
data/raw/ is read-only after the first commit
Your script reads from data/raw/ and writes to data/processed/
That separation is what lets you rebuild the processed dataset from scratch against immutable raw data
Overwriting raw data severs the guarantee, permanently and quietly
Test it: re-run your script in a fresh R session. If it does not reproduce the processed dataset without manual intervention, you have an undocumented dependency.
Common errors and what they mean
Timestamps in the year 51,000: you forgot / 1000
could not find function "%>%" or str_length: library(tidyverse) never ran
Every joined column is NA: your keys disagree, usually whitespace or a #
Row count grew after a join: your lookup table has duplicate keys
object 'channel_type' not found: you ran the chunks out of order, which is exactly what a fresh-session test would have caught
The package ships the ones specific to this data: run ?v2v::common_errors for the year-50,888 timestamp, the join that matches nothing, and the surprisingly low kappa.
Checkpoint
You should now have:
A chat object with 8 columns and 35,267 rows
A timestamp column of type <dttm>, and a message_length column of type <int>
An is_gaming column with 3,457 FALSE, 31,309 TRUE, and 501 NA
A commented script that runs top to bottom in a clean session
The processed dataset written to data/processed/, and raw data untouched
Before Week 12
Submit Data Wrangling [R] (50 points): the script, its comments, and the three reviewer-facing justifications
Read Chapter 12 with the graduate toggle on
Read the assigned article: Lakens (2013), “Calculating and reporting effect sizes to facilitate cumulative science”, Frontiers in Psychology, 4, 863
Write your journal entry, 450 to 500 words, engaging both
Bring the same laptop and the same working environment. Week 12 builds figures from the table you just made.