UserData: Last.FM last.year data

Description Usage Arguments Format Fields Methods

Description

This class can be used to import data for a specific http://www.last.fm user from a specific year by calling the user.getRecentTracks (https://www.last.fm/api/show/user.getRecentTracks) function. The whole data will be stored inside the data_table data.frame of the class.

Usage

1
2
3
data <- UserData$new(username, API_KEY, year)

album_analysis <- data$albumstats()

Arguments

username

character username character The http://www.last.fm user whos data shall be taken

API_KEY

character The http://www.last.fm API key of your app or any app

year

integer Year which shall be analyzed

Format

An R6Class generator object

Fields

username

character The http://www.last.fm user whos data shall be taken

apikey

character The http://www.last.fm API key of your app or any app

data_table

data.frame A data table containing the last years tracks of the user in the columns

  • artist: Artist Name

  • track: Track Name

  • album: Album Name

  • uts: Time as a Javascript time starting 1970-01-01

  • datetext: Time as Human readible text

Methods

create_api(page)

This method uses page to create the API json call needed for last.fm

get_data(year)

This method downloads the last.fm data of a specific year into the data_table field

album_stats(exclude_artist="Die drei ???",min_tracks=5,sort_by=c("by_total_count","by_album_count"))

This method creates a table with album statistics for the specific year


zappingseb/analyze_last_fm documentation built on May 11, 2019, 7:24 p.m.