Tag: rstats
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 […]
Working with The New York Times API in R
Have you ever come across a resource that you didn't know existed, but once you find it you wonder how you ever got along without it? I had this feeling earlier this week when I came across the […]
How to merge and clean up multiple CSVs using R
This tutorial solves a problem I was having when working through the exploratory data analysis exercises in Doing Data Science by Cathy O’Neil and Rachel Schutt. I highly recommended picking up a copy for yourself. The exercises in the book are intended for a […]
Sentiment analysis of (you guessed it!) Donald Trump’s tweets
In my last post, I demonstrated how to use the twitteR package to collect data from Twitter in R. I have since learned that while twitteR still works, it is in a state of “leisurely deprecation” according to […]
Twitter + R
Introducing twitteR If you've worked with R in any capacity, you've probably noticed by now that developers who create R packages love playing with the letter “R” in their naming schema. Well, twitteR is no different. The twitteR […]
Welcome to Data Journalism in R
Welcome to Data Journalism in R print(“Hello world”) ## [1] “Hello world” Now that we got that out of the way, welcome to a brand new Storybench vertical, Data Journalism in R! This space will be home to […]
Getting started with data visualization in R using ggplot2
Creating a customized graph that communicates your ideas effectively can be challenging. This tutorial will introduce you to the popular R package ggplot2, its underlying grammar of graphics, and show you how to create stylish and simple graphs […]
How to manipulate data with dplyr in R
In the last tutorial we introduced the concept of tidy data, which is characterized by having one observation per row, and one variable per column. We also went over how to change to shape of our data set with tidyr using data sets […]
How to make small multiples in R using geom_line()
We’ve been exploring and visualizing datasets from the fivethirtyeight R package for various Storybench tutorials. (See our tidyr tutorial and our barplot tutorial). Below, we’ve written a tutorial to create a grid of line charts that all use the same scale and axes in R – otherwise known […]