Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rhiskey/05a813f0efe63c48ae5ca41dcda55b6c to your computer and use it in GitHub Desktop.
Save rhiskey/05a813f0efe63c48ae5ca41dcda55b6c to your computer and use it in GitHub Desktop.
SpotifyMusicClustering_seminarus_CyberKoala.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "SpotifyMusicClustering_seminarus_CyberKoala.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyOyp97PCa/Ud5BArbSiPQN3",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/rhiskey/05a813f0efe63c48ae5ca41dcda55b6c/spotifymusicclustering_seminarus_cyberkoala.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"source": [
"\n",
"https://www.kaggle.com/datasets/iamsumat/spotify-top-2000s-mega-dataset/download\n"
],
"metadata": {
"id": "r668cTfT2unG"
}
},
{
"cell_type": "markdown",
"source": [
"# Кластеризация музыкальных жанров в Spotify"
],
"metadata": {
"id": "iy-kqSoh4SEt"
}
},
{
"cell_type": "markdown",
"source": [
"## Загрузка выборки"
],
"metadata": {
"id": "itkbevHq4N8H"
}
},
{
"cell_type": "code",
"source": [
"from google.colab import files\n",
"files.upload()"
],
"metadata": {
"id": "dykG04Ov3YxR"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!mkdir ~/.kaggle\n",
"!cp kaggle.json ~/.kaggle/\n",
"!chmod 600 ~/.kaggle/kaggle.json"
],
"metadata": {
"id": "qLowpivG3hU6",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "ac7c8118-3f8a-431f-83f5-3f2d67e69c27"
},
"execution_count": 46,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"mkdir: cannot create directory ‘/root/.kaggle’: File exists\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!kaggle datasets download -d iamsumat/spotify-top-2000s-mega-dataset"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "VRh2TFx83XCE",
"outputId": "da959b21-d6a1-4445-9fab-2524a30b8cfb"
},
"execution_count": 47,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"spotify-top-2000s-mega-dataset.zip: Skipping, found more recently modified local copy (use --force to force download)\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!unzip -qq spotify-top-2000s-mega-dataset.zip"
],
"metadata": {
"id": "GDVIlBFz3kKr",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "deb270ee-d643-4977-e8ba-6b7ec8b21358"
},
"execution_count": 48,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"replace Spotify-2000.csv? [y]es, [n]o, [A]ll, [N]one, [r]ename: "
]
}
]
},
{
"cell_type": "markdown",
"source": [
"## Подготовка выборки"
],
"metadata": {
"id": "t1kyx49L27DM"
}
},
{
"cell_type": "code",
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"from sklearn import cluster\n",
"\n",
"data = pd.read_csv(\"Spotify-2000.csv\")\n",
"data.head()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 302
},
"id": "LDyoxJol26EJ",
"outputId": "2f09d3b8-c02a-4a20-de4d-36dcee7f777b"
},
"execution_count": 49,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Index Title Artist Top Genre \\\n",
"0 1 Sunrise Norah Jones adult standards \n",
"1 2 Black Night Deep Purple album rock \n",
"2 3 Clint Eastwood Gorillaz alternative hip hop \n",
"3 4 The Pretender Foo Fighters alternative metal \n",
"4 5 Waitin' On A Sunny Day Bruce Springsteen classic rock \n",
"\n",
" Year Beats Per Minute (BPM) Energy Danceability Loudness (dB) \\\n",
"0 2004 157 30 53 -14 \n",
"1 2000 135 79 50 -11 \n",
"2 2001 168 69 66 -9 \n",
"3 2007 173 96 43 -4 \n",
"4 2002 106 82 58 -5 \n",
"\n",
" Liveness Valence Length (Duration) Acousticness Speechiness Popularity \n",
"0 11 68 201 94 3 71 \n",
"1 17 81 207 17 7 39 \n",
"2 7 52 341 2 17 69 \n",
"3 3 37 269 0 4 76 \n",
"4 10 87 256 1 3 59 "
],
"text/html": [
"\n",
" <div id=\"df-3a334c42-6e0a-461e-a1cd-a3c25c99cf26\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Index</th>\n",
" <th>Title</th>\n",
" <th>Artist</th>\n",
" <th>Top Genre</th>\n",
" <th>Year</th>\n",
" <th>Beats Per Minute (BPM)</th>\n",
" <th>Energy</th>\n",
" <th>Danceability</th>\n",
" <th>Loudness (dB)</th>\n",
" <th>Liveness</th>\n",
" <th>Valence</th>\n",
" <th>Length (Duration)</th>\n",
" <th>Acousticness</th>\n",
" <th>Speechiness</th>\n",
" <th>Popularity</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>Sunrise</td>\n",
" <td>Norah Jones</td>\n",
" <td>adult standards</td>\n",
" <td>2004</td>\n",
" <td>157</td>\n",
" <td>30</td>\n",
" <td>53</td>\n",
" <td>-14</td>\n",
" <td>11</td>\n",
" <td>68</td>\n",
" <td>201</td>\n",
" <td>94</td>\n",
" <td>3</td>\n",
" <td>71</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>Black Night</td>\n",
" <td>Deep Purple</td>\n",
" <td>album rock</td>\n",
" <td>2000</td>\n",
" <td>135</td>\n",
" <td>79</td>\n",
" <td>50</td>\n",
" <td>-11</td>\n",
" <td>17</td>\n",
" <td>81</td>\n",
" <td>207</td>\n",
" <td>17</td>\n",
" <td>7</td>\n",
" <td>39</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>Clint Eastwood</td>\n",
" <td>Gorillaz</td>\n",
" <td>alternative hip hop</td>\n",
" <td>2001</td>\n",
" <td>168</td>\n",
" <td>69</td>\n",
" <td>66</td>\n",
" <td>-9</td>\n",
" <td>7</td>\n",
" <td>52</td>\n",
" <td>341</td>\n",
" <td>2</td>\n",
" <td>17</td>\n",
" <td>69</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>The Pretender</td>\n",
" <td>Foo Fighters</td>\n",
" <td>alternative metal</td>\n",
" <td>2007</td>\n",
" <td>173</td>\n",
" <td>96</td>\n",
" <td>43</td>\n",
" <td>-4</td>\n",
" <td>3</td>\n",
" <td>37</td>\n",
" <td>269</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>76</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>Waitin' On A Sunny Day</td>\n",
" <td>Bruce Springsteen</td>\n",
" <td>classic rock</td>\n",
" <td>2002</td>\n",
" <td>106</td>\n",
" <td>82</td>\n",
" <td>58</td>\n",
" <td>-5</td>\n",
" <td>10</td>\n",
" <td>87</td>\n",
" <td>256</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>59</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-3a334c42-6e0a-461e-a1cd-a3c25c99cf26')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-3a334c42-6e0a-461e-a1cd-a3c25c99cf26 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-3a334c42-6e0a-461e-a1cd-a3c25c99cf26');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 49
}
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {
"id": "5iIUX8-B2lMO"
},
"outputs": [],
"source": [
"data = data.drop(\"Index\", axis=1)"
]
},
{
"cell_type": "code",
"source": [
"data.corr()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 363
},
"id": "cM9M1Lol4Gyk",
"outputId": "37bf181c-8c73-4ee6-ef83-4724944c05b8"
},
"execution_count": 51,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Year Beats Per Minute (BPM) Energy \\\n",
"Year 1.000000 0.012570 0.147235 \n",
"Beats Per Minute (BPM) 0.012570 1.000000 0.156644 \n",
"Energy 0.147235 0.156644 1.000000 \n",
"Danceability 0.077493 -0.140602 0.139616 \n",
"Loudness (dB) 0.343764 0.092927 0.735711 \n",
"Liveness 0.019017 0.016256 0.174118 \n",
"Valence -0.166163 0.059653 0.405175 \n",
"Acousticness -0.132946 -0.122472 -0.665156 \n",
"Speechiness 0.054097 0.085598 0.205865 \n",
"Popularity -0.158962 -0.003181 0.103393 \n",
"\n",
" Danceability Loudness (dB) Liveness Valence \\\n",
"Year 0.077493 0.343764 0.019017 -0.166163 \n",
"Beats Per Minute (BPM) -0.140602 0.092927 0.016256 0.059653 \n",
"Energy 0.139616 0.735711 0.174118 0.405175 \n",
"Danceability 1.000000 0.044235 -0.103063 0.514564 \n",
"Loudness (dB) 0.044235 1.000000 0.098257 0.147041 \n",
"Liveness -0.103063 0.098257 1.000000 0.050667 \n",
"Valence 0.514564 0.147041 0.050667 1.000000 \n",
"Acousticness -0.135769 -0.451635 -0.046206 -0.239729 \n",
"Speechiness 0.125229 0.125090 0.092594 0.107102 \n",
"Popularity 0.144344 0.165527 -0.111978 0.095911 \n",
"\n",
" Acousticness Speechiness Popularity \n",
"Year -0.132946 0.054097 -0.158962 \n",
"Beats Per Minute (BPM) -0.122472 0.085598 -0.003181 \n",
"Energy -0.665156 0.205865 0.103393 \n",
"Danceability -0.135769 0.125229 0.144344 \n",
"Loudness (dB) -0.451635 0.125090 0.165527 \n",
"Liveness -0.046206 0.092594 -0.111978 \n",
"Valence -0.239729 0.107102 0.095911 \n",
"Acousticness 1.000000 -0.098256 -0.087604 \n",
"Speechiness -0.098256 1.000000 0.111689 \n",
"Popularity -0.087604 0.111689 1.000000 "
],
"text/html": [
"\n",
" <div id=\"df-a4d85af2-a254-4294-82a8-ddacda72049d\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Year</th>\n",
" <th>Beats Per Minute (BPM)</th>\n",
" <th>Energy</th>\n",
" <th>Danceability</th>\n",
" <th>Loudness (dB)</th>\n",
" <th>Liveness</th>\n",
" <th>Valence</th>\n",
" <th>Acousticness</th>\n",
" <th>Speechiness</th>\n",
" <th>Popularity</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Year</th>\n",
" <td>1.000000</td>\n",
" <td>0.012570</td>\n",
" <td>0.147235</td>\n",
" <td>0.077493</td>\n",
" <td>0.343764</td>\n",
" <td>0.019017</td>\n",
" <td>-0.166163</td>\n",
" <td>-0.132946</td>\n",
" <td>0.054097</td>\n",
" <td>-0.158962</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Beats Per Minute (BPM)</th>\n",
" <td>0.012570</td>\n",
" <td>1.000000</td>\n",
" <td>0.156644</td>\n",
" <td>-0.140602</td>\n",
" <td>0.092927</td>\n",
" <td>0.016256</td>\n",
" <td>0.059653</td>\n",
" <td>-0.122472</td>\n",
" <td>0.085598</td>\n",
" <td>-0.003181</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Energy</th>\n",
" <td>0.147235</td>\n",
" <td>0.156644</td>\n",
" <td>1.000000</td>\n",
" <td>0.139616</td>\n",
" <td>0.735711</td>\n",
" <td>0.174118</td>\n",
" <td>0.405175</td>\n",
" <td>-0.665156</td>\n",
" <td>0.205865</td>\n",
" <td>0.103393</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Danceability</th>\n",
" <td>0.077493</td>\n",
" <td>-0.140602</td>\n",
" <td>0.139616</td>\n",
" <td>1.000000</td>\n",
" <td>0.044235</td>\n",
" <td>-0.103063</td>\n",
" <td>0.514564</td>\n",
" <td>-0.135769</td>\n",
" <td>0.125229</td>\n",
" <td>0.144344</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Loudness (dB)</th>\n",
" <td>0.343764</td>\n",
" <td>0.092927</td>\n",
" <td>0.735711</td>\n",
" <td>0.044235</td>\n",
" <td>1.000000</td>\n",
" <td>0.098257</td>\n",
" <td>0.147041</td>\n",
" <td>-0.451635</td>\n",
" <td>0.125090</td>\n",
" <td>0.165527</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Liveness</th>\n",
" <td>0.019017</td>\n",
" <td>0.016256</td>\n",
" <td>0.174118</td>\n",
" <td>-0.103063</td>\n",
" <td>0.098257</td>\n",
" <td>1.000000</td>\n",
" <td>0.050667</td>\n",
" <td>-0.046206</td>\n",
" <td>0.092594</td>\n",
" <td>-0.111978</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Valence</th>\n",
" <td>-0.166163</td>\n",
" <td>0.059653</td>\n",
" <td>0.405175</td>\n",
" <td>0.514564</td>\n",
" <td>0.147041</td>\n",
" <td>0.050667</td>\n",
" <td>1.000000</td>\n",
" <td>-0.239729</td>\n",
" <td>0.107102</td>\n",
" <td>0.095911</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Acousticness</th>\n",
" <td>-0.132946</td>\n",
" <td>-0.122472</td>\n",
" <td>-0.665156</td>\n",
" <td>-0.135769</td>\n",
" <td>-0.451635</td>\n",
" <td>-0.046206</td>\n",
" <td>-0.239729</td>\n",
" <td>1.000000</td>\n",
" <td>-0.098256</td>\n",
" <td>-0.087604</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Speechiness</th>\n",
" <td>0.054097</td>\n",
" <td>0.085598</td>\n",
" <td>0.205865</td>\n",
" <td>0.125229</td>\n",
" <td>0.125090</td>\n",
" <td>0.092594</td>\n",
" <td>0.107102</td>\n",
" <td>-0.098256</td>\n",
" <td>1.000000</td>\n",
" <td>0.111689</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Popularity</th>\n",
" <td>-0.158962</td>\n",
" <td>-0.003181</td>\n",
" <td>0.103393</td>\n",
" <td>0.144344</td>\n",
" <td>0.165527</td>\n",
" <td>-0.111978</td>\n",
" <td>0.095911</td>\n",
" <td>-0.087604</td>\n",
" <td>0.111689</td>\n",
" <td>1.000000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-a4d85af2-a254-4294-82a8-ddacda72049d')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-a4d85af2-a254-4294-82a8-ddacda72049d button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-a4d85af2-a254-4294-82a8-ddacda72049d');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 51
}
]
},
{
"cell_type": "markdown",
"source": [
"# Кластерный анализ для звуковых данных\n",
"## K-means кластеризация\n"
],
"metadata": {
"id": "RvEq_B6N4CYQ"
}
},
{
"cell_type": "code",
"source": [
"data2 = data[[\"Beats Per Minute (BPM)\", \"Loudness (dB)\", \"Liveness\",\n",
" \"Valence\", \"Acousticness\", \"Speechiness\"]]"
],
"metadata": {
"id": "IXY2TEIO5A_B"
},
"execution_count": 52,
"outputs": []
},
{
"cell_type": "code",
"source": [
"from sklearn.preprocessing import MinMaxScaler\n",
"\n",
"for element in data.columns:\n",
" MinMaxScaler(element)"
],
"metadata": {
"id": "uyfXth-64-Aa"
},
"execution_count": 56,
"outputs": []
},
{
"cell_type": "code",
"source": [
"from sklearn.cluster import KMeans\n",
"\n",
"kmeans = KMeans(n_clusters=10)\n",
"clusters = kmeans.fit_predict(data2)"
],
"metadata": {
"id": "E__ZEqNx4hjl"
},
"execution_count": 57,
"outputs": []
},
{
"cell_type": "code",
"source": [
"data[\"Genre Segments\"] = clusters\n",
"\n",
"MinMaxScaler(data[\"Genre Segments\"])\n",
"\n",
"data[\"Genre Segments\"] = data[\"Genre Segments\"].map(\n",
" {1: \"Кластер 1\",\n",
" 2: \"Кластер 2\",\n",
" 3: \"Кластер 3\",\n",
" 4: \"Кластер 4\",\n",
" 5: \"Кластер 5\",\n",
" 6: \"Кластер 6\", \n",
" 7: \"Кластер 7\",\n",
" 8: \"Кластер 8\",\n",
" 9: \"Кластер 9\",\n",
" 10: \"Кластер 10\",\n",
" }\n",
")"
],
"metadata": {
"id": "0ytdkPKe5PdF"
},
"execution_count": 61,
"outputs": []
},
{
"cell_type": "code",
"source": [
"data.head()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 320
},
"id": "C7JDwoQs5tiD",
"outputId": "1c299986-53b6-4329-bcde-707dd6ee7a46"
},
"execution_count": 62,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Title Artist Top Genre Year \\\n",
"0 Sunrise Norah Jones adult standards 2004 \n",
"1 Black Night Deep Purple album rock 2000 \n",
"2 Clint Eastwood Gorillaz alternative hip hop 2001 \n",
"3 The Pretender Foo Fighters alternative metal 2007 \n",
"4 Waitin' On A Sunny Day Bruce Springsteen classic rock 2002 \n",
"\n",
" Beats Per Minute (BPM) Energy Danceability Loudness (dB) Liveness \\\n",
"0 157 30 53 -14 11 \n",
"1 135 79 50 -11 17 \n",
"2 168 69 66 -9 7 \n",
"3 173 96 43 -4 3 \n",
"4 106 82 58 -5 10 \n",
"\n",
" Valence Length (Duration) Acousticness Speechiness Popularity \\\n",
"0 68 201 94 3 71 \n",
"1 81 207 17 7 39 \n",
"2 52 341 2 17 69 \n",
"3 37 269 0 4 76 \n",
"4 87 256 1 3 59 \n",
"\n",
" Genre Segments \n",
"0 Кластер 2 \n",
"1 Кластер 7 \n",
"2 NaN \n",
"3 NaN \n",
"4 Кластер 6 "
],
"text/html": [
"\n",
" <div id=\"df-6523a573-ee81-4fca-8631-343b0d9c532e\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Title</th>\n",
" <th>Artist</th>\n",
" <th>Top Genre</th>\n",
" <th>Year</th>\n",
" <th>Beats Per Minute (BPM)</th>\n",
" <th>Energy</th>\n",
" <th>Danceability</th>\n",
" <th>Loudness (dB)</th>\n",
" <th>Liveness</th>\n",
" <th>Valence</th>\n",
" <th>Length (Duration)</th>\n",
" <th>Acousticness</th>\n",
" <th>Speechiness</th>\n",
" <th>Popularity</th>\n",
" <th>Genre Segments</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Sunrise</td>\n",
" <td>Norah Jones</td>\n",
" <td>adult standards</td>\n",
" <td>2004</td>\n",
" <td>157</td>\n",
" <td>30</td>\n",
" <td>53</td>\n",
" <td>-14</td>\n",
" <td>11</td>\n",
" <td>68</td>\n",
" <td>201</td>\n",
" <td>94</td>\n",
" <td>3</td>\n",
" <td>71</td>\n",
" <td>Кластер 2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Black Night</td>\n",
" <td>Deep Purple</td>\n",
" <td>album rock</td>\n",
" <td>2000</td>\n",
" <td>135</td>\n",
" <td>79</td>\n",
" <td>50</td>\n",
" <td>-11</td>\n",
" <td>17</td>\n",
" <td>81</td>\n",
" <td>207</td>\n",
" <td>17</td>\n",
" <td>7</td>\n",
" <td>39</td>\n",
" <td>Кластер 7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Clint Eastwood</td>\n",
" <td>Gorillaz</td>\n",
" <td>alternative hip hop</td>\n",
" <td>2001</td>\n",
" <td>168</td>\n",
" <td>69</td>\n",
" <td>66</td>\n",
" <td>-9</td>\n",
" <td>7</td>\n",
" <td>52</td>\n",
" <td>341</td>\n",
" <td>2</td>\n",
" <td>17</td>\n",
" <td>69</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>The Pretender</td>\n",
" <td>Foo Fighters</td>\n",
" <td>alternative metal</td>\n",
" <td>2007</td>\n",
" <td>173</td>\n",
" <td>96</td>\n",
" <td>43</td>\n",
" <td>-4</td>\n",
" <td>3</td>\n",
" <td>37</td>\n",
" <td>269</td>\n",
" <td>0</td>\n",
" <td>4</td>\n",
" <td>76</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Waitin' On A Sunny Day</td>\n",
" <td>Bruce Springsteen</td>\n",
" <td>classic rock</td>\n",
" <td>2002</td>\n",
" <td>106</td>\n",
" <td>82</td>\n",
" <td>58</td>\n",
" <td>-5</td>\n",
" <td>10</td>\n",
" <td>87</td>\n",
" <td>256</td>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>59</td>\n",
" <td>Кластер 6</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-6523a573-ee81-4fca-8631-343b0d9c532e')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-6523a573-ee81-4fca-8631-343b0d9c532e button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-6523a573-ee81-4fca-8631-343b0d9c532e');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 62
}
]
},
{
"cell_type": "code",
"source": [
"import plotly.graph_objects as go\n",
"\n",
"PLOT = go.Figure()\n",
"\n",
"for element in list(data[\"Genre Segments\"].unique()):\n",
" PLOT.add_trace(go.Scatter3d(\n",
" x = data[data[\"Genre Segments\"] == element]['Beats Per Minute (BPM)'],\n",
" y = data[data[\"Genre Segments\"] == element]['Energy'],\n",
" z = data[data[\"Genre Segments\"] == element]['Danceability'],\n",
" mode = 'markers',\n",
" marker_size = 6,\n",
" marker_line_width = 1,\n",
" name = str(element)\n",
" ))\n",
"\n",
"PLOT.update_traces(\n",
" hovertemplate = 'Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}'\n",
")\n",
"\n",
"PLOT.update_layout(\n",
" width = 800,\n",
" height = 800,\n",
" autosize = True,\n",
" showlegend = True,\n",
" scene = dict(\n",
" xaxis = dict(\n",
" title = 'Beats Per Minute (BPM)',\n",
" titlefont_color = 'black'\n",
" ),\n",
" yaxis = dict(\n",
" title = 'Energy',\n",
" titlefont_color = 'black'\n",
" ),\n",
" zaxis = dict(\n",
" title = 'Danceability',\n",
" titlefont_color = 'black')),\n",
" font = dict(family = \"Arial\", color = 'black', size = 12)\n",
" )"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 817
},
"id": "IurKjg1X57jd",
"outputId": "fec56a98-2b33-4beb-ad34-5f6de46ec38c"
},
"execution_count": 68,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/html": [
"<html>\n",
"<head><meta charset=\"utf-8\" /></head>\n",
"<body>\n",
" <div> <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script> <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
" <script src=\"https://cdn.plot.ly/plotly-2.8.3.min.js\"></script> <div id=\"8ec278a4-19de-4f89-9779-84de955406c9\" class=\"plotly-graph-div\" style=\"height:800px; width:800px;\"></div> <script type=\"text/javascript\"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"8ec278a4-19de-4f89-9779-84de955406c9\")) { Plotly.newPlot( \"8ec278a4-19de-4f89-9779-84de955406c9\", [{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"\\u041a\\u043b\\u0430\\u0441\\u0442\\u0435\\u0440 2\",\"x\":[157,176,178,160,171,173,159,162,144,174,179,184,170,186,199,160,166,184,155,174,174,161,170,163,150,155,159,169,184,167,161,181,146,169,159,180,178,177,200,184,151,178,194,190,204,159,170,171,177,172,161,172,175,156,174,176,148,174,164,166,177,167,179,154,175,172,174,144,176,170,156,154,168,175,168,174],\"y\":[30,74,68,61,20,30,64,33,34,6,47,44,68,40,36,64,29,51,54,28,13,38,46,51,66,28,17,26,34,47,43,39,31,38,16,43,34,32,42,9,32,29,93,24,41,57,35,34,55,94,26,14,45,41,90,47,48,33,43,50,21,61,54,24,10,40,38,26,91,34,30,36,7,76,80,26],\"z\":[53,66,30,36,34,32,52,56,64,35,33,27,44,32,28,59,38,35,27,36,50,35,18,49,25,50,48,47,38,30,31,36,30,23,41,22,39,29,29,39,38,30,49,45,62,35,56,28,52,46,54,39,42,45,41,35,39,38,26,40,49,24,45,50,38,39,21,36,21,25,40,45,17,36,53,45],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"},{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"\\u041a\\u043b\\u0430\\u0441\\u0442\\u0435\\u0440 7\",\"x\":[135,138,148,118,131,166,120,132,136,123,120,126,138,129,138,120,133,125,127,117,114,130,139,133,143,130,115,125,141,131,135,140,124,130,143,144,119,119,117,147,120,122,123,133,128,130,140,127,132,146,141,130,152,124,151,127,116,148,117,134,120,126,160,148,139,160,118,128,124,115,125,117,136,142,121,123,130,131,129,125,135,145,126,128,111,116,124,124,140,132,124,116,124,137,119,121,147,130,129,147,141,114,139,131,125,124,125,144,117,128,118,146,138,129,133,141,125,125,147,136,127,119,135,148,123,119,127,137,119,127,148,134,123,122,121,115,131,128,151,155,136,132,127,119,134,116,118,119,115,120,114,125,127,133,127,137,120,136,145,110,151,131,119,143,131,122,118,117,141,113,127,122,125,134,125,122,127,143,126,120,124,139,126,122,129,118,117,126,135,135,127,154,134,131,121,143,123,130,128,115,136,123,135,111,132,131,125,118,113,119,128,134,125,119,113,126,153,169,141,125,132,129,125,115,142,130,153,145,115,140,120,144,131,156,117,123,126,160,117,125,120,147,124,142,119,129,119,132,139,127,122,130,123,130,127,126,125,144,142,121,153,143,116,160,139,136,137,127,151,115,130,126,117,133,121,167],\"y\":[79,99,76,82,72,75,76,55,80,72,60,95,93,72,56,92,81,92,66,75,60,71,77,72,74,49,89,74,92,96,80,82,56,70,83,77,81,92,73,90,59,71,84,80,71,83,86,90,63,92,71,73,88,78,95,72,81,84,78,92,60,81,82,70,88,80,72,87,85,61,88,74,90,92,73,75,70,46,64,78,66,91,83,78,74,74,69,89,49,71,86,47,80,47,84,70,91,85,93,59,63,59,67,58,54,54,60,75,91,64,44,94,75,49,67,82,70,76,51,83,79,83,94,48,52,72,71,69,64,60,87,75,78,56,38,85,87,85,81,94,86,76,78,82,80,87,53,60,73,66,54,93,77,72,38,69,74,92,89,89,43,53,88,76,42,93,74,65,66,83,82,92,71,63,80,65,63,76,76,80,46,83,99,95,92,82,96,80,58,75,81,95,66,82,67,83,89,78,76,91,77,96,90,86,93,88,95,67,94,82,84,45,70,63,84,73,74,83,98,69,63,74,76,56,85,68,45,97,88,81,79,59,86,48,91,82,86,85,77,91,79,87,65,82,53,67,58,86,80,79,83,47,73,82,35,88,92,90,63,80,63,90,92,80,81,86,90,49,58,56,62,49,38,66,39,58],\"z\":[50,51,91,67,64,70,70,85,67,82,85,51,55,61,74,67,86,52,66,61,88,66,53,87,71,95,74,69,58,62,56,42,80,79,44,51,85,70,49,53,79,70,47,74,73,51,79,73,69,64,75,53,51,53,58,68,79,52,52,59,85,64,65,49,64,65,78,58,62,86,60,64,65,56,67,59,68,60,67,78,67,55,69,81,66,67,83,77,57,42,79,74,60,47,63,54,60,59,63,56,41,63,57,67,68,47,48,66,57,51,48,27,75,72,67,57,42,84,58,51,48,48,59,81,72,67,67,55,91,62,73,62,61,78,76,73,70,77,58,48,72,80,71,88,65,64,67,83,71,79,81,62,53,68,56,49,71,37,64,64,63,87,72,56,88,63,73,92,58,74,89,85,69,65,74,60,43,60,65,71,93,51,73,40,74,78,57,63,69,73,56,35,67,60,76,54,53,67,78,63,52,54,40,56,64,66,45,75,73,71,49,60,63,71,71,70,45,55,31,63,55,48,64,78,53,64,69,71,66,61,70,62,74,62,50,58,67,58,65,45,66,64,76,58,47,62,73,61,76,77,59,80,72,55,53,58,64,43,76,96,57,72,61,49,59,72,60,73,49,81,44,51,49,64,72,65],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"},{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"nan\",\"x\":[],\"y\":[],\"z\":[],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"},{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"\\u041a\\u043b\\u0430\\u0441\\u0442\\u0435\\u0440 6\",\"x\":[106,102,112,112,96,112,105,100,86,99,103,105,81,110,105,115,106,92,101,103,75,99,103,91,93,89,115,98,114,115,105,91,98,94,95,94,111,105,109,80,112,103,87,87,110,106,100,74,87,72,100,96,106,116,92,110,77,97,110,104,103,86,104,100,85,80,105,110,110,81,108,99,105,97,94,116,117,112,89,111,98,113,100,107,90,92,100,112,91,109,82,87,103,111,107,108,113,105,86,104,93,109,96,81,106,106,99,109,81,83,98,110,119,106,107,108,106,81,107,109,104,104,89,107,106,105,76,77,98,96,83,93,77,118,104,105,75,82,117,110,108,94,93,78,115,119,98,94,83,115,105,117,92,105,112,82,115,84,103,117,87,109,110,114,110,105,82,92,111,106,88,89,113,101,99,118,115,114,102,101,116,98,103,115,90,94,104,102,102,84,116,108,113,112,109,81,104,85,75,117,92,94,104,98,91,100,99,89,106,101,107,102,118,86,76,116,97,98,85,98,90,107,110,89,104,104,95,103,96,103,118,117,108,93,110,89,97,104,86,111,99,95,97,109,100,65,109,90,95,100,115,113,99,117,91],\"y\":[82,71,67,81,89,74,68,85,56,87,86,73,65,96,91,67,84,90,69,86,67,77,81,63,77,47,97,69,83,72,66,94,50,70,88,70,57,90,58,97,78,95,68,65,78,68,63,63,78,87,80,91,73,59,81,77,89,79,41,57,69,75,63,93,87,81,88,85,64,76,87,68,76,74,54,78,79,92,82,90,72,83,53,80,40,85,88,75,70,41,90,93,76,75,77,58,93,66,52,72,46,65,31,86,68,60,57,78,64,45,61,61,76,96,74,70,72,71,57,88,97,54,75,69,80,50,52,56,65,70,67,72,57,62,39,36,66,52,54,53,39,38,37,51,60,73,94,60,88,74,40,35,73,79,50,57,78,90,91,47,66,60,71,46,47,83,42,80,27,58,63,65,95,77,51,98,49,85,65,84,67,41,69,77,41,56,74,25,59,45,39,57,81,68,51,65,79,40,88,61,94,61,82,64,61,66,67,83,67,83,71,51,97,83,56,62,70,41,94,91,91,79,86,65,88,86,43,61,50,90,57,58,84,74,89,72,74,87,68,53,69,73,78,43,68,33,91,75,41,73,65,81,56,39,46],\"z\":[58,71,91,65,63,65,28,58,44,55,63,68,50,43,46,72,70,50,62,70,30,65,71,67,52,86,60,67,42,53,95,62,52,83,62,63,70,43,74,73,58,54,57,61,65,38,63,46,36,43,71,56,79,68,70,56,69,71,67,77,55,52,67,64,42,37,66,78,70,50,74,62,73,66,79,65,40,64,53,64,68,67,56,82,73,68,62,91,54,81,58,50,53,67,60,74,56,75,61,55,45,65,69,44,66,65,56,44,55,60,60,66,52,68,55,68,82,45,59,62,39,71,61,69,67,70,73,66,69,49,43,53,54,65,69,63,53,48,59,93,80,56,67,38,62,87,62,81,56,65,61,72,67,58,74,62,62,57,57,73,63,82,66,69,66,54,44,53,90,76,53,62,65,56,60,85,73,88,56,60,65,58,52,68,63,72,66,96,77,62,65,66,64,60,74,52,59,52,28,53,67,64,72,48,74,67,69,47,56,31,85,49,57,41,59,80,62,85,44,53,86,75,77,87,80,53,48,71,92,35,68,73,72,67,60,60,57,73,87,69,60,53,41,72,51,31,53,42,54,39,45,44,45,68,55],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"},{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"\\u041a\\u043b\\u0430\\u0441\\u0442\\u0435\\u0440 5\",\"x\":[99,87,80,75,76,96,99,88,79,105,94,68,109,96,94,75,101,97,92,100,80,92,91,109,92,105,80,90,98,110,79,100,98,90,111,76,98,88,104,85,81,93,105,95,109,108,110,89,108,104,95,97,79,79,88,90,95,107,100,92,103,71,85,75,86,108,77,85,93,102,94,83,90,49,106,87,92,98,95,74,95,75,80,103,103,92,96,69,96,105,100,98,68,109,100,105,86,94,98,94,76,91,81,102,85,92,82,104,80,90,102,102,89,91,104,98,104,64,94,102,91,91,80,98,88,96,77,101,81,82,82,95,99,81,81,110,86,98,99,98,73,90,77,75,96,82,100,97,90,103,104,86,74,92,90,91,77,80,73,85,83,109,89,105,89,81,104,91,92,104,95,93,94,90,105,75,90,94,84,93,99,94,100,94,80,76,110,74,84,54,90,88,68,61,81,75,96,76,87,77,98,102,94,77,102,109,96,81,96,90,95,98,95,99,100,97,103,106,98,71,80,76,82,108,111,110,80,102,90,95,80,103,101,87,89],\"y\":[46,31,47,64,77,60,70,32,60,86,84,72,42,64,77,92,78,55,57,63,72,57,59,78,95,81,77,25,35,87,64,78,73,52,84,58,68,87,59,58,39,93,59,94,84,72,56,73,68,61,47,73,73,33,40,71,55,69,76,71,76,63,53,55,41,88,51,43,48,73,34,41,74,37,67,65,74,55,84,51,45,71,66,64,63,87,62,62,39,66,61,73,58,52,71,52,61,68,56,45,66,38,60,72,60,38,50,46,33,90,58,37,59,42,56,58,41,46,32,63,73,82,48,93,69,90,70,75,62,45,77,56,68,47,61,31,42,41,50,94,45,100,29,53,68,28,98,69,82,69,29,58,42,84,86,37,68,64,73,35,69,85,76,94,85,55,60,47,43,34,43,26,48,43,83,41,82,45,79,57,65,29,80,77,51,71,43,23,54,56,86,38,51,36,54,51,66,39,49,52,91,59,46,42,39,50,80,90,77,40,64,62,91,21,65,15,13,30,50,53,50,44,24,69,32,58,29,44,90,72,45,59,42,55,55],\"z\":[54,27,62,37,46,53,69,52,56,56,52,60,35,59,37,51,44,62,62,61,51,26,56,70,66,55,78,52,54,51,47,60,60,63,62,35,62,25,56,50,14,44,43,33,64,58,71,63,61,28,37,50,50,40,37,51,78,30,51,56,45,51,55,48,21,54,57,67,74,48,38,27,49,39,57,66,70,37,60,36,60,60,55,62,48,51,41,59,57,40,70,67,23,57,55,77,51,54,70,49,22,25,22,50,27,59,33,31,49,47,52,82,39,44,43,52,79,27,48,68,49,53,59,42,43,47,41,36,63,51,56,57,37,48,58,40,30,75,29,51,53,28,55,44,64,52,27,67,29,44,71,54,69,41,57,75,36,29,21,56,31,28,36,39,63,55,66,53,52,65,44,33,31,39,35,52,40,36,10,58,59,74,79,53,65,52,60,45,77,36,53,42,33,34,56,36,64,26,59,44,51,59,56,62,48,27,22,39,59,62,30,60,92,34,53,52,59,35,39,52,50,31,55,51,65,55,26,48,41,27,39,47,48,27,38],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"},{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"\\u041a\\u043b\\u0430\\u0441\\u0442\\u0435\\u0440 1\",\"x\":[137,148,124,123,127,138,142,123,152,138,122,123,132,136,139,131,145,128,130,112,122,137,129,130,120,139,127,129,128,133,138,136,120,115,122,147,138,116,135,142,124,144,113,111,123,118,133,145,110,118,139,149,134,127,116,136,131,138,123,138,122,150,136,135,114,120,132,153,131,110,140,123,118,128,115,111,134,127,131,123,115,120,117,126,140,138,138,126,120,118,140,135,138,131,142,123,154,132,125,130,145,116,128,128,121,142,140,125,140,134,152,130,114,156,122,128,128,121,128,130,123,121,116,144,130,150,142,120,145,114,135,120,132,128,146,115,125,116,114,140,152,140,128,120,114,140,120,124,120,132,142,139,127,119,131,119,134,117,122,145,131,133,133,135,127,124,117,140,130,127,126,123,144,134,129,130,128,112,109,141,135,142,112,135,112,133,134,114,123,122,127,116,120,112,131,146,140,140,121,125,119,125,120,137,113,140,130,115,117,118,123,120,114,150,134,110,126,124,114,127,110,125,122,132,119,139,144,147,126,132,134,152,120,140,138,142,120,132,139,123,127,125,131,153,120,110,136,125,134,138,144,131,143,115,123,145,144,140,130,112,116,113,141,150,120,145,128,138,160,149,122,132,127,155,137,137,142,133,136,113,119,130,133,128,121,128,117,150,136,130,123,125,130,150,112,127,117,117,125,133,125,112,145,142,129,140,145,134,124,118,129],\"y\":[96,92,46,90,54,42,51,68,81,64,77,59,41,43,48,80,91,40,70,81,74,72,82,94,56,77,56,39,91,20,55,97,69,70,87,93,85,62,75,48,46,55,95,87,73,84,88,59,76,73,77,88,88,93,88,98,90,62,93,84,97,81,93,77,30,91,84,84,91,80,55,70,77,80,64,66,53,59,42,81,61,39,62,83,59,78,87,79,93,73,51,66,74,76,75,73,58,68,78,83,56,81,79,87,66,96,63,64,95,71,86,70,34,87,71,58,93,48,46,93,92,62,50,59,70,43,66,47,91,59,83,60,69,78,28,71,40,83,32,68,60,57,49,85,79,71,83,76,90,87,66,53,46,36,79,50,32,72,57,43,70,33,76,92,62,71,85,40,80,54,69,42,40,58,37,46,49,69,68,93,89,70,76,31,71,49,98,35,80,72,37,91,49,30,67,34,98,51,73,59,76,55,79,74,93,59,62,68,67,84,13,92,77,80,86,43,72,99,89,86,53,28,31,88,91,52,48,18,67,29,89,52,57,63,57,36,82,74,60,66,79,59,37,78,57,87,76,77,56,55,94,59,43,52,92,44,55,65,42,75,85,63,66,63,43,99,87,45,61,67,72,39,58,47,24,76,95,88,99,37,50,82,97,51,66,80,27,59,92,66,80,96,62,40,65,92,58,49,47,47,73,67,46,97,54,44,43,34,72,62,41],\"z\":[37,36,74,52,38,21,60,53,32,71,30,48,62,28,52,75,38,40,52,53,64,28,53,37,41,55,61,59,60,34,59,41,79,73,55,51,60,49,51,57,53,54,22,60,49,59,46,43,50,45,44,18,63,42,74,54,61,49,45,47,45,49,54,47,70,55,61,32,47,58,56,61,53,45,60,87,59,40,31,50,37,62,48,60,45,48,23,60,51,43,44,53,43,48,50,54,27,52,55,55,60,73,57,68,60,46,39,55,58,33,46,76,44,37,66,57,52,66,72,48,45,88,58,38,66,49,46,77,57,49,46,52,34,67,49,63,50,52,50,51,32,34,41,60,60,62,43,40,52,47,36,59,34,39,31,46,28,49,39,41,32,27,41,69,39,46,28,51,41,58,64,40,39,30,43,43,38,50,38,33,33,46,49,41,37,52,32,50,44,36,47,57,75,59,58,51,32,80,40,38,66,44,54,43,26,38,54,43,60,54,50,46,56,25,50,54,49,45,79,54,52,53,72,49,28,51,34,36,51,55,50,45,51,46,37,56,50,50,54,68,43,46,53,26,61,31,53,65,56,33,43,43,47,65,51,42,27,47,53,42,54,45,38,34,51,64,55,49,28,29,40,35,79,34,61,60,53,49,61,47,75,68,51,57,38,57,39,44,47,44,46,46,77,45,58,63,30,52,60,40,41,50,31,48,56,30,31,40,54,48,46],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"},{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"\\u041a\\u043b\\u0430\\u0441\\u0442\\u0435\\u0440 8\",\"x\":[109,133,130,142,146,108,149,124,110,122,138,125,119,128,124,126,112,110,130,124,113,128,123,134,128,122,120,144,117,146,137,108,131,132,135,155,116,117,131,126,122,131,149,137,124,119,112,126,123,120,144,131,146,129,116,108,146,130,135,147,114,122,146,134,108,123,106,142,108,148,110,113,143,128,140,132,136,148,128,123,140,138,133,125,115,119,145,137,136,109,136,120,116,140,121,136,112,138,138,134,125,126,121,135,123,118,140,133,139,137,135,134,113,129,125,133,121,112,111,114,132,137,117,123,110,108,116,123,131,125,134,115,110,116,120,121,129,142,120,132,130,116,125,113,142,153,132,139,132,138,119,136,150,135,123,124,121,136,126,153,135,131,116,136,127,139,140,119,111,113,129,127,107,132,128,112,136,129,121,119],\"y\":[5,42,48,24,44,35,30,59,35,49,44,41,38,37,46,17,8,33,41,33,55,52,34,36,30,67,49,44,18,40,33,74,75,29,33,20,33,45,32,32,26,28,20,30,39,26,31,34,54,26,40,22,58,66,39,38,69,44,23,31,44,39,45,41,40,55,27,28,7,63,41,17,40,32,21,33,33,21,36,38,39,48,32,53,31,4,27,53,16,33,55,48,22,24,47,14,36,32,29,52,27,28,37,28,65,17,42,43,45,34,27,23,21,23,67,38,32,32,42,19,7,48,34,16,8,55,28,41,31,6,38,8,31,31,30,8,16,18,32,27,51,83,15,31,28,40,47,43,53,44,25,46,80,37,36,43,36,37,31,23,55,48,19,17,10,28,43,26,24,28,25,18,29,17,21,52,6,44,3,24],\"z\":[44,42,55,34,56,47,33,47,39,35,46,67,52,61,56,33,53,63,61,76,67,64,45,67,48,63,60,47,54,38,51,59,58,54,56,42,53,49,29,65,39,33,28,59,61,46,62,47,45,42,56,46,47,57,69,61,59,72,40,55,37,58,54,46,49,55,72,59,52,49,50,68,44,55,59,30,50,33,38,44,43,53,42,68,55,47,40,60,44,56,43,36,28,25,56,45,48,26,27,40,62,55,51,30,55,43,32,39,59,54,55,35,38,42,42,51,50,38,56,69,19,49,65,46,52,63,44,70,50,41,44,67,67,32,46,50,63,44,74,32,57,64,59,65,39,54,57,57,58,50,54,53,29,24,30,42,57,53,45,38,44,30,56,54,34,49,44,67,60,33,34,56,55,41,38,46,32,54,31,75],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"},{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"\\u041a\\u043b\\u0430\\u0441\\u0442\\u0435\\u0440 9\",\"x\":[102,117,115,92,92,104,157,107,85,136,128,136,130,159,112,104,150,110,96,81,105,114,130,139,90,112,174,131,94,136,100,84,148,114,135,111,92,125,95,147,118,116,147,130,121,123,104,100,134,134,112,78,89,101,135,125,111,117,156,92,91,95,106,133,117,105,119,117,127,129,147,117,113,106,111,144,120,140,99,120,102,92,134,103,94,109,115,84,92,135,110,106,133,134,122,127,149,163,96,85,122,127],\"y\":[88,93,46,76,69,92,93,79,76,85,77,93,32,99,59,86,93,86,63,56,86,89,49,71,66,77,92,83,75,78,47,40,60,93,72,64,88,88,79,68,89,87,89,50,76,59,51,45,51,75,81,68,64,88,89,68,74,93,87,61,82,85,68,64,92,78,75,79,96,94,95,71,45,84,85,91,32,90,64,34,72,65,82,75,52,59,39,13,29,72,86,85,80,51,98,90,90,46,67,56,72,87],\"z\":[54,38,83,52,76,66,23,69,37,58,74,66,53,24,30,54,24,50,66,37,64,59,41,82,54,65,55,43,65,45,32,70,51,41,76,62,66,56,36,40,76,55,55,55,61,76,38,49,45,29,60,66,57,54,50,46,60,52,56,63,67,60,63,55,64,55,50,61,65,70,26,66,37,46,64,59,43,23,44,82,59,48,72,35,56,57,62,21,77,27,33,54,52,41,71,56,43,36,45,40,62,41],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"},{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"\\u041a\\u043b\\u0430\\u0441\\u0442\\u0435\\u0440 3\",\"x\":[74,88,72,90,77,101,83,61,104,93,79,58,96,99,79,104,100,92,105,76,70,95,83,73,79,67,81,68,90,78,75,82,82,94,83,96,94,82,97,74,91,100,99,85,80,82,79,89,76,78,85,73,76,78,79,93,80,84,86,85,95,78,100,90,72,105,98,84,90,90,103,90,86,82,87,87,89,73,97,72,106,91,96,98,80,99,92,76,89,82,76,92,80,87,92,83,105,86,60,73,90,83,92,100,79,81,81,105,37,68,81,96,102,90,67,84,87,77,76,84,73,61,90,79,81,79,90,86,94,104,101,91,96,82,85,87,95,98,82,84,102,87,94,81,92,75,87,81,89,94,67,74,105,84,97,90,78,73,73,87,98,99,71,70,100,94,99,76,89,77,81,80,99,84,91,77,87,100,66,107,97,95,79,80,83,93,81,81,85,95,105,90,94,77,83,63,89,86,75,75],\"y\":[65,20,21,26,18,24,25,13,44,37,36,40,38,48,27,29,19,38,44,57,59,26,63,18,48,13,41,47,39,14,41,25,48,50,53,52,18,47,55,17,30,80,19,29,45,52,60,57,55,20,32,28,5,40,45,41,37,42,28,41,42,40,38,21,26,24,21,20,39,24,31,30,22,36,38,25,34,25,38,33,32,32,35,59,21,26,36,35,25,34,26,9,42,11,28,42,32,22,22,30,47,18,53,25,18,54,25,29,25,45,50,21,33,26,12,56,57,76,24,10,26,25,14,27,25,44,55,51,13,6,31,27,32,20,50,35,20,42,38,37,56,33,35,42,13,19,40,49,26,32,21,30,67,37,14,26,31,34,40,33,37,29,58,13,33,9,28,40,77,13,20,9,29,48,22,17,35,29,9,22,18,72,33,14,75,38,35,24,48,40,55,38,13,17,43,13,27,62,38,66],\"z\":[62,73,46,43,55,42,42,27,29,48,53,25,54,59,19,66,48,57,29,46,43,47,41,26,48,47,66,35,53,26,33,53,68,51,66,32,56,41,74,33,28,59,65,64,31,43,51,53,35,24,52,61,63,57,78,67,56,42,32,17,50,54,61,12,35,61,61,59,52,59,40,64,43,28,35,41,71,49,40,45,52,76,51,82,15,71,41,61,53,34,55,42,48,70,70,47,57,54,23,36,37,30,39,55,33,48,25,46,27,44,69,57,34,25,16,53,60,60,18,55,52,49,27,34,39,22,50,71,60,49,61,40,61,32,42,39,54,52,68,45,78,63,64,15,63,49,14,53,52,47,31,43,42,54,32,75,51,44,41,52,48,49,39,35,43,48,43,34,41,44,37,46,27,50,69,50,27,40,36,53,33,48,40,22,39,49,48,54,20,54,52,42,69,27,48,53,40,32,40,40],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"},{\"marker\":{\"line\":{\"width\":1},\"size\":6},\"mode\":\"markers\",\"name\":\"\\u041a\\u043b\\u0430\\u0441\\u0442\\u0435\\u0440 4\",\"x\":[122,119,100,141,131,124,121,123,98,131,115,129,123,115,129,100,108,151,138,123,113,123,117,136,115,129,105,120,106,131,112,127,83,135,109,127,109,96,108,122,128,105,131,81,126,106,100,93,135,93,118,127,121,103,139,120,129,131,92,123,134,109,128,156,143,121,111,132,134,128,77,111,117,148,148,106,141,95,130,107,111,100,121,130,93,129,125,105,110,101,121,120,104,122,127,116,129,103,118,82,145,79,114,112,107,93,114,121,101,117,127,129,132,89,115,115,106,129,113,112,119,118,111,111,102,106,105,125,127,115,119,115,113,132,108,114,119,98,115,143,137,138,92,121,122,99,145,95,118,127,104,108,125,135,138,117,103,120,112,138,112,126,110,125,114,119,103,140,114,130,80,115,132,104,133,92,144,110,119,128,108,109,95,94,133],\"y\":[87,53,55,30,72,55,41,69,62,71,61,59,63,55,51,83,75,46,89,73,42,71,41,65,59,50,46,75,35,24,65,33,58,33,59,47,33,65,61,40,54,47,41,49,60,74,57,84,43,49,39,41,63,88,97,78,57,50,42,51,26,78,69,50,63,19,40,48,51,57,29,54,65,93,41,54,76,56,73,43,53,75,69,70,46,45,39,38,71,88,57,76,37,57,79,26,84,72,63,40,51,35,71,42,66,51,71,67,94,45,52,72,82,45,57,70,66,46,25,80,81,71,68,69,35,52,55,47,39,31,65,69,40,49,53,39,70,54,75,48,49,62,64,95,51,47,28,87,31,60,59,44,85,63,58,29,44,47,61,28,44,75,46,63,39,47,48,24,66,60,78,48,58,37,36,46,55,64,63,76,54,90,66,21,50],\"z\":[64,68,59,71,49,50,83,69,66,78,67,93,65,54,69,71,62,69,56,48,74,87,71,64,66,86,52,62,64,75,81,79,27,65,41,76,67,83,57,43,33,72,55,50,73,63,74,64,70,44,47,71,61,76,54,56,61,42,81,65,54,45,56,53,57,41,63,69,51,58,59,67,54,44,66,76,37,79,70,65,35,56,78,48,81,75,48,84,80,78,80,63,55,87,46,67,65,92,76,65,52,62,67,82,45,62,57,60,54,82,55,60,70,62,59,68,65,78,68,65,62,73,79,58,67,72,75,60,74,69,32,57,69,72,91,57,67,64,48,66,76,63,56,70,48,87,81,60,65,62,66,50,48,42,65,58,69,46,55,58,55,57,49,39,63,70,40,70,60,66,53,68,50,77,59,61,63,52,63,69,86,43,56,70,49],\"type\":\"scatter3d\",\"hovertemplate\":\"Beats Per Minute (BPM): %{x} <br>Energy: %{y} <br>Danceability: %{z}\"}], {\"template\":{\"data\":{\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"choropleth\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"choropleth\"}],\"contour\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"contour\"}],\"contourcarpet\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"contourcarpet\"}],\"heatmap\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"heatmap\"}],\"heatmapgl\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"heatmapgl\"}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"histogram2d\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"histogram2d\"}],\"histogram2dcontour\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"histogram2dcontour\"}],\"mesh3d\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"type\":\"mesh3d\"}],\"parcoords\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"parcoords\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}],\"scatter\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatter\"}],\"scatter3d\":[{\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatter3d\"}],\"scattercarpet\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattercarpet\"}],\"scattergeo\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattergeo\"}],\"scattergl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattergl\"}],\"scattermapbox\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scattermapbox\"}],\"scatterpolar\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatterpolar\"}],\"scatterpolargl\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatterpolargl\"}],\"scatterternary\":[{\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"type\":\"scatterternary\"}],\"surface\":[{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"type\":\"surface\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}]},\"layout\":{\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"autotypenumbers\":\"strict\",\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]],\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]},\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"geo\":{\"bgcolor\":\"white\",\"lakecolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"showlakes\":true,\"showland\":true,\"subunitcolor\":\"white\"},\"hoverlabel\":{\"align\":\"left\"},\"hovermode\":\"closest\",\"mapbox\":{\"style\":\"light\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"bgcolor\":\"#E5ECF6\",\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\"},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\"},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"gridwidth\":2,\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\"}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"ternary\":{\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"bgcolor\":\"#E5ECF6\",\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"title\":{\"x\":0.05},\"xaxis\":{\"automargin\":true,\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"zerolinewidth\":2},\"yaxis\":{\"automargin\":true,\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"zerolinewidth\":2}}},\"scene\":{\"xaxis\":{\"title\":{\"text\":\"Beats Per Minute (BPM)\",\"font\":{\"color\":\"black\"}}},\"yaxis\":{\"title\":{\"text\":\"Energy\",\"font\":{\"color\":\"black\"}}},\"zaxis\":{\"title\":{\"text\":\"Danceability\",\"font\":{\"color\":\"black\"}}}},\"font\":{\"family\":\"Arial\",\"color\":\"black\",\"size\":12},\"width\":800,\"height\":800,\"autosize\":true,\"showlegend\":true}, {\"responsive\": true} ).then(function(){\n",
" \n",
"var gd = document.getElementById('8ec278a4-19de-4f89-9779-84de955406c9');\n",
"var x = new MutationObserver(function (mutations, observer) {{\n",
" var display = window.getComputedStyle(gd).display;\n",
" if (!display || display === 'none') {{\n",
" console.log([gd, 'removed!']);\n",
" Plotly.purge(gd);\n",
" observer.disconnect();\n",
" }}\n",
"}});\n",
"\n",
"// Listen for the removal of the full notebook cells\n",
"var notebookContainer = gd.closest('#notebook-container');\n",
"if (notebookContainer) {{\n",
" x.observe(notebookContainer, {childList: true});\n",
"}}\n",
"\n",
"// Listen for the clearing of the current output cell\n",
"var outputEl = gd.closest('.output');\n",
"if (outputEl) {{\n",
" x.observe(outputEl, {childList: true});\n",
"}}\n",
"\n",
" }) }; </script> </div>\n",
"</body>\n",
"</html>"
]
},
"metadata": {}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment