Yooooomi / your_spotify

Self hosted Spotify tracking dashboard
GNU General Public License v3.0
3.2k stars 133 forks source link

[Feature Request] Add more graphs #358

Open bloedboemmel opened 9 months ago

bloedboemmel commented 9 months ago

First all: Amazing project, especially now with the performance boost :)

I think it only needs a little more graphs. Spotify can give you a lot of audio features for every song and i would be great to display them in a simple graph (maybe in the same look like "Artist listening distribution" or "Best artists for hour of day") You can see that in their own example: image

There's also audio-analysis, but I think that would be too much I am not sure, if you are already saving the audio-features in the db, but i think it wouldn't affect the performance a lot.

Also I thought about adding a world map, which is showing your current "listening map" In my head it looks a little bit like that (but of course it's adjusted to the design of your_spotify): image

Let me know what you think about this feature and I will try to implement it

EDIT: Added audio-analysis

Yooooomi commented 9 months ago

Hello, I think it's a good idea! The feature would not be available before having synced the whole track database, which for me represents more than 100k tracks played. After that, stats are pretty simple to display. However I think we would need another way to display stats, as just piling up stats in the "All stats" page will not age well.

bloedboemmel commented 9 months ago

I totally agree with the arrangement of the "All stats". It would get too overloaded and also would take a long time to load.

bloedboemmel commented 9 months ago

After a quick research I found out that you can't get the country or location of the tracks or artists. So it wouldn't be possible to create the map (at least when using only the Spotify API)

Yooooomi commented 8 months ago

I'm still thinking about how I could change the UX a bit to display more stats or in a maybe less robotic way. If you ever cross cool websites or already have ideas, feel free to post them here :)

bloedboemmel commented 8 months ago

I already added the migrations and api-calls for the feature in my fork. I also tried to add the audio-features to the trackStats page, but right it only shows the numbers.

Maybe we can show energy, danceability and valence in bars from 0 to 1 (or valence as a emoji, but i think that wouldn't go well with the overall design)

BPM should be shown as a number and the numerical key should be shown in the corresponding pitch.

For the graphs in the overall stats we can determine, if the songs are more likely live (liveness), If they are more intrumentalness or have more speechiness We can map the average tempo per hour. Or the average mood per hour.

These are just some ideas, but I also couldn't find any graphs

bloedboemmel commented 8 months ago

I also found some interesting graphs here, which we could also implement image

And an interesting article over the additional audio-analysis

Yooooomi commented 8 months ago

Yeah I see the type of graph you can do. I honestly feel in your example that it's wow but in the actual usage it won't be very interesting you know. I'll check your current work regarding the addition of audio stats in the database.

qdlmcfresh commented 4 months ago

I think stats for genres would also be a great addition (like Stats for Spotify has it).

Matoxius commented 4 months ago

I second the genres Stats, I hear a lot of different genres and really would appreciate a graph that shows the most listened genres in a specific timeframe (Day/Month/Year etc.).

qdlmcfresh commented 2 months ago

I think stats for genres would also be a great addition (like Stats for Spotify has it).

@Yooooomi I'm currently looking into what would be needed to extend your_spotify with a "Top Genres" tab. However, I've encountered a few challenges:

  1. The only Spotify API endpoint that includes genres is the album endpoint. Unfortunately, this limits our ability to directly access genre data for other entities like tracks or artists.

  2. Upon inspecting the MongoDB collection, I noticed that while the genre field does exist for albums, every genre array is empty in my case.

image