[GH-ISSUE #302] How to retrieve tracks based on features values? #172

Closed
opened 2026-02-27 23:21:12 +03:00 by kerem · 1 comment
Owner

Originally created by @JessicaMartini212887 on GitHub (Jun 22, 2018).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/302

Hi, for my thesis project I have done the k-means clustering on multiple variables, in particular the "audio features object" variables.
The results from the k-means clustering is a certain number of centroid with its coordinates.

For example, here are 4 centroids with coordinates:
[[ 2.98386190e-02 7.12142857e-01 8.38761905e-01 2.13014333e-01 4.00000000e+00 2.25995238e-01 -8.14200000e+00 4.76190476e-01 4.85000000e-02 1.38954048e+02 3.95238095e+00 6.87857143e-01] [ 1.04000000e-02 1.85000000e-01 9.48000000e-01 0.00000000e+00 8.00000000e+00 1.05000000e-01 -3.89200000e+00 1.00000000e+00 1.47000000e-01 1.96578000e+02 3.00000000e+00 3.16000000e-01] [ 2.90790000e-02 6.90000000e-01 6.14000000e-01 7.30000000e-05 5.00000000e+00 7.40000000e-02 -8.79900000e+00 1.00000000e+00 6.67500000e-02 8.70125000e+01 4.00000000e+00 5.02500000e-01] [ 5.22766923e-02 7.22115385e-01 8.16076923e-01 1.54899962e-01 6.23076923e+00 1.93623077e-01 -7.15776923e+00 4.23076923e-01 9.50038462e-02 1.30008923e+02 4.00000000e+00 6.42230769e-01]]
The firts number of the centroid corresponds to acousticness, the second to energy, the third to instrumentalness, etc.

Now, what I'd like to know is if it is possible to retrieve tracks with values near to these values using the Spotify Web API.

How could I make this?

Thank you very much

Originally created by @JessicaMartini212887 on GitHub (Jun 22, 2018). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/302 Hi, for my thesis project I have done the k-means clustering on multiple variables, in particular the "audio features object" variables. The results from the k-means clustering is a certain number of centroid with its coordinates. For example, here are 4 centroids with coordinates: `[[ 2.98386190e-02 7.12142857e-01 8.38761905e-01 2.13014333e-01 4.00000000e+00 2.25995238e-01 -8.14200000e+00 4.76190476e-01 4.85000000e-02 1.38954048e+02 3.95238095e+00 6.87857143e-01] [ 1.04000000e-02 1.85000000e-01 9.48000000e-01 0.00000000e+00 8.00000000e+00 1.05000000e-01 -3.89200000e+00 1.00000000e+00 1.47000000e-01 1.96578000e+02 3.00000000e+00 3.16000000e-01] [ 2.90790000e-02 6.90000000e-01 6.14000000e-01 7.30000000e-05 5.00000000e+00 7.40000000e-02 -8.79900000e+00 1.00000000e+00 6.67500000e-02 8.70125000e+01 4.00000000e+00 5.02500000e-01] [ 5.22766923e-02 7.22115385e-01 8.16076923e-01 1.54899962e-01 6.23076923e+00 1.93623077e-01 -7.15776923e+00 4.23076923e-01 9.50038462e-02 1.30008923e+02 4.00000000e+00 6.42230769e-01]]` The firts number of the centroid corresponds to acousticness, the second to energy, the third to instrumentalness, etc. Now, what I'd like to know is if it is possible to retrieve tracks with values near to these values using the Spotify Web API. How could I make this? Thank you very much
kerem 2026-02-27 23:21:12 +03:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner

@stephanebruckert commented on GitHub (Jan 1, 2020):

This repo is just a client/wrapper for the web API. Questions and requests for the web API can be made here https://github.com/spotify/web-api/

<!-- gh-comment-id:570079960 --> @stephanebruckert commented on GitHub (Jan 1, 2020): This repo is just a client/wrapper for the web API. Questions and requests for the web API can be made here https://github.com/spotify/web-api/
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#172
No description provided.