https://github.com/memgraph/spotify-song-recommender
A Spotify song recommendation engine built with the power of graph analytics.
https://github.com/memgraph/spotify-song-recommender
graph-algorithms memgraph pager spotify spotify-api
Last synced: 8 months ago
JSON representation
A Spotify song recommendation engine built with the power of graph analytics.
- Host: GitHub
- URL: https://github.com/memgraph/spotify-song-recommender
- Owner: memgraph
- License: mit
- Created: 2021-08-23T06:18:07.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-09T07:52:20.000Z (over 3 years ago)
- Last Synced: 2025-07-12T19:01:02.134Z (10 months ago)
- Topics: graph-algorithms, memgraph, pager, spotify, spotify-api
- Language: Python
- Homepage: https://memgraph.github.com/spotify-song-recommender
- Size: 6.46 MB
- Stars: 41
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Spotify Playlist Recommendation Application
Create playlists while being recommended songs that you will love!
## :clipboard: Description
The world of music is constantly growing. Year by year, it is harder to keep up
with trends and new songs that keep popping up. Luckily, there are enough people
listening to music that finding new songs in playlists from people with similar
tastes might not be so difficult after all. This project aims to serve as a
recommendation engine for people searching for new songs they will enjoy based
on the songs they currently listen to.
## :books: Dataset
The [Spotify playlist
dataset](https://www.aicrowd.com/challenges/spotify-million-playlist-dataset-challenge)
contains 5 million song playlists from different users. Each playlist contains a
list of music tracks. The data model sample is given below:
show dataset sample
{
"name": "musical",
"collaborative": "false",
"pid": 5,
"modified_at": 1493424000,
"num_albums": 7,
"num_tracks": 12,
"num_followers": 1,
"num_edits": 2,
"duration_ms": 2657366,
"num_artists": 6,
"tracks": [
{
"pos": 0,
"artist_name": "Degiheugi",
"track_uri": "spotify:track:7vqa3sDmtEaVJ2gcvxtRID",
"artist_uri": "spotify:artist:3V2paBXEoZIAhfZRJmo2jL",
"track_name": "Finalement",
"album_uri": "spotify:album:2KrRMJ9z7Xjoz1Az4O6UML",
"duration_ms": 166264,
"album_name": "Dancing Chords and Fireflies"
},
// 10 tracks omitted
{
"pos": 11,
"artist_name": "Mo' Horizons",
"track_uri": "spotify:track:7iwx00eBzeSSSy6xfESyWN",
"artist_uri": "spotify:artist:3tuX54dqgS8LsGUvNzgrpP",
"track_name": "Fever 99\u00b0",
"album_uri": "spotify:album:2Fg1t2tyOSGWkVYHlFfXVf",
"duration_ms": 364320,
"album_name": "Come Touch The Sun"
}
],
}
## :zap: Features
- Generate song recommendations -
[similar_tracks.py](https://github.com/memgraph/spotify-song-recommender/blob/main/memgraph/query_modules/similar_tracks.py)
- Find a similar playlist -
[similar_playlists.py](https://github.com/memgraph/spotify-song-recommender/blob/main/memgraph/query_modules/similar_playlists.py)
- Discover trendy songs -
[trendy_tracks.py](https://github.com/memgraph/spotify-song-recommender/blob/main/memgraph/query_modules/trendy_tracks.py)
## :shipit: Installation
1. Download and install [Docker](https://www.docker.com/get-started)
2. Clone this repository, or download the files with GitHub.
3. Download the complete [Spotify
dataset](https://www.aicrowd.com/challenges/spotify-million-playlist-dataset-challenge#dataset)
and place the `.json` files in the directory `/producer/data` (the first
file is already there, you can just replace it).
## :question: Usage
1. Run these commands in your favorite terminal/cmd:
```
docker-compose build
docker-compose up
```
2. Open the app on the address [localhost:80](localhost:80).
## Contributors ✨
Thanks goes to these wonderful people ([emoji
key](https://allcontributors.org/docs/en/emoji-key)):

Jure Bajic

Mislav Vuletic

Dominik Tomicevic
This project follows the
[all-contributors](https://github.com/all-contributors/all-contributors)
specification. Contributions of any kind welcome!