Week 9 · Chapter 9 · MC 501 Research Methods for Mass Communications
Dr. Alex Leith
Today’s Agenda
A project workspace that holds the whole study
Provenance as a methodological disclosure
The data loaded and inspected, column by column
Reading the data against your codebook
What We Build Today
Week 9 · Chapter 9 · working session
Due tonight: Extended Codebook and Reliability Protocol
A project workspace holding the study in one folder
Your codebook installed as the rendered rulebook
The Twitch data loaded and inspected
Assigned reading: Munafo et al. (2017)
The gentlest possible evening in R: you load data and look at it.
Why the Workspace Comes First
Reproducible research lives on traceability
Files in known places, not commands typed once
A project is one folder for one study
Data, code, codebook, report, travelling together
Nothing depends on a file only on your laptop
Your Week 15 White Paper renders from this folder
Scaffolding the Project
v2v::new_portfolio("twitch-portfolio")
Create a complete, correctly wired study folder in one call.
The v2v:: prefix is not decoration. It tells R, and you, that the function comes from this book’s package, so the package never becomes a hidden assumption.
Load the tidyverse, then pull in the two tables and name each one.
The arrow <- assigns, so chat and streams now refer to the tables for this session. Called with no arguments, each returns the full working sample.
Why a Call, Not a File Path
A new user’s first data encounter is a pile of path errors
These functions reach inside the package and hand the data back
There is no path for you to get wrong
“Everything” is not the entire 2018 collection
That runs to tens of millions of rows
What ships is a working sample: real, and fast
Provenance Is a Disclosure
First contact rests on documenting where data came from
Before the first line of analysis runs
“I collected Twitch chat data” is not a methods section
Replication requires exact knowledge of what was done
What a Provenance Sentence Looks Like
I collected 14 days of Twitch chat from the top 10 most-viewed streams in the Just Chatting category, using Twitch API v2, between 2024-01-15 and 2024-01-28, saving raw JSON responses to data/raw/ before any processing.
Every clause in that sentence is something a replicator would otherwise have to guess.
Munafo on Usability
“Poor usability reflects difficulty in evaluating what was done, in reusing the methodology to assess reproducibility, and in incorporating the evidence into systematic reviews and meta-analyses.”
Munafo et al. (2017, p. 4)
Discoverable is not the same as usable
A study can be public, cited, and impossible to evaluate
Usability, Not Discoverability
Munafo et al. (2017)
“Poor usability reflects difficulty in evaluating what was done, in reusing the methodology to assess reproducibility, and in incorporating the evidence into systematic reviews and meta-analyses.”
Munafo et al. (2017, p. 4)
Which is worse: unfindable, or unevaluable?
Your provenance statement owes a stranger what?
Name one thing in your workflow that fails today
What the Record Includes
For fresh API data the record must name:
Data source and API version
Date and time range of collection
Any filters, keywords, or channel selectors applied
The format in which raw data was saved
The git commit at which raw data was frozen
Item 5 is the audit trail: never re-run collection over a file a script uses.