The Publisher

S27 · Chapter 14 · MC 451 Research Methods in Mass Media

Dr. Alex Leith

Today’s Agenda

  • Why a copy-and-paste write-up is fragile
  • A report that rebuilds itself
  • IMRaD, and what each section owes the reader
  • Publishing, and the checks that run first

Where the Study Stands

The Publisher

  • A question, a theory, a tested codebook
  • A defensible sample and a clean dataset
  • Three figures, and a finding interpreted honestly
  • Every hard part is finished, and the study is not done
    • It lives in a script, a folder of images, scrolled-past output

Scattered across a dozen files, that is raw material.

The Fragile Way to Write It Up

  • Run the analysis in R
  • Copy the numbers into a word processor
  • Screenshot the figures and paste them in
  • Write the prose around them

This works, and it is quietly fragile. Change one coding rule and every pasted number is silently out of date, with nothing saying so.

A Report That Rebuilds Itself

  • Stop copying: put the analysis inside the document
    • A Quarto document interleaves prose with code chunks
    • Rendering runs every chunk and drops output where it sat
  • Tables, figures and statistics all arrive from the code

Nothing is typed by hand, so nothing can fall out of date.

Numbers Computed Inline

The analysis dataset held `r nrow(analysis)` coded messages, of which
`r sum(!is.na(analysis$is_gaming))` carried a gaming-status label.

Those backtick expressions become the actual counts in the rendered report. Add a hundred messages, re-render, and the sentence updates itself.

Figures Produced, Not Pasted

#| label: fig-msglen
#| echo: false
#| fig-cap: "Message length by channel type."

ggplot(msglen, aes(message_length, fill = is_gaming)) +
  geom_histogram(binwidth = 5) +
  v2v::theme_v2v()

The histogram is a chunk that redraws itself every render. echo: false hides the code and shows the plot.

Your Turn

  • Where have you already pasted a number by hand?
  • What would break if your data changed tomorrow?
  • Which figure could you produce from code inside the report today?

Why This Matters

  • The report cannot drift, because it is the analysis
  • Anyone with your source and data can render your results
    • That is the standard a scientific claim is meant to meet
  • Knuth named the idea literate programming in 1984
    • Runnable code and its prose belong in one document

IMRaD, the Shape of a Report

Introduction, Methods, Results, Discussion, in that fixed order, and the order is itself an argument.

  • It carries a reader from why, to what, to what it means
  • An abstract sits in front, and references close it
  • The Hub ships an imrad-template.qmd

Not bureaucracy: a contract about where to look.

Introduction and Methods

Introduction states the question and why it is worth asking. For the chat study that is the prospectus: do the two kinds of channel differ, and what would theory predict.

Methods says exactly what was done, in enough detail to repeat it: codebook, sampling, reliability check, wrangling.

Methods earns trust, and a reproducible document supports it best.

Results and Discussion

Results reports what was found, plainly and without interpretation: figures, distributions, group means, the test with its degrees of freedom, p, and effect size.

Discussion says what it means, here that the difference is real but negligible, and what that implies for the opening question.

Discussion is also where an honest study states its limits.

One Site, Many Pages

  • The report is not the only document the study produced
    • The codebook, the sampling record, the wrangling log
  • They become pages of one site, not one enormous file
  • _quarto.yml names the site, its pages and its navigation
  • quarto render builds every page into a website

Going Live

  • A site in a folder on a laptop is still private
    • Publishing means giving it a public address
  • The standard free option is GitHub Pages
  • v2v::deploy_portfolio() runs the checks, then publishes

What it hands back is a URL, and that URL is your White Paper.

The Pre-Flight Checks

v2v::deploy_portfolio()
Pre-flight checks
  renv library in sync ......... ok
  no uncommitted changes ....... ok
  _quarto.yml valid ............ ok

Rendering 4 pages ... done
Live at: https://username.github.io/twitch-chat-study/

Three checks run first, and only if all three pass does it deploy.

Why the Checks Exist

  • renv in sync: built with the versions your source declares
  • No uncommitted changes: live matches what you saved
  • Valid _quarto.yml: the render will not collapse halfway
  • Each heads off a specific, demoralizing failure

The last step of a long study should be the calm one.

The Reflection

  • One paragraph, and not part of IMRaD
    • Your own candid account, not a result
  • Name what was harder than expected
    • Where a coding rule went ambiguous
    • What the dataset could not answer
  • Resist both easy failures, all well and all wrong

A researcher who can say where their study is weak understands it.

Before Next Time

  • Thursday is a studio: peer review, and the reflection
  • Bring a rendered draft, not notes toward one
    • It does not have to be finished, it has to render
  • Bring your public URL, or the error stopping you
  • The White Paper is due finals week

Questions?