-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
111 lines (78 loc) · 6.02 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
# library(fastRhockey)
# library(tidyverse)
# library(janitor)
```
# fastRhockey Data Repository
This repository holds historical boxscore and play-by-play data for the Premier Hockey Federation (PHF, formerly known as NWHL), which was compiled with the [**`fastRhockey`**](https://github.com/BenHowell71/fastRhockey/) package from [GitHub](https://github.com/BenHowell71/fastRhockey).
You can find [**`fastRhockey`**](https://github.com/BenHowell71/fastRhockey/) here: [BenHowell71/fastRhockey](https://github.com/BenHowell71/fastRhockey/)
The scraper was created to increase access to play-by-play and boxscore data for the PHF, which has historically been one of the bigger barriers to entry regarding women's hockey analytics.
<center>
![](logo/fastRhockey_full_holographic_graphic.png){width=50%}
</center>
*****************************************************************
## Installation
You can install the released version of [**`fastRhockey`**](https://github.com/BenHowell71/fastRhockey/) from [GitHub](https://github.com/BenHowell71/fastRhockey) with:
``` r
# You can install using the pacman package using the following code:
if (!requireNamespace('pacman', quietly = TRUE)){
install.packages('pacman')
}
pacman::p_load_current_gh("BenHowell71/fastRhockey", dependencies = TRUE, update = TRUE)
```
If you would prefer the `devtools` installation:
``` r
# if you would prefer devtools installation
if (!requireNamespace('devtools', quietly = TRUE)){
install.packages('devtools')
}
# Alternatively, using the devtools package:
devtools::install_github(repo = "BenHowell71/fastRhockey")
```
Once the [**`fastRhockey`**](https://github.com/BenHowell71/fastRhockey/) package has been installed, make sure you check out the brief walkthrough on the functions on the [GitHub page](https://github.com/BenHowell71/fastRhockey/). This repo only contains the boxscore and play-by-play data from 2016-2021.
*****************************************************************
## Data
This repo contains three main CSVs of data, each of which is outlined in a little more detail below.
- `phf_meta_data.csv`: this csv contains all the data that you'd want on an individual game in one row. Contains home/away teams, arena information, game IDs, league IDs, and more
- `boxscore.csv`: this csv contains all the boxscore information from the PHF for the games in `phf_meta_data.csv`. Contains data on game ID, scoring by period, shots be period, power play numbers, and more, all broken down by each team involved in a game
- `play_by_play.csv`: this csv contains all the play-by-play data from the PHF. It includes information on events, how many skaters were on the ice, penalties, shots, etc. This data is essentially complete for the more recent PHF seasons, while it is spottier, usually just goals and penalties, from the early seasons of the league
The best way to get familiar with this data is to use it! You can either download directly from this repo or use [**`fastRhockey`**](https://github.com/BenHowell71/fastRhockey/) to scrape the data yourself.
********************************************************************
# Follow [SportsDataverse](https://twitter.com/sportsdataverse) on Twitter and star this repo
[![Twitter Follow](https://img.shields.io/twitter/follow/sportsdataverse?color=blue&label=%40sportsdataverse&logo=twitter&style=for-the-badge)](https://twitter.com/sportsdataverse)
[![GitHub stars](https://img.shields.io/github/stars/BenHowell71/fastRhockey.svg?color=eee&logo=github&style=for-the-badge&label=Star%20fastRhockey&maxAge=2592000)](https://github.com/BenHowell71/fastRhockey/stargazers/)
# **Our Authors**
- [Ben Howell](https://twitter.com/BenHowell71)
<a href="https://twitter.com/BenHowell71" target="blank"><img src="https://img.shields.io/twitter/follow/BenHowell71?color=blue&label=%40BenHowell71&logo=twitter&style=for-the-badge" alt="@BenHowell71" /></a>
<a href="https://github.com/BenHowell71" target="blank"><img src="https://img.shields.io/github/followers/BenHowell71?color=eee&logo=Github&style=for-the-badge" alt="@BenHowell71" /></a>
# **Our Contributors (they're awesome)**
- [Saiem Gilani](https://twitter.com/saiemgilani)
<a href="https://twitter.com/saiemgilani" target="blank"><img src="https://img.shields.io/twitter/follow/saiemgilani?color=blue&label=%40saiemgilani&logo=twitter&style=for-the-badge" alt="@saiemgilani" /></a>
<a href="https://github.com/saiemgilani" target="blank"><img src="https://img.shields.io/github/followers/saiemgilani?color=eee&logo=Github&style=for-the-badge" alt="@saiemgilani" /></a>
- [Alyssa Longmuir](https://twitter.com/alyssastweeting)
<a href="https://twitter.com/alyssastweeting" target="blank"><img src="https://img.shields.io/twitter/follow/alyssastweeting?color=blue&label=%40alyssastweeting&logo=twitter&style=for-the-badge" alt="@alyssastweeting" /></a>
<a href="https://github.com/Aklongmuir" target="blank"><img src="https://img.shields.io/github/followers/Aklongmuir?color=eee&logo=Github&style=for-the-badge" alt="@Aklongmuir" /></a>
- [Tan Ho](https://twitter.com/_TanHo)
<a href="https://twitter.com/_TanHo" target="blank"></a>
<a href="https://github.com/tanho63" target="blank"><img src="https://img.shields.io/github/followers/tanho63?color=eee&logo=Github&style=for-the-badge" alt="@tanho63" /></a>
## **Citations**
To cite the [**`fastRhockey`**](https://benhowell71.github.io/fastRhockey/) R package in publications, use:
BibTex Citation
```bibtex
@misc{howell_fastRhockey_2021,
author = {Ben Howell},
title = {fastRhockey: The SportsDataverse's R Package for Women's Hockey Data.},
url = {https://benhowell71.github.io/fastRhockey/},
year = {2021}
}
```