Skip to content

This package hosts tutorials (created with the learnr package) and sample data sets that are designed to facilitate learning the tidyverse with hockey data.

Notifications You must be signed in to change notification settings

meghall06/betweenthepipes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

betweenthepipes logo

betweenthepipes is an R package that currently holds two tutorials, created with learnr. There are also two sample data sets that are useful for learning to work with hockey data.

First, download this package via Github: devtools::install_github("meghall06/betweenthepipes").

Tutorial Details

  • Introduction to R with Hockey Data. A beginner-friendly introduction to R and the tidyverse with sample hockey data. Introduces the basic tidyverse functions: filter(), select(), arrange(), filter(), mutate(), group_by(), and summarize().
  • More Data Manipulation. Going further into data manipulation with details on pivoting data (using pivot_longer() and pivot_wider()), joining data, and working with strings.

How to Access Tutorials

Once the package has been downloaded, there are two options to access the tutorial. You can access each tutorial individually with the following code:

library(betweenthepipes)

intro()

data_manip()

Or, if you have an RStudio version 1.3 or later, there should be a Tutorial pane in the upper right corner (near Environment and Git). That pane should list all the tutorials available from the packages you've downloaded.

How to Access Data

There are two data sets available in this package: pbp_example and bio_example. pbp_example is a data set containing NHL play-by-play data for four Philadelphia Flyers games from November 2019. bio_example is a data set containing some NHL biographic data from 2019, useful for practicing joins with the data in pbp_example. More information on the data sets is available with ?betweenthepipes::bio_example or ?betweenthepipes::pbp_example.

# To load the data sets into the global environment
library(betweenthepipes)

bio_example <- bio_example
pbp_example <- pbp_example

Other Resources

In October 2020, I gave a tidyverse-focused workshop at the Carnegie Mellon Sports Analytics Conference using the data available in this package. The slides and code from the workshop are available on my website here.

Data Source

The play-by-play data was scraped using the Evolving-Hockey R scraper and the biographic data was downloaded from NaturalStatTrick.

About

This package hosts tutorials (created with the learnr package) and sample data sets that are designed to facilitate learning the tidyverse with hockey data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages