{"id":14066445,"url":"https://github.com/ppatrzyk/lastfmR","last_synced_at":"2025-07-29T23:31:05.297Z","repository":{"id":80380597,"uuid":"109599358","full_name":"ppatrzyk/lastfmR","owner":"ppatrzyk","description":"R package for getting last.fm data","archived":false,"fork":false,"pushed_at":"2019-03-31T16:18:05.000Z","size":62,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-04T06:36:24.209Z","etag":null,"topics":["lastfm","music","r","rstats","scrobble"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ppatrzyk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-11-05T17:12:43.000Z","updated_at":"2024-01-17T13:48:07.000Z","dependencies_parsed_at":"2023-06-06T17:30:24.194Z","dependency_job_id":null,"html_url":"https://github.com/ppatrzyk/lastfmR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ppatrzyk/lastfmR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppatrzyk%2FlastfmR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppatrzyk%2FlastfmR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppatrzyk%2FlastfmR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppatrzyk%2FlastfmR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ppatrzyk","download_url":"https://codeload.github.com/ppatrzyk/lastfmR/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ppatrzyk%2FlastfmR/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267779969,"owners_count":24143200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lastfm","music","r","rstats","scrobble"],"created_at":"2024-08-13T07:05:06.147Z","updated_at":"2025-07-29T23:31:05.017Z","avatar_url":"https://github.com/ppatrzyk.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# lastfmR\nR package wrapping useful [last.fm](https://www.last.fm/) API methods. The package leverages [concurrent requests](https://www.rdocumentation.org/packages/curl/versions/3.3/topics/multi) to enable *fast* data export.\n\n## Installation\n\n```R\nremotes::install_github(\"ppatrzyk/lastfmR\")\n# OR\ndevtools::install_github(\"ppatrzyk/lastfmR\")\n```\n\nThe package requires as dependencies [`curl`](https://cran.r-project.org/web/packages/curl/), [`data.table`](https://cran.r-project.org/web/packages/data.table/) and [`xml2`](https://cran.r-project.org/web/packages/xml2/index.html).\n\n## Usage\n\n### get_scrobbles\n\nThis function will download all scrobbles for a specified user. Example:\n\n```R\nscrobbles \u003c- get_scrobbles(user = \"grinder91\")\n\u003e scrobbles[sample(.N, 5), ]\n                  date        artist              track                             album\n1: 2014-04-29 10:23:24 The Awakening Before I Leap (XV)                      Anthology XV\n2: 2009-11-25 17:46:06  Judas Priest  Take on the World Killing Machine [Remastered] [UK]\n3: 2016-07-16 10:02:38  FOREVER GREY     Full Of Lights                              \u003cNA\u003e\n4: 2011-06-26 10:36:23       Bauhaus  Small Talk Stinks                 In the Flat Field\n5: 2019-02-15 22:20:35          Past             Czarna                    czarno / biala\n```\n\nScrobble dates indicate when you *started* to play given track in *GMT* timezone. You can pass an optional `timezone` parameter with a timezone name (run `OlsonNames()` if in doubt) if you need. E.g., `get_scrobbles(user = \"grinder91\", timezone = 'Europe/Warsaw')`.\n\n### get_artist_info\n\nThis function will download information about specific artists. Example:\n\n```R\nartists \u003c- c(\"Anthrax\", \"Metallica\", \"Megadeth\", \"Slayer\")\nartist_info \u003c- get_artist_info(artist_vector = artists)\n\u003e artist_info\n      artist global_listeners global_scrobbles                                              artist_tags\n1:   Anthrax           867775         25910522 thrash metal; metal; heavy metal; speed metal; seen live\n2: Metallica          2890695        280742907        thrash metal; metal; heavy metal; hard rock; rock\n3:  Megadeth          1410966         97458296 thrash metal; heavy metal; metal; speed metal; seen live\n4:    Slayer          1366827         82132980 thrash metal; metal; seen live; speed metal; heavy metal\n```\n\n### get_library_info\n\nExtension of `get_artist_info`. Gets list of artists in a specified user's library and information about them. Example:\n\n```R\nartist_info \u003c- get_library_info(user = \"grinder91\")\n\u003e artist_info[sample(.N, 5), ]\n            artist user_scrobbles global_listeners global_scrobbles                                             artist_tags\n1:    Peine Perdue             15             2645            35717   minimal synth; minimal wave; french; synthpop; france\n2:        Motorama             10           171162          7331742          post-punk; new wave; indie; russian; seen live\n3:     Perturbator             97           149293          6829118 synthwave; electronic; synthpop; retro electro; electro\n4:   The Deep Wave              1              180              905               new wave; post-punk; retrowave; synthwave\n5: Psychoformalina            621              739            13435      zimna fala; post-punk; cold wave; coldwave; polish\n```\n\nIf you only need user_scrobbles, set `user_scrobbles_only = TRUE` in function call, the function will return faster.\n\n### get_tags\n\nGet all tags and their frequencies for specified artists (you can pass multiple names). Example:\n\n```R\ntags \u003c- get_tags(artist_vector = 'Manowar')\n\u003e head(tags, 5)\n    artist         tag tag_freq\n1: Manowar heavy metal      100\n2: Manowar Power metal       49\n3: Manowar       metal       35\n4: Manowar  true metal       28\n5: Manowar  epic metal       21\n```\n\nNote that last.fm returns tag frequencies on a normalized scale (1-100). These are not absolute counts.\n\n### get_tracks\n\nGet tracks and their listeners and scrobbles for a specified artist. Example:\n\n```R\ntracks \u003c- get_tracks(artist = 'Siekiera')\n\u003e head(tracks, 5)\n               track listeners scrobbles\n1:  Nowa Aleksandria     19617    121351\n2:    Ludzie wschodu     17710    105302\n3: Idziemy przez las     15468     82805\n4:  Idziemy na skraj     12944     67068\n5:  Jest bezpiecznie     10237     49799\n```\n\nNote that last.fm limits this method to only first 10000 tracks.\n\n### get_similar\n\nGet similar artists for a given artist. Example:\n\n```R\nedgelist \u003c- get_similar('Closterkeller')\n# Get also similarity for artist similar to your input (2nd level)\nlevel2 \u003c- rbindlist(lapply(\n  edgelist[, To], get_similar\n))\nedgelist \u003c- rbindlist(list(edgelist, level2))\n\u003e head(edgelist)\n            From             To    match\n1: Closterkeller       Artrosis        1\n2: Closterkeller      Moonlight 0.998498\n3: Closterkeller         O.N.A. 0.630667\n4: Closterkeller Renata Przemyk 0.485797\n5: Closterkeller      Chylińska 0.469014\n6: Closterkeller  XIII. Století 0.402615\n```\n\nThe function returns a `data.table` formatted as edgelist, which is handy if you want to analyze it as a graph (either in *R* or other software such as *Gephi*). `match` is a number on 0-1 scale indicating artist's similarity (returned directly by last.fm).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppatrzyk%2FlastfmR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fppatrzyk%2FlastfmR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fppatrzyk%2FlastfmR/lists"}