-
Notifications
You must be signed in to change notification settings - Fork 14
/
README.Rmd
63 lines (40 loc) · 1.91 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
---
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "75%")
```
# understatr <img src="man/figures/logo.png" alt="" width="120" align="right" />
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![R-CMD-check](https://github.com/ewenme/understatr/workflows/R-CMD-check/badge.svg)](https://github.com/ewenme/understatr/actions)
## Overview
An R package to help with retrieving tidy [understat](https://understat.com/) data.
## Install
`understatr` is not likely to be submitted to CRAN. Get the latest development version from GitHub:
```{r, eval=FALSE}
remotes::install_github('ewenme/understatr')
```
## Use
```{r}
library(understatr)
```
### Check currently available leagues/seasons:
```{r}
get_leagues_meta()
```
### Get stats for a team's playing squad in a league season:
```{r}
get_team_players_stats(team_name = "Manchester City", year = 2018)
```
### Get stats for a player across all seasons:
```{r}
get_player_seasons_stats(player_id = 618)
```
## Issues
If you encounter a clear bug, please file a minimal reproducible example on [GitHub](https://github.com/ewenme/understatr/issues). For questions and other discussion, try [stackoverflow](https://stackoverflow.com/) or [e-mail]([email protected]).
## Disclaimer
While there is no official notice on the site condoning web scraping activity, Understat's [support]([email protected]) have previously confirmed (via e-mail exchange, 8th November 2018) that their data is free to use for non-commercial purposes. This stance is subject to change.
Also, be polite and attribute the source.
---
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms.