R

CMU Data Viz Course

Course materials for 36-315, a full-credit undergraduate course at Carnegie Mellon University on data visualization in R.

Between The Pipes

I built this package to hold sample data and learnr tutorials, all about learning the tidyverse with hockey data.

Learning R with Hockey Data in Swirl

The swirl package is an incredibly neat learning tool that teaches you how to use R via interactive learning in the RStudio console. And an associated package called swirlify allows anyone to create lessons that can then be used by anyone using swirl. I’ve created a course called Hockey Data With Swirl that aims to teach you basic tidyverse functions using hockey data. The data set used in the swirl lesson is the same one used in my introduction to R at Hockey-Graphs, and the content is similar, but not quite identical.

Exploring tidymodels With Hockey Data

Before we start, an important disclaimer: this is not a tutorial on how to thoughtfully build and thoroughly evaluate models. This is a gentle introduction to the tidymodels package (which, like the tidyverse, is actually a collection of packages), and in order to examine various functions and capabilities of those packages, we’ll build two very simple models, using easily available NHL data, and go over a few ways to evaluate them.

An Introduction to R With Hockey Data

From Hockey-Graphs I have written a couple articles over the past few months on using R with hockey data (see here and here), but both of those articles were focused on intermediate techniques and presumed beginner knowledge of R. In contrast, this article is for the complete beginner. We’ll go through the steps of downloading and setting up R and then, with the use of a sample hockey data set, learn the very basics of R for exploring and visualizing data.

Exploratory Data Analysis Using Tidyverse

From Hockey-Graphs Welcome to the second article in our series on basic data cleaning and data manipulation! In this article, we’re going to use play-by-play data from two NHL games and answer two questions: which power play unit generated the best shot rate in each game? which defenseman played the most 5v5 minutes in each game? In the process of doing so, we’ll cover several topics of basic data manipulation in the tidyverse, including using functions, creating joins, grouping and summarizing data, and working with string data.