Skip to content

A function that downloads all your scrobbles from last.fm into R

License

Notifications You must be signed in to change notification settings

lozalojo/lastfm-to-R

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

lastfm-to-R

This function will download all your scrobbles from last.fm into R.

It requires R package XML. Run the following if you do not have it installed:

install.packages("XML")
library(XML)

Usage

First run the script to import the function to the environment; then run the following line:

lastfm <- lastfm_export("enter_your_username")

lastfm is a data.frame object. Each row corresponds to one scrobble. It contains 6 columns:

  • artist

  • track

  • album

  • fulldate

  • time

  • weekday

The difference between fulldate and time is that fulldate contains both date and time (YYYY-MM-DD HH:MM:SS), while time contains only time (HH:MM:SS). time variable is useful if you want to analyze listening patterns depending on the part of a day.

About

A function that downloads all your scrobbles from last.fm into R

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%