forked from adror1/nwslR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
77 lines (55 loc) · 2.81 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# nwslR <img src='man/figures/hex-nwslR.png' align="right" height="139" />
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) [![CRAN status](https://www.r-pkg.org/badges/version/nwslR)](https://CRAN.R-project.org/package=nwslR) [![Travis build status](https://travis-ci.org/adror1/nwslR.svg?branch=master)](https://travis-ci.org/adror1/nwslR) <!-- badges: end -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# nwslR
`nwslR` is an R package that contains datasets and analysis functionality for the National Women’s Soccer League (NWSL). Founded in 2013, the NWSL is the United States’ top professional women’s soccer league, featuring players from all over the world.
Previously, data regarding the league has been disparate and often difficult to find. The goal of this package is to make it easier for fans and analysts to access and engage with all these data in one place. We're just getting started here; we still have a few [issues](https://github.com/adror1/nwslR/issues) open where we could use some help! Additionally, if you see anything you'd like added, changed, or updated, please open up a new issue of your own.
## Install
You can install the current version of nwslR from GitHub using:
```{r, eval=FALSE}
devtools::install_github("adror1/nwslR")
```
## Load
```{r}
library(nwslR)
```
## Available Tables
- `award`: dataset of player awards received each season
- `fieldplayer_overall_season_stats`: season-by-season data for each NWSL field player
- `franchise`: team names, ids, and locations throughout their history in the league
- `game`: dataset of `game_id`s and game results that each correspond to an individual game
- `goalkeeper_season_stats`: season-by-season data for each NWSL goalkeeper
- `stadium`: historical and current stadium information and statistics
- `team_stats_season`: season level statistics for each team from the league's inception through present-day
## Example: Player Statistics
```{r}
head(nwslR::fieldplayer_overall_season_stats)
```
## Example: Team IDs
```{r}
head(nwslR::franchise, 15)
```
## Functionality
```{r, eval = FALSE}
nwslR::get_adv_team_stats(2016) #scrapes and formats hundreds of advanced team statistics from the NWSL website
```
```{r}
harris <- nwslR::player_search("Harris", goalkeeper = TRUE)
head(harris)
```
For further examples and capabilities, please see the [vignette](https://github.com/adror1/nwslR/blob/master/vignettes/nwslR_overview.Rmd)
## Contributors
- [Arielle Dror](https://github.com/adror1)
- [Sophia Tannir](https://github.com/stannir98)