Skip to content
  • Twitter
  • Facebook
  • Instagram
  • Email
Storybench
  • About
    • Meet the Team
    • Newsletter
  • Articles
    • Behind the scenes
    • Insights
    • Research
    • Interviews
    • Longform
    • Roundups
    • For Educators
  • Tutorials
  • Projects
    • NICAR 2022
    • Reinventing TV
    • Data Journalism in R
    • Climate Journalism Lab
    • 2020 Election Tracker

Author: Martin Frigaard

Martin Frigaard is a tidyverse/R trainer in Oakland, CA. Find him on Twitter.

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 […]

June 22, 2020June 22, 2020 Martin Frigaard Data Journalism in R, How to

Update: How to geocode a CSV of addresses in R

This post is an update from the previous post, “How to geocode a CSV of addresses in R”. We will be using the ggmap package again, and be sure to investigate the usage […]

June 13, 2020June 13, 2020 Martin Frigaard Data Journalism in R, How to, Insights

A roundup of coronavirus dashboards, datasets and resources

Access and availability of data on the novel coronavirus and the disease it causes, Covid-19, are essential for understanding how the virus spreads, who is most likely to get it, […]

April 17, 2020April 17, 2020 Martin Frigaard Roundups

Diagnosing the accuracy of your linear regression in R

In this post we’ll cover the assumptions of a linear regression model. There are a ton of books, blog posts, and lectures covering these topics in greater depth (and we’ll […]

November 27, 2019November 27, 2019 Martin Frigaard Data Journalism in R, How to

How to explore correlations in R

This post will cover how to measure the relationship between two numeric variables with the corrr package. We will look at how to assess a variable’s distribution using skewness, kurtosis, […]

October 3, 2019October 4, 2019 Martin Frigaard Data Journalism in R, How to

How to download YouTube data in R using “tuber” and “purrr”

Accessing YouTube’s metadata such as views, likes, dislikes and comments is simple in R thanks to thetuber package by Gaurav Sood. Sood wrote an excellent, easy-to-use package for accessing the […]

September 23, 2019September 23, 2019 Martin Frigaard Data Journalism in R, How to

How to build a website with Blogdown in R

Want to build a website right in RStudio? blogdown is an R package that allows you to create websites from R markdown files using Hugo, an open-source static site generator […]

May 6, 2019August 3, 2019 Martin Frigaard Data Journalism in R, How to

How to access APIs in R

APIs, or application program interfaces, are a way for people to access data in a plain text format using multiple programming languages. Many websites, organizations and services offer APIs for […]

April 22, 2019August 3, 2019 Martin Frigaard Data Journalism in R, How to, Insights

Pivoting data from columns to rows (and back!) in the tidyverse

TLDR: This tutorial was prompted by the recent changes to the tidyr package (see the tweet from Hadley Wickham below). Two functions for reshaping columns and rows (gather() and spread()) […]

March 27, 2019August 3, 2019 Martin Frigaard Data Journalism in R, How to

From deep learning to clean_names(), resources from Data Journalism in R

Books to check out Deep Learning in R This text is from by Francois Chollet and J. J. Allaire. The authors cover these topics in-depth with plenty of code examples. Analyzing Baseball Data […]

March 5, 2019March 5, 2019 Martin Frigaard Data Journalism in R

Scraping HTML tables and downloading files with R

The Department of Criminal Justice in Texas keeps records of every inmate they execute. This tutorial will show you how to scrape that data, which lives in a table on […]

January 16, 2019January 17, 2019 Martin Frigaard Data Journalism in R, How to

How to install R on a Jupyter notebook

This post walks through how to install R on a Jupyter notebook, load in data and build a visualization. Start by installing python using homebrew. Install python Open Terminal and enter the […]

November 29, 2018November 29, 2018 Martin Frigaard Data Journalism in R, How to

How to get Twitter data with rtweet in R

There’s a new process for getting data from Twitter with rtweet, so I put this document together as a guide for users looking for help in setting up the API, […]

November 15, 2018 Martin Frigaard Data Journalism in R, How to

How to build an animated map of tweets about the NBA finals in R

After beating the Cleveland Cavaliers in four games, the Golden State Warriors have won the 2018 NBA finals. We decided to build an animated map of Twitter mentions of #DubNation […]

June 13, 2018June 13, 2018 Martin Frigaard Data Journalism in R, How to

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 […]

February 23, 2018March 23, 2018 Martin Frigaard Data Journalism in R, How to, Reinventing Local TV News

Posts navigation

Older posts
Join us

Want to write for Storybench and probe the frontiers of media innovation? Apply for one of our graduate programs at Northeastern University’s School of Journalism.

Rolling admissions, no GREs required and financial aid available. Email here.

Get the latest from Storybench

Keep up with tutorials, behind-the-scenes interviews and more.


Proudly powered by WordPress | Theme: NewsAnchor by aThemes.