Prifina for Developers
  • Docs
  • Getting Data
  • Support
  • Slack
  • Blog
  • Prifina.com

Artificial Spotify Data for Software Development

12/5/2022

 
In this post, we are going deeper into the Dynamic Data project, looking at the Spotify dynamic data (library available here on GitHub and at NPM). Opening the library, you’ll see there is one type of data object: Album, Artist, ArtistRelatedArtists, ArtistTopTracks, Episode, Playlist, Shows, Track, TrackAudioAnalysis, TrackAudioFeatures, and UserProfile.
Learn more about dynamic data generators and the benefits of artificial data in software development.
Picture

About the data source

Spotify (iOS|Android) is the market leader in digital Music Streaming, offering users the option to stream audiobooks, music, and podcasts from Spotify's wide catalogue featuring millions of songs across the genre spectrum. The user can add any song they enjoy to one of their playlists. Additionally, the user can like songs, ablums, artists, and playlists to quickly replay them. AI recommendations are also suggested through Radios (a list of songs similar to the song,artist,album or playlist selected) and Mixes (a daily generated list of songs similar to a group of songs liked in the past). The app is free and ad-supported however, Spotify offers a Premium subscription service that offers the user the option to download music locally for offline listening, ad-free, unlimited skipping, and more.
Picture

Approach used

Spotify has an API that grants access to its entire catalogue of audiobooks, music and podcasts, and the user’s preferences to that catalogue: saved audiobooks, episodes, music, playlist, genres, etc. These requests generate JSON objects that are then stored in an NPM package. The index file of the package imports this data object and exports it in a collection called “Data”. These mockup files make up the spotify-data package.
Album
Artist
ArtistRelatedArtists
ArtistTopTracks
Episodes
Playlist
Shows
Track
TrackAudioAnalysis
TrackAudioFeatures
UserProfile
Models Generated With JSON Crack
The spotify-mockups package imports the files above and goes through each attribute generating artificial (new) data using proprietary functions, such as those found in the utils package.

For example, with the UserProfile object:
Static UserProfile Object

    
Artificial UserProfile Object

    

Use case ideas

  • Entertainment Apps
  • Data Visualization apps
  • etc

Ideas to combine with some other data sources

  • Use with health tracking sensors such as Oura, Whoop. Withings to play/recommend uplifting music when feeling down or depressed, calming music when anxious, etc
  • Use with workout apps such as Fitbit, Oura, Peloton, Runkeeper, Strava to curtail a workout playlist based on the user’s performance whilst listening to certain songs
  • Use with Google Location to suggest songs based on the locality of the user: popular artists originated from the area, most-listened-to albums, songs artists, etc within the area, etc
  • Or with some entirely different segment data, like air quality, weather, location, or similar find interesting new applications for the data.

Open-source data library

We welcome contributions and forks to this data set, and look forward to seeing what developers build in our Liberty. Equality. Data. Slack channel.

Considerations for next version/improvements

  • Fully Explore the API, include all possible GET requests endpoint
  • Generate random image urls for artists and albums, similar to picsum for integration into sites
  • Generate random sensible values for TrackAudioAnalysis such as segment, bars, etc
  • Select a selection of available markets instead of returning the full list
  • Return sensible string names instead of a string of random characters
With Prifina developers can use the Dynamic Data Libraries natively in the App Studio to build direct to consumer apps where individuals can run them with their own user-held data.
Join our Slack community; Liberty. Equality. Data. to brainstorm and collaborate with other app developers, designers, and our team.

Comments are closed.

    Categories

    All
    23andme
    Ancestry
    Apple
    Dynamic Data
    Fitbit
    Google
    Ios
    Movesense
    Open Source
    Oura
    Peloton
    Polar
    Runkeeper
    Sensor BNO055
    Spotify
    Strava
    Twitch
    Uber
    Use Case
    Veri
    Whoop
    Withings

    RSS Feed

© 2023 PRIFINA INC. ​
Terms of Service
Privacy Policy
About Prifina
  • Docs
  • Getting Data
  • Support
  • Slack
  • Blog
  • Prifina.com