-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
115 lines (75 loc) · 4.44 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
111
112
113
114
115
---
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%"
)
options(tibble.print_min = 5,
pillar.bold = TRUE,
pillar.min_chars = 25,
pillar.min_title_chars = 25,
dplyr.summarise.inform = FALSE,
rmarkdown.html_vignette.check_title = FALSE)
eval <- TRUE
tryCatch(expr = {
download.file("https://github.com/ffverse/ffpros-tests/archive/main.zip","f.zip")
unzip('f.zip', exdir = ".")
httptest::.mockPaths(new = "ffpros-tests-main")},
warning = function(e) eval <<- FALSE,
error = function(e) eval <<- FALSE)
httptest::use_mock_api()
```
# ffpros <a href='#'><img src="man/figures/logo.png" align="right" width="25%" min-width="120px"/></a>
<!-- badges: start -->
<!-- [![CRAN status](https://img.shields.io/cran/v/ffpros?style=flat-square&logo=R&label=CRAN)](https://CRAN.R-project.org/package=ffpros) -->
[![Dev status](https://img.shields.io/github/r-package/v/ffverse/ffpros/main?label=dev%20version&style=flat-square&logo=github)](https://ffpros.dynastyprocess.com/)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg?style=flat-square)](https://lifecycle.r-lib.org/articles/stages.html)
[![R build status](https://img.shields.io/github/workflow/status/ffverse/ffpros/R-CMD-check?label=R%20check&style=flat-square&logo=github)](https://github.com/ffverse/ffpros/actions)
[![Live test status](https://img.shields.io/github/workflow/status/ffverse/ffpros/TestLiveSite?label=Live%20check&style=flat-square&logo=github)](https://github.com/ffverse/ffpros/actions)
[![Codecov test coverage](https://img.shields.io/codecov/c/github/ffverse/ffpros?label=codecov&style=flat-square&logo=codecov)](https://codecov.io/gh/ffverse/ffpros?branch=main)
[![nflverse discord](https://img.shields.io/discord/789805604076126219?color=7289da&label=nflverse%20discord&logo=discord&logoColor=fff&style=flat-square)](https://discord.com/invite/5Er2FBnnQa)
<!-- badges: end -->
Helps scrape FantasyPros.com by handling rate-limiting/caching/parsing and returning tidy dataframes which can be easily connected to other data sources.
_Renamed from fpscrapr to ffpros on 2021-06-14 so that all ffverse packages start with ff_
## Installation
Install the stable version of this package from the [ffverse r-universe repository](https://ffverse.r-universe.dev):
```{r eval = FALSE}
install.packages("ffpros", repos = "https://ffverse.r-universe.dev")
```
Install the development version with either [DynastyProcess's r-universe](https://dynastyprocess.r-universe.dev) or remotes + GitHub:
```{r eval = FALSE}
# ffverse's r-universe
install.packages("ffpros", repos = "https://dynastyprocess.r-universe.dev")
# or via GitHub c/o remotes/devtools: # install.packages('remotes')
remotes::install_github("ffverse/ffpros")
```
## Usage
All `ffpros` functions start with fp_ for ease of autocomplete.
The fp_rankings function retrieves fantasy ranks from FantasyPros.com.
```{r example, message = FALSE}
library(ffpros)
fp_rankings(page = "consensus-cheatsheets") # defaults to nfl!
fp_rankings(page = "ros-overall", sport = "nhl")
```
Default configuration options are detailed in the [configuration options vignette](https://ffpros.dynastyprocess.com/articles).
## Support
The best places to get help on this package are:
- the [nflverse discord](https://discord.com/invite/5Er2FBnnQa) (for both this package as well as anything R/NFL related)
- opening [an issue](https://github.com/ffverse/ffpros/issues/new/choose)
## Contributing
Many hands make light work! Here are some ways you can contribute to this project:
- You can [open an issue](https://github.com/ffverse/ffpros/issues/new/choose) if you'd like to request specific data or report a bug/error.
- You can [sponsor this project with donations](https://github.com/sponsors/tanho63)!
- If you'd like to contribute code, please check out [the contribution guidelines](https://ffpros.dynastyprocess.com/CONTRIBUTING.html).
## Terms of Use
The R code for this package is released as open source under the [MIT license](https://ffpros.dynastyprocess.com/LICENSE.html).
The data accessed by this package belongs to FantasyPros.com, and is governed by their terms of use.
```{r include = FALSE}
httptest::stop_mocking()
unlink(c("ffpros-tests-main","f.zip"), recursive = TRUE, force = TRUE)
```