-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
100 lines (72 loc) · 3.09 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
---
output: github_document
editor_options:
chunk_output_type: console
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
cache = TRUE
)
library(kaggler)
options(width = 100)
options(tibble.print_min = 5)
options(tibble.print_max = 5)
```
# kaggler <img src="man/figures/logo.png" width="160px" align="right" />
> 🏁 An R client for accessing [Kaggle](https://www.kaggle.com)'s API
<!-- badges: start -->
[![R-CMD-check](https://github.com/KoderKow/kaggler/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/KoderKow/kaggler/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
## Installation
You can install the dev version of **{kaggler}** from [CRAN](https://github.com/koderkow/kaggler) with:
```{r, eval = FALSE}
## install kaggler package from github
devtools::install_github("koderkow/kaggler")
```
# API Authorization
All users must be authenticated to interact with Kaggle’s APIs. To setup your API key refer to the [Get Started](https://koderkow.github.io/kaggler/articles/kaggler.html) guide.
# Interacting with the API
These will be functions the user can call to have custom control over the returns and interactions with the Kaggle API.
Browse or search for Kaggle competitions.
```{r complist}
## look through all competitions (paginated)
comps1 <- kgl_competitions_list()
comps1
## search by keyword for competitions
imagecomps <- kgl_competitions_list(search = "image")
imagecomps
```
You can look up the datalist for a given Kaggle competition using the API.
```{r}
## data list for a given competition
c1_datalist <- kgl_competitions_data_list("titanic")
c1_datalist
```
For a more in-depth walkthrough visit the [Kaggle API](https://koderkow.github.io/kaggler/articles/kaggle-api.html) page.
# Kaggle Flow
This is an **experimental** and **opinionated** reproducible workflow
for working with Kaggle competitions.
``` r
library(kaggler)
kgl_flow("titanic")
#> • These files will be downloaded:
#> - 'gender_submission'
#> - 'test'
#> - 'train'.
#> • Downloading 'gender_submission.csv'...
#> • Downloading 'test.csv'...
#> • Downloading 'train.csv'...
```
For a more in-depth walkthrough visit the [Kaggle
Flow](https://koderkow.github.io/kaggler/articles/kgl-flow.html) page.
## Note(s)
- The base of this package was cloned from the original at [{kaggler}](https://github.com/mkearney/kaggler). I have decided to take the developers work and continue their amazing development! Major props and recognition goes out to the original developer(s) of this package.
- I will be updating all documentation and examples for the README and functions for this package as time goes on
- The the developers are in no way affiliated with Kaggle.com, and, as such, makes no assurances that there won't be breaking changes to the API at any time
- Although the developers are not affiliated, it's good practice to be informed, so here is the link to Kaggle's terms of service: https://www.kaggle.com/terms