-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.Rmd
58 lines (40 loc) · 1.66 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
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
message = FALSE, warning = FALSE
)
```
# discogger <img src="man/figures/logo.png" width="160px" align="right" />
[](https://www.tidyverse.org/lifecycle/#experimental)
[](https://travis-ci.org/ewenme/discogger)
## Overview
Tools for working with the [Discogs](https://www.discogs.com) API in R.
Discogs Developers Site: [https://www.discogs.com/developers](https://www.discogs.com/developers)
## Install
Development version
```{r install_dev, eval=FALSE}
devtools::install_github('ewenme/discogger')
```
## Authenticate
1. [Create a Discogs API v2 application](https://www.discogs.com/settings/developers)
2. Generate a personal access token from your [API application page](https://www.discogs.com/settings/developers)
3. Set your credentials in the System Environment variable `DISCOGS_API_TOKEN` by calling the `discogs_api_token()` function and entering your Discogs application personal access token when prompted.
## Use
```{r}
library(discogger)
library(tidyverse)
```
### Who released the most Dance Mania records?
```{r}
# get dance mania records listed on discogs
dm_recs <- discogs_label_releases(label_id = 314)
dm_recs$content %>%
group_by(artist) %>%
summarise(n_releases = n_distinct(catno)) %>%
arrange(desc(n_releases)) %>%
top_n(10)
```
## Contribute
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.