Data Journalism in R

  • Getting started with stringr for textual analysis in R
    Manipulating characters – a.k.a. non-numerical data – is an essential skill for anyone looking to visualize or analyze text data. This tutorial will go over a few of the base R functions for manipulating strings in R, and introduce the stringr package from the tidyverse. The datasets being used are being analyzed as part of
  • How to use R to analyze racial profiling at police stops
    Working as a data journalist for Eye on Ohio, along with a team of reporters at the Cincinnati Enquirer, I developed a project on the role of racial profiling in police stops in Ohio’s largest cities. The work was part of Stanford University’s open policing project. Stanford developed the base R script for this —
  • How to analyze the screen times of presidential candidates
    Who and what is being discussed on cable television news can reveal a lot about our current media landscape or political state of affairs.  The Stanford Cable TV News Analyzer, built by Stanford University’s Computer Graphics Lab and John S. Knight Fellowship Program, provides the data for us to look at trends in cable news
  • How to use R to dig for story ideas
    Many people think of R as a way to visualize data, but it can also be a useful tool to explore datasets and seek possible story ideas. At the 2023 Investigative Reporters and Editors conference, Charles Minshew, the digital storytelling editor at the Atlanta Journal-Constitution, walked through using basic R code to question datasets. Knowing
  • How to calculate a rolling average in R
    Rolling or moving averages are a way to reduce noise and smooth time series data. During the Covid-19 pandemic, rolling averages have been used by researchers and journalists around the world to understand and visualize cases and deaths. This post will cover how to compute and visualize rolling averages for the new confirmed cases and