tsm_read_albums: Importing Album Data from tsort.info

Description Usage Arguments Details See Also Examples

View source: R/read_data.R

Description

tsm_read_albums reads the top 3000 albums. A wrapper for readr::read_csv with convenient defaults, see parameters.

Usage

1
2
3
4
5
6
tsm_read_albums(
  version = tsm_get_version(),
  na = "unknown",
  tsort_path = "https://tsort.info/csv/",
  ...
)

Arguments

version

The version in string format. Defaults to function reading the current version from tsort.info. Example: "2-8-0025".

na

How unknown years are encoded, in string format.

tsort_path

URL to Website.

...

Pass additional parameters to readr::read_csv. See ?read_csv for details.

Details

Note that usage of data from tsort.info is free under the following conditions:

1. Acknowledge the source.

2. Prominently link to https://tsort.info

3. Always include version number.

See Also

Other read functions: tsm_get_version(), tsm_read_chart(), tsm_read_songs()

Examples

1
2
3
4
5
6
7
8
## Not run: 
## Read Top 3000 albums
albums <- tsm_read_albums()

## Access file version number:
attr(albums, "version")

## End(Not run)

fjodor/tsortmusicr documentation built on May 16, 2020, 4:53 p.m.