A brief introduction to mixed effects models and how to run them in R, with a silly hockey example.
Techniques in ggplot2 to make your plots more flexible and robust to changing data.
An introduction to the basic functions of the cowplot package for arranging plots together.
Fun and custom-looking alternatives to simple color legends in ggplot2.
Course materials for 36-315, a full-credit undergraduate course at Carnegie Mellon University on data visualization in R.
Writing a user-defined function and applying it iteratively: an example with NHL standings points.
I built this package to hold sample data and learnr tutorials, all about learning the tidyverse with hockey data.
Two tutorials available, using the package learnr, for learning R with hockey data.
Slides from a useR group lightning talk on getting started with creating custom themes in ggplot2.
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.
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.
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.
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.
From Hockey-Graphs A tutorial on how to combine NHL play-by-play data with manually-tracked data, with the help of the padr package in R. Click here to read this article on Hockey-Graphs.