Spaces:
Runtime error
Runtime error
File size: 124,119 Bytes
9dd7d9c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 |
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyMvVDTwZ/J6E04zLM5dccF4",
"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/github/Bryan-Az/Neurobytes/blob/notebooks/mlops/notebooks/tracks_eda.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"source": [
"# Exploratory Data Analysis of Track Related Data"
],
"metadata": {
"id": "BY66pxmrriMs"
}
},
{
"cell_type": "markdown",
"source": [
"## Authentication and Data Loading"
],
"metadata": {
"id": "Nc6yWqW8rpPT"
}
},
{
"cell_type": "code",
"source": [
"from pydrive.auth import GoogleAuth\n",
"from pydrive.drive import GoogleDrive\n",
"from google.colab import auth\n",
"from oauth2client.client import GoogleCredentials\n",
"import pandas as pd"
],
"metadata": {
"id": "ScHuOtT9rJco",
"outputId": "90f4baaa-e304-459a-ea3c-b483e6604e8d",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
"WARNING:root:pydrive is deprecated and no longer maintained. We recommend that you migrate your projects to pydrive2, the maintained fork of pydrive\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"\n",
"auth.authenticate_user()\n",
"gauth = GoogleAuth()\n",
"gauth.credentials = GoogleCredentials.get_application_default()\n",
"drive = GoogleDrive(gauth)"
],
"metadata": {
"id": "7fGcnanprW3D"
},
"execution_count": 2,
"outputs": []
},
{
"cell_type": "code",
"source": [
"million_song_glink = 'https://drive.google.com/file/d/1EL4vYhO4A0Cgm8akBgAfDrWOGvtF6Xvo/view?usp=sharing'\n",
"million_song_name = 'million_songs.zip'"
],
"metadata": {
"id": "yvc3jk8xpqIX"
},
"execution_count": 3,
"outputs": []
},
{
"cell_type": "code",
"source": [
"user_preferences_glink = 'https://drive.google.com/file/d/1qo5Ruz7Nu_YC6iBaX3V3IGYuubSwAeJy/view?usp=drive_link'\n",
"user_preferences_name = 'user_preferences.csv'"
],
"metadata": {
"id": "Dv7lHe9tgipI"
},
"execution_count": 4,
"outputs": []
},
{
"cell_type": "code",
"source": [
"def get_link_content(link, name):\n",
" file_id = link.split('/')[-2]\n",
" downloaded = drive.CreateFile({'id': file_id})\n",
" downloaded.GetContentFile(name)"
],
"metadata": {
"id": "B2fe_0vosqAA"
},
"execution_count": 5,
"outputs": []
},
{
"cell_type": "code",
"source": [
"get_link_content(million_song_glink, million_song_name)"
],
"metadata": {
"id": "e977WXSKstXj"
},
"execution_count": 6,
"outputs": []
},
{
"cell_type": "code",
"source": [
"get_link_content(user_preferences_glink, user_preferences_name)"
],
"metadata": {
"id": "TATR8qyyhD8F"
},
"execution_count": 7,
"outputs": []
},
{
"cell_type": "code",
"source": [
"million_songs = pd.read_csv(million_song_name)\n",
"user_preferences = pd.read_csv(user_preferences_name)"
],
"metadata": {
"id": "gu_LQ6Zvs1ZX"
},
"execution_count": 8,
"outputs": []
},
{
"cell_type": "code",
"source": [
"million_songs.head()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 206
},
"id": "IFROmv5Ts7ua",
"outputId": "5beae3d5-9d54-46a4-a994-64475d74a5e9"
},
"execution_count": 9,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" artist song link \\\n",
"0 ABBA Ahe's My Kind Of Girl /a/abba/ahes+my+kind+of+girl_20598417.html \n",
"1 ABBA Andante, Andante /a/abba/andante+andante_20002708.html \n",
"2 ABBA As Good As New /a/abba/as+good+as+new_20003033.html \n",
"3 ABBA Bang /a/abba/bang_20598415.html \n",
"4 ABBA Bang-A-Boomerang /a/abba/bang+a+boomerang_20002668.html \n",
"\n",
" text \n",
"0 Look at her face, it's a wonderful face \\r\\nA... \n",
"1 Take it easy with me, please \\r\\nTouch me gen... \n",
"2 I'll never know why I had to go \\r\\nWhy I had... \n",
"3 Making somebody happy is a question of give an... \n",
"4 Making somebody happy is a question of give an... "
],
"text/html": [
"\n",
" <div id=\"df-f6fbe8f2-5692-4f13-a231-077a3786292f\" 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>artist</th>\n",
" <th>song</th>\n",
" <th>link</th>\n",
" <th>text</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>ABBA</td>\n",
" <td>Ahe's My Kind Of Girl</td>\n",
" <td>/a/abba/ahes+my+kind+of+girl_20598417.html</td>\n",
" <td>Look at her face, it's a wonderful face \\r\\nA...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>ABBA</td>\n",
" <td>Andante, Andante</td>\n",
" <td>/a/abba/andante+andante_20002708.html</td>\n",
" <td>Take it easy with me, please \\r\\nTouch me gen...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>ABBA</td>\n",
" <td>As Good As New</td>\n",
" <td>/a/abba/as+good+as+new_20003033.html</td>\n",
" <td>I'll never know why I had to go \\r\\nWhy I had...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>ABBA</td>\n",
" <td>Bang</td>\n",
" <td>/a/abba/bang_20598415.html</td>\n",
" <td>Making somebody happy is a question of give an...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>ABBA</td>\n",
" <td>Bang-A-Boomerang</td>\n",
" <td>/a/abba/bang+a+boomerang_20002668.html</td>\n",
" <td>Making somebody happy is a question of give an...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-f6fbe8f2-5692-4f13-a231-077a3786292f')\"\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 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\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",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\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-f6fbe8f2-5692-4f13-a231-077a3786292f 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-f6fbe8f2-5692-4f13-a231-077a3786292f');\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",
"\n",
"\n",
"<div id=\"df-6a87d476-df6f-4f42-a1a8-6d069d0b9f14\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-6a87d476-df6f-4f42-a1a8-6d069d0b9f14')\"\n",
" title=\"Suggest charts\"\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",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" --bg-color: #E8F0FE;\n",
" --fill-color: #1967D2;\n",
" --hover-bg-color: #E2EBFA;\n",
" --hover-fill-color: #174EA6;\n",
" --disabled-fill-color: #AAA;\n",
" --disabled-bg-color: #DDD;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" --bg-color: #3B4455;\n",
" --fill-color: #D2E3FC;\n",
" --hover-bg-color: #434B5C;\n",
" --hover-fill-color: #FFFFFF;\n",
" --disabled-bg-color: #3B4455;\n",
" --disabled-fill-color: #666;\n",
" }\n",
"\n",
" .colab-df-quickchart {\n",
" background-color: var(--bg-color);\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: var(--fill-color);\n",
" height: 32px;\n",
" padding: 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: var(--hover-bg-color);\n",
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: var(--button-hover-fill-color);\n",
" }\n",
"\n",
" .colab-df-quickchart-complete:disabled,\n",
" .colab-df-quickchart-complete:disabled:hover {\n",
" background-color: var(--disabled-bg-color);\n",
" fill: var(--disabled-fill-color);\n",
" box-shadow: none;\n",
" }\n",
"\n",
" .colab-df-spinner {\n",
" border: 2px solid var(--fill-color);\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" animation:\n",
" spin 1s steps(1) infinite;\n",
" }\n",
"\n",
" @keyframes spin {\n",
" 0% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" border-left-color: var(--fill-color);\n",
" }\n",
" 20% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 30% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 40% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 60% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 80% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" 90% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const quickchartButtonEl =\n",
" document.querySelector('#' + key + ' button');\n",
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
" quickchartButtonEl.classList.add('colab-df-spinner');\n",
" try {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" } catch (error) {\n",
" console.error('Error during call to suggestCharts:', error);\n",
" }\n",
" quickchartButtonEl.classList.remove('colab-df-spinner');\n",
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-6a87d476-df6f-4f42-a1a8-6d069d0b9f14 button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
"\n",
" </div>\n",
" </div>\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "million_songs",
"summary": "{\n \"name\": \"million_songs\",\n \"rows\": 57650,\n \"fields\": [\n {\n \"column\": \"artist\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 643,\n \"samples\": [\n \"Ziggy Marley\",\n \"O.A.R.\",\n \"Styx\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"song\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 44824,\n \"samples\": [\n \"Tear Me Down\",\n \"Lakky Lady\",\n \"They All Went To Mexico\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"link\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 57650,\n \"samples\": [\n \"/w/wishbone+ash/right+or+wrong_20147150.html\",\n \"/a/aerosmith/this+little+light+of+mine_20644484.html\",\n \"/f/fall+out+boy/dance+dance_10113666.html\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"text\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 57494,\n \"samples\": [\n \"When the grey skies turn to blue \\r\\nAnd the dark clouds blow away \\r\\nIn the morning of a new life \\r\\nWhen the sun comes shining through \\r\\nWhen the grey skies turn to blue \\r\\nIn the morning of a new life \\r\\nWhen the sun comes shining through \\r\\nWhen the grey skies turn to blue \\r\\nMeet me on a bright and windy day \\r\\nWhen the breeze has blown \\r\\nThe gray skies far away \\r\\nHigh upon a hillside \\r\\nWhen the sun comes shining through \\r\\nAnd the grey skies turn to blue \\r\\nWhen the grey skies turn to blue \\r\\nWhen the grey skies turn to blue \\r\\n\\r\\n\",\n \"I met a girl a wonderful girl \\r\\nWho's really got a lot to recommend her for a girl \\r\\nFabulous creature without any doubt \\r\\nHey what am I getting so excited about \\r\\nShe's just a girl an everyday girl \\r\\nAnd yet I guess she's really rather special for a girl \\r\\nFor once you've seen her the others are not \\r\\nHey what am I getting so excited about \\r\\nBut so what what has she got others have not \\r\\nTwo eyes two lips a nose all girls have some of those \\r\\nBut when she looks up at me what do I see \\r\\nThe most enchanting face my pulse begins to race \\r\\nHey I met a girl a marvelous girl \\r\\nShe rarer than uranium and fairer than a pearl \\r\\nFound me a treasure and I want to shout \\r\\nHey what am I getting so excited about \\r\\nBut so what what has she got others have not \\r\\nTwo eyes two lips a nose all girls have some of those \\r\\nBut when she looks up at me what do I see \\r\\nThe most enchanting face my pulse begins to race \\r\\n(I got a girl a marvelous girl) \\r\\n(She rarer than uranium and fairer than a pearl) \\r\\nFound me a treasure and I want to shout \\r\\nThis is what am I getting so excited about \\r\\n(He met a girl) and I fell in love today\\r\\n\\r\\n\",\n \"She's over by the corner \\r\\nGot her hands by her sides \\r\\nThey hit her harder harder harder \\r\\nTill they thought she might die \\r\\n \\r\\nWell I got a foggy notion, \\r\\nDo it again \\r\\nOver by the corner, \\r\\nDo it again \\r\\nI got my calamine lotion baby, \\r\\nDo it again \\r\\nI got a foggy notion, \\r\\nDo it again \\r\\n \\r\\nShe made me do something \\r\\nThat I never did before \\r\\nI rushed right down \\r\\nTo a flower store \\r\\nI bought her a bundle \\r\\nA beautiful batch \\r\\nDon't you know something, \\r\\nShe sent 'em right back \\r\\n \\r\\nSally Mae, Sally Mae, \\r\\nSally Mae, Sally Mae \\r\\nSally Mae, Sally Mae, \\r\\nSally Mae, Sally Mae\\r\\n\\r\\n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
}
},
"metadata": {},
"execution_count": 9
}
]
},
{
"cell_type": "markdown",
"source": [
"# Connecting User Preferences to the Million Song Dataset and LastFM API\n",
"The user preferences dataset has a songID index which matches the index in the million song dataset, and also accesses new features from Last Fm such as:\n",
"\n",
"- listeners\n",
"- playcount\n",
"- tags (genres)\n"
],
"metadata": {
"id": "4NyKHfJwvZdB"
}
},
{
"cell_type": "code",
"source": [
"user_preferences = user_preferences.drop(['level_0'], axis=1)"
],
"metadata": {
"id": "rJ26n9g2hKIx"
},
"execution_count": 10,
"outputs": []
},
{
"cell_type": "code",
"source": [
"user_preferences.head()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 293
},
"id": "sQ4TsOCnvEua",
"outputId": "7a788493-9540-4515-f646-1d25e1a52ae9"
},
"execution_count": 11,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" songID artist song \\\n",
"0 19632 Toto You Are The Flower \n",
"1 19632 Toto You Are The Flower \n",
"2 25284 Billie Holiday I Only Have Eyes For You \n",
"3 43594 Michael Bolton Only A Woman Like You \n",
"4 50200 Rascal Flatts The Day Before You \n",
"\n",
" link \\\n",
"0 /t/toto/you+are+the+flower_20139737.html \n",
"1 /t/toto/you+are+the+flower_20139737.html \n",
"2 /b/billie+holiday/i+only+have+eyes+for+you_200... \n",
"3 /m/michael+bolton/only+a+woman+like+you_101792... \n",
"4 /r/rascal+flatts/the+day+before+you_10238985.html \n",
"\n",
" text userID listeners \\\n",
"0 You never lose a minute, if in it there is lov... 0 25307 \n",
"1 You never lose a minute, if in it there is lov... 0 25307 \n",
"2 My love must be a kind of blind love, \\r\\nI c... 0 60356 \n",
"3 It's beautiful, your honesty \\r\\nYou cry when... 0 4595 \n",
"4 I had all but given up \\r\\nOn finding the one... 0 22077 \n",
"\n",
" playcount tags \n",
"0 87344 AOR, rock, soft rock, 70s, pop rock \n",
"1 87344 AOR, rock, soft rock, 70s, pop rock \n",
"2 178625 jazz, female vocal, vocal jazz, blues, female ... \n",
"3 13266 Ballad, romantic, soul, pop, cool \n",
"4 86012 country, rock, contemporary country, seen live... "
],
"text/html": [
"\n",
" <div id=\"df-f281a945-ab54-44fc-9d52-c48399823f9b\" 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>songID</th>\n",
" <th>artist</th>\n",
" <th>song</th>\n",
" <th>link</th>\n",
" <th>text</th>\n",
" <th>userID</th>\n",
" <th>listeners</th>\n",
" <th>playcount</th>\n",
" <th>tags</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>19632</td>\n",
" <td>Toto</td>\n",
" <td>You Are The Flower</td>\n",
" <td>/t/toto/you+are+the+flower_20139737.html</td>\n",
" <td>You never lose a minute, if in it there is lov...</td>\n",
" <td>0</td>\n",
" <td>25307</td>\n",
" <td>87344</td>\n",
" <td>AOR, rock, soft rock, 70s, pop rock</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>19632</td>\n",
" <td>Toto</td>\n",
" <td>You Are The Flower</td>\n",
" <td>/t/toto/you+are+the+flower_20139737.html</td>\n",
" <td>You never lose a minute, if in it there is lov...</td>\n",
" <td>0</td>\n",
" <td>25307</td>\n",
" <td>87344</td>\n",
" <td>AOR, rock, soft rock, 70s, pop rock</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>25284</td>\n",
" <td>Billie Holiday</td>\n",
" <td>I Only Have Eyes For You</td>\n",
" <td>/b/billie+holiday/i+only+have+eyes+for+you_200...</td>\n",
" <td>My love must be a kind of blind love, \\r\\nI c...</td>\n",
" <td>0</td>\n",
" <td>60356</td>\n",
" <td>178625</td>\n",
" <td>jazz, female vocal, vocal jazz, blues, female ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>43594</td>\n",
" <td>Michael Bolton</td>\n",
" <td>Only A Woman Like You</td>\n",
" <td>/m/michael+bolton/only+a+woman+like+you_101792...</td>\n",
" <td>It's beautiful, your honesty \\r\\nYou cry when...</td>\n",
" <td>0</td>\n",
" <td>4595</td>\n",
" <td>13266</td>\n",
" <td>Ballad, romantic, soul, pop, cool</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>50200</td>\n",
" <td>Rascal Flatts</td>\n",
" <td>The Day Before You</td>\n",
" <td>/r/rascal+flatts/the+day+before+you_10238985.html</td>\n",
" <td>I had all but given up \\r\\nOn finding the one...</td>\n",
" <td>0</td>\n",
" <td>22077</td>\n",
" <td>86012</td>\n",
" <td>country, rock, contemporary country, seen live...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-f281a945-ab54-44fc-9d52-c48399823f9b')\"\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 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\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",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\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-f281a945-ab54-44fc-9d52-c48399823f9b 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-f281a945-ab54-44fc-9d52-c48399823f9b');\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",
"\n",
"\n",
"<div id=\"df-f2e7a01b-9730-49c9-835b-526a58cca397\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-f2e7a01b-9730-49c9-835b-526a58cca397')\"\n",
" title=\"Suggest charts\"\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",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" --bg-color: #E8F0FE;\n",
" --fill-color: #1967D2;\n",
" --hover-bg-color: #E2EBFA;\n",
" --hover-fill-color: #174EA6;\n",
" --disabled-fill-color: #AAA;\n",
" --disabled-bg-color: #DDD;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" --bg-color: #3B4455;\n",
" --fill-color: #D2E3FC;\n",
" --hover-bg-color: #434B5C;\n",
" --hover-fill-color: #FFFFFF;\n",
" --disabled-bg-color: #3B4455;\n",
" --disabled-fill-color: #666;\n",
" }\n",
"\n",
" .colab-df-quickchart {\n",
" background-color: var(--bg-color);\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: var(--fill-color);\n",
" height: 32px;\n",
" padding: 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: var(--hover-bg-color);\n",
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: var(--button-hover-fill-color);\n",
" }\n",
"\n",
" .colab-df-quickchart-complete:disabled,\n",
" .colab-df-quickchart-complete:disabled:hover {\n",
" background-color: var(--disabled-bg-color);\n",
" fill: var(--disabled-fill-color);\n",
" box-shadow: none;\n",
" }\n",
"\n",
" .colab-df-spinner {\n",
" border: 2px solid var(--fill-color);\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" animation:\n",
" spin 1s steps(1) infinite;\n",
" }\n",
"\n",
" @keyframes spin {\n",
" 0% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" border-left-color: var(--fill-color);\n",
" }\n",
" 20% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 30% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 40% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 60% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 80% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" 90% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const quickchartButtonEl =\n",
" document.querySelector('#' + key + ' button');\n",
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
" quickchartButtonEl.classList.add('colab-df-spinner');\n",
" try {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" } catch (error) {\n",
" console.error('Error during call to suggestCharts:', error);\n",
" }\n",
" quickchartButtonEl.classList.remove('colab-df-spinner');\n",
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-f2e7a01b-9730-49c9-835b-526a58cca397 button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
"\n",
" </div>\n",
" </div>\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "user_preferences",
"summary": "{\n \"name\": \"user_preferences\",\n \"rows\": 7615,\n \"fields\": [\n {\n \"column\": \"songID\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 16791,\n \"min\": 3,\n \"max\": 57620,\n \"num_unique_values\": 3395,\n \"samples\": [\n 38212,\n 26983,\n 10318\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"artist\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 568,\n \"samples\": [\n \"Justin Bieber\",\n \"Roy Orbison\",\n \"Kinks\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"song\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3184,\n \"samples\": [\n \"All N My Grill\",\n \"Love Is Blind\",\n \"Born To Make You Happy\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"link\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3395,\n \"samples\": [\n \"/j/john+mellencamp/serious+business_20074559.html\",\n \"/c/cat+stevens/love+lives+in+the+sky_20826557.html\",\n \"/k/kenny+chesney/life+is+good_20077648.html\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"text\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 3392,\n \"samples\": [\n \"Am I leaving you tomorrow, \\r\\nI can't see \\r\\nIs this how it's going to be? \\r\\nIn the morning must I go, \\r\\nSo let's take a little time, \\r\\nSee what's on your mind \\r\\nIs there something I should know? \\r\\n \\r\\nI thought we went through all this yesterday \\r\\nYou said you were OK, \\r\\nYou just had to take it slow \\r\\nI'm tired of these little games you play, \\r\\nAre you here to stay \\r\\nIs there something I should know? \\r\\n \\r\\n[Chorus] \\r\\nIs there something I should know? \\r\\n \\r\\nI think everything we've seen, \\r\\nIt was just a dream \\r\\nHow did we get so low? \\r\\nTo leave it all behind would be obscene \\r\\nWhere's your self-esteem? \\r\\nIs there something I should know? \\r\\n \\r\\n[Chorus] \\r\\n \\r\\nWe can keep on talking, \\r\\nYou know I've got all night \\r\\nBut don't keep telling me, \\r\\nThat everything's all right \\r\\nIt's not all right. \\r\\n \\r\\nI'm leaving you tomorrow, \\r\\nCan't you see \\r\\nThis is how it's got to be, \\r\\nIn the morning I must go \\r\\nSo let's take a little time, \\r\\nSee what's on your mind \\r\\nIs there something I should know? \\r\\n \\r\\n[Chorus]\\r\\n\\r\\n\",\n \"You're talking to me from the back of my car \\r\\nAnd I can't get nothing right \\r\\nAnd then you wonder why stand at the bar \\r\\nDay and night \\r\\n \\r\\nI've had enough \\r\\nI can't put up with any more \\r\\nNo no no no no no no \\r\\nI've had enough \\r\\nI can't put up with any more \\r\\nNo no no no no no no \\r\\n \\r\\nYou stand behind me with a watch in your hand \\r\\nAnd I can't get nothing done \\r\\nWell, people tell me you're punctual man \\r\\nBut come on \\r\\n \\r\\nI've had enough \\r\\nI can't put up with any more \\r\\nNo no no no no no no \\r\\nI've had enough \\r\\nI can't put up with any more \\r\\nNo no no no no no no \\r\\n \\r\\nI earn the money and you take it away \\r\\nWhen I don't know where you're from \\r\\nI should be worried but they say \\r\\nIt'll pay for a bomb \\r\\n \\r\\nI've had enough \\r\\nI can't put up with any more \\r\\nNo no no no no no no \\r\\nI've had enough \\r\\nI can't put up with any more \\r\\nNo no no no no no no \\r\\n \\r\\nI've had enough \\r\\n \\r\\nBaby you know sometimes you get a little weary \\r\\nBut if it ever happens honey \\r\\nYou just come along to me \\r\\nBecause you know \\r\\n \\r\\nI've had enough \\r\\nI can't put up with any more \\r\\nNo no no no no no no \\r\\nI've had enough \\r\\nI can't put up with any more \\r\\nNo no no no no no no.\\r\\n\\r\\n\",\n \"Union Jack is back with a hole in his head \\r\\nHe's gettin' badly burned every time \\r\\nHe's laughin' at me and dancin' on my sneakers \\r\\nAnd his sixties songs are blowin' up my speakers \\r\\n \\r\\nI say you got no respect \\r\\nRespect for authority \\r\\nYou're just playing your dirty tricks \\r\\nAnd then come cryin' to me \\r\\n \\r\\n[Chorus] \\r\\nHit and run, hit and run \\r\\nIt's just a hit and run \\r\\nAnother hit and run \\r\\n \\r\\nThe bulldog lost his bite and his breath has gone bad \\r\\nAnd the whole damn world is really laughin' mad \\r\\n \\r\\n[Chorus] \\r\\n \\r\\nHit it!! \\r\\nOh bring it down \\r\\nOh you bring it down \\r\\n \\r\\nI say you ain't got no respect \\r\\nI say you ain't got no respect \\r\\nNo you ain't got no respect \\r\\nAnd you hit me when I'm down \\r\\n \\r\\nHit and run, hit and run \\r\\nIt's just another hit and run \\r\\nI said it's just another hit and run \\r\\n \\r\\nOh yeah, hit and run \\r\\nOh yeah, hit and run \\r\\nOh yeah, hit and run \\r\\nOh yeah, hit and run \\r\\nOh yeah, hit and run \\r\\nIt's just another hit and run \\r\\nHit and run\\r\\n\\r\\n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"userID\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 2,\n \"min\": 0,\n \"max\": 9,\n \"num_unique_values\": 10,\n \"samples\": [\n 8,\n 1,\n 5\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"listeners\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 154517,\n \"min\": 0,\n \"max\": 2270686,\n \"num_unique_values\": 3010,\n \"samples\": [\n 6547,\n 33359,\n 409276\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"playcount\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1173037,\n \"min\": 0,\n \"max\": 22996487,\n \"num_unique_values\": 3213,\n \"samples\": [\n 219016,\n 71959,\n 1165908\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"tags\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 2705,\n \"samples\": [\n \"Contemporary Gospel, Mellow, gospel, Kirk Franklin, Contemporary Gospel Tag\",\n \"singer-songwriter, own\",\n \"blues, classic rock, 60s, female vocalists, blues rock\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
}
},
"metadata": {},
"execution_count": 11
}
]
},
{
"cell_type": "code",
"source": [
"user_preferences.shape"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "4hOldSUkvMld",
"outputId": "055dfcdc-0707-4059-a5fc-ebcca10cbbfa"
},
"execution_count": 12,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"(7615, 9)"
]
},
"metadata": {},
"execution_count": 12
}
]
},
{
"cell_type": "markdown",
"source": [
"# User Preferences\n",
"\n",
"We have user data for 10 synthetically generated users. It represents the user's preferences. It was created using by selection at random for each user the top n (random for each user, from 5-10) similar tracks to a randomly sampled song from a randomly sampled set of songs (songs_per_users is random for each user, between 50-100).\n",
"\n",
"For example, the amount of songs in a user's preference library is calculated by multiplying the top_n value by the songs_per_users value."
],
"metadata": {
"id": "5gKDsSGlswhv"
}
},
{
"cell_type": "markdown",
"source": [
"## Sample User Preferences"
],
"metadata": {
"id": "m9dxn7DPvsEH"
}
},
{
"cell_type": "code",
"source": [
"random_user = user_preferences.sample(n=1)['userID'].values[0]\n",
"random_user_preferences = user_preferences[user_preferences['userID'] == random_user]"
],
"metadata": {
"id": "tmGMRqwbvu1U"
},
"execution_count": 23,
"outputs": []
},
{
"cell_type": "code",
"source": [
"random_user_preferences"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 580
},
"id": "AhepmD8_v8yI",
"outputId": "ae317e74-c5b9-4abd-a1e5-dff306eb7f81"
},
"execution_count": 24,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" songID artist song \\\n",
"2113 44397 The Monkees Zor And Zam \n",
"2114 44397 The Monkees Zor And Zam \n",
"2115 16877 Rainbow Man On The Silver Mountain \n",
"2116 24846 Beautiful South Don't Fear The Reaper \n",
"2117 10640 King Diamond The Puppet Master \n",
"... ... ... ... \n",
"2968 50017 Ramones I Love You \n",
"2969 41978 LL Cool J The Breakthrough \n",
"2970 57493 Young Jeezy Talk To Em \n",
"2971 57513 Youngbloodz Just A Dream \n",
"2972 54681 Usher If I Want To \n",
"\n",
" link \\\n",
"2113 /m/monkees/zor+and+zam_10182944.html \n",
"2114 /m/monkees/zor+and+zam_10182944.html \n",
"2115 /r/rainbow/man+on+the+silver+mountain_20113626... \n",
"2116 /b/beautiful+south/dont+fear+the+reaper_100269... \n",
"2117 /k/king+diamond/the+puppet+master_20294667.html \n",
"... ... \n",
"2968 /r/ramones/i+love+you_20113831.html \n",
"2969 /l/ll+cool+j/the+breakthrough_20081048.html \n",
"2970 /y/young+jeezy/talk+to+em_20376883.html \n",
"2971 /y/youngbloodz/just+a+dream_20148851.html \n",
"2972 /u/usher/if+i+want+to_20142585.html \n",
"\n",
" text userID listeners \\\n",
"2113 By Bill Chadwick and John Chadwick \\r\\nThe ki... 3 5284 \n",
"2114 By Bill Chadwick and John Chadwick \\r\\nThe ki... 3 5284 \n",
"2115 I'm a wheel, I'm a wheel \\r\\nI can roll, I ca... 3 282694 \n",
"2116 All our times have come \\r\\nHere but now they... 3 13927 \n",
"2117 Night time in Budapest \\r\\nSo many people are... 3 21814 \n",
"... ... ... ... \n",
"2968 When I look in your eyes I see words I can't d... 3 43083 \n",
"2969 Knuckleheads spreadin' gossip all over town \\... 3 6312 \n",
"2970 Like the person needs his soul \"uh huh, jeah\" ... 3 12812 \n",
"2971 It ain't a thang in this world that's gonna kn... 3 1980 \n",
"2972 [Usher] (JD) \\r\\nEvery time I look up \\r\\nI ... 3 44359 \n",
"\n",
" playcount tags \n",
"2113 21293 rock, 1968, genre: psychedelic rock, genre: ps... \n",
"2114 21293 rock, 1968, genre: psychedelic rock, genre: ps... \n",
"2115 1515721 hard rock, classic rock, rock, Rainbow, heavy ... \n",
"2116 45108 cover, covers, Mellow, pop, great cover \n",
"2117 101564 heavy metal, horror metal, metal, Favorite Art... \n",
"... ... ... \n",
"2968 150614 punk rock, punk, cover, 90s, covers \n",
"2969 14407 hip hop, test \n",
"2970 43358 rap, Dirty South, southern rap \n",
"2971 3010 brain2brain \n",
"2972 128071 rnb, pop, sexy, Usher, jermaine dupri \n",
"\n",
"[860 rows x 9 columns]"
],
"text/html": [
"\n",
" <div id=\"df-2154a2f1-c5b1-47bd-9d12-23ff0ba7582b\" 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>songID</th>\n",
" <th>artist</th>\n",
" <th>song</th>\n",
" <th>link</th>\n",
" <th>text</th>\n",
" <th>userID</th>\n",
" <th>listeners</th>\n",
" <th>playcount</th>\n",
" <th>tags</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2113</th>\n",
" <td>44397</td>\n",
" <td>The Monkees</td>\n",
" <td>Zor And Zam</td>\n",
" <td>/m/monkees/zor+and+zam_10182944.html</td>\n",
" <td>By Bill Chadwick and John Chadwick \\r\\nThe ki...</td>\n",
" <td>3</td>\n",
" <td>5284</td>\n",
" <td>21293</td>\n",
" <td>rock, 1968, genre: psychedelic rock, genre: ps...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2114</th>\n",
" <td>44397</td>\n",
" <td>The Monkees</td>\n",
" <td>Zor And Zam</td>\n",
" <td>/m/monkees/zor+and+zam_10182944.html</td>\n",
" <td>By Bill Chadwick and John Chadwick \\r\\nThe ki...</td>\n",
" <td>3</td>\n",
" <td>5284</td>\n",
" <td>21293</td>\n",
" <td>rock, 1968, genre: psychedelic rock, genre: ps...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2115</th>\n",
" <td>16877</td>\n",
" <td>Rainbow</td>\n",
" <td>Man On The Silver Mountain</td>\n",
" <td>/r/rainbow/man+on+the+silver+mountain_20113626...</td>\n",
" <td>I'm a wheel, I'm a wheel \\r\\nI can roll, I ca...</td>\n",
" <td>3</td>\n",
" <td>282694</td>\n",
" <td>1515721</td>\n",
" <td>hard rock, classic rock, rock, Rainbow, heavy ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2116</th>\n",
" <td>24846</td>\n",
" <td>Beautiful South</td>\n",
" <td>Don't Fear The Reaper</td>\n",
" <td>/b/beautiful+south/dont+fear+the+reaper_100269...</td>\n",
" <td>All our times have come \\r\\nHere but now they...</td>\n",
" <td>3</td>\n",
" <td>13927</td>\n",
" <td>45108</td>\n",
" <td>cover, covers, Mellow, pop, great cover</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2117</th>\n",
" <td>10640</td>\n",
" <td>King Diamond</td>\n",
" <td>The Puppet Master</td>\n",
" <td>/k/king+diamond/the+puppet+master_20294667.html</td>\n",
" <td>Night time in Budapest \\r\\nSo many people are...</td>\n",
" <td>3</td>\n",
" <td>21814</td>\n",
" <td>101564</td>\n",
" <td>heavy metal, horror metal, metal, Favorite Art...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2968</th>\n",
" <td>50017</td>\n",
" <td>Ramones</td>\n",
" <td>I Love You</td>\n",
" <td>/r/ramones/i+love+you_20113831.html</td>\n",
" <td>When I look in your eyes I see words I can't d...</td>\n",
" <td>3</td>\n",
" <td>43083</td>\n",
" <td>150614</td>\n",
" <td>punk rock, punk, cover, 90s, covers</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2969</th>\n",
" <td>41978</td>\n",
" <td>LL Cool J</td>\n",
" <td>The Breakthrough</td>\n",
" <td>/l/ll+cool+j/the+breakthrough_20081048.html</td>\n",
" <td>Knuckleheads spreadin' gossip all over town \\...</td>\n",
" <td>3</td>\n",
" <td>6312</td>\n",
" <td>14407</td>\n",
" <td>hip hop, test</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2970</th>\n",
" <td>57493</td>\n",
" <td>Young Jeezy</td>\n",
" <td>Talk To Em</td>\n",
" <td>/y/young+jeezy/talk+to+em_20376883.html</td>\n",
" <td>Like the person needs his soul \"uh huh, jeah\" ...</td>\n",
" <td>3</td>\n",
" <td>12812</td>\n",
" <td>43358</td>\n",
" <td>rap, Dirty South, southern rap</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2971</th>\n",
" <td>57513</td>\n",
" <td>Youngbloodz</td>\n",
" <td>Just A Dream</td>\n",
" <td>/y/youngbloodz/just+a+dream_20148851.html</td>\n",
" <td>It ain't a thang in this world that's gonna kn...</td>\n",
" <td>3</td>\n",
" <td>1980</td>\n",
" <td>3010</td>\n",
" <td>brain2brain</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2972</th>\n",
" <td>54681</td>\n",
" <td>Usher</td>\n",
" <td>If I Want To</td>\n",
" <td>/u/usher/if+i+want+to_20142585.html</td>\n",
" <td>[Usher] (JD) \\r\\nEvery time I look up \\r\\nI ...</td>\n",
" <td>3</td>\n",
" <td>44359</td>\n",
" <td>128071</td>\n",
" <td>rnb, pop, sexy, Usher, jermaine dupri</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>860 rows × 9 columns</p>\n",
"</div>\n",
" <div class=\"colab-df-buttons\">\n",
"\n",
" <div class=\"colab-df-container\">\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-2154a2f1-c5b1-47bd-9d12-23ff0ba7582b')\"\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 -960 960 960\">\n",
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
" </svg>\n",
" </button>\n",
"\n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\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",
" .colab-df-buttons div {\n",
" margin-bottom: 4px;\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-2154a2f1-c5b1-47bd-9d12-23ff0ba7582b 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-2154a2f1-c5b1-47bd-9d12-23ff0ba7582b');\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",
"\n",
"\n",
"<div id=\"df-47f22dd9-6ea1-4810-a908-8f76de5bef02\">\n",
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-47f22dd9-6ea1-4810-a908-8f76de5bef02')\"\n",
" title=\"Suggest charts\"\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",
" <g>\n",
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
" </g>\n",
"</svg>\n",
" </button>\n",
"\n",
"<style>\n",
" .colab-df-quickchart {\n",
" --bg-color: #E8F0FE;\n",
" --fill-color: #1967D2;\n",
" --hover-bg-color: #E2EBFA;\n",
" --hover-fill-color: #174EA6;\n",
" --disabled-fill-color: #AAA;\n",
" --disabled-bg-color: #DDD;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-quickchart {\n",
" --bg-color: #3B4455;\n",
" --fill-color: #D2E3FC;\n",
" --hover-bg-color: #434B5C;\n",
" --hover-fill-color: #FFFFFF;\n",
" --disabled-bg-color: #3B4455;\n",
" --disabled-fill-color: #666;\n",
" }\n",
"\n",
" .colab-df-quickchart {\n",
" background-color: var(--bg-color);\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: var(--fill-color);\n",
" height: 32px;\n",
" padding: 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-quickchart:hover {\n",
" background-color: var(--hover-bg-color);\n",
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: var(--button-hover-fill-color);\n",
" }\n",
"\n",
" .colab-df-quickchart-complete:disabled,\n",
" .colab-df-quickchart-complete:disabled:hover {\n",
" background-color: var(--disabled-bg-color);\n",
" fill: var(--disabled-fill-color);\n",
" box-shadow: none;\n",
" }\n",
"\n",
" .colab-df-spinner {\n",
" border: 2px solid var(--fill-color);\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" animation:\n",
" spin 1s steps(1) infinite;\n",
" }\n",
"\n",
" @keyframes spin {\n",
" 0% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" border-left-color: var(--fill-color);\n",
" }\n",
" 20% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 30% {\n",
" border-color: transparent;\n",
" border-left-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 40% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-top-color: var(--fill-color);\n",
" }\n",
" 60% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" }\n",
" 80% {\n",
" border-color: transparent;\n",
" border-right-color: var(--fill-color);\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" 90% {\n",
" border-color: transparent;\n",
" border-bottom-color: var(--fill-color);\n",
" }\n",
" }\n",
"</style>\n",
"\n",
" <script>\n",
" async function quickchart(key) {\n",
" const quickchartButtonEl =\n",
" document.querySelector('#' + key + ' button');\n",
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n",
" quickchartButtonEl.classList.add('colab-df-spinner');\n",
" try {\n",
" const charts = await google.colab.kernel.invokeFunction(\n",
" 'suggestCharts', [key], {});\n",
" } catch (error) {\n",
" console.error('Error during call to suggestCharts:', error);\n",
" }\n",
" quickchartButtonEl.classList.remove('colab-df-spinner');\n",
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
" }\n",
" (() => {\n",
" let quickchartButtonEl =\n",
" document.querySelector('#df-47f22dd9-6ea1-4810-a908-8f76de5bef02 button');\n",
" quickchartButtonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
" })();\n",
" </script>\n",
"</div>\n",
"\n",
" <div id=\"id_c4ac02af-7bb5-4903-b0b2-8eb568d8859c\">\n",
" <style>\n",
" .colab-df-generate {\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-generate: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-generate {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-generate: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",
" <button class=\"colab-df-generate\" onclick=\"generateWithVariable('random_user_preferences')\"\n",
" title=\"Generate code using this dataframe.\"\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=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
" </svg>\n",
" </button>\n",
" <script>\n",
" (() => {\n",
" const buttonEl =\n",
" document.querySelector('#id_c4ac02af-7bb5-4903-b0b2-8eb568d8859c button.colab-df-generate');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" buttonEl.onclick = () => {\n",
" google.colab.notebook.generateWithVariable('random_user_preferences');\n",
" }\n",
" })();\n",
" </script>\n",
" </div>\n",
"\n",
" </div>\n",
" </div>\n"
],
"application/vnd.google.colaboratory.intrinsic+json": {
"type": "dataframe",
"variable_name": "random_user_preferences",
"summary": "{\n \"name\": \"random_user_preferences\",\n \"rows\": 860,\n \"fields\": [\n {\n \"column\": \"songID\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 17110,\n \"min\": 10,\n \"max\": 57599,\n \"num_unique_values\": 687,\n \"samples\": [\n 47274,\n 17497,\n 33680\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"artist\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 339,\n \"samples\": [\n \"Wilson Pickett\",\n \"Willie Nelson\",\n \"Moody Blues\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"song\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 653,\n \"samples\": [\n \"Everybody's Got Something To Hide Except Me And My Monkey\",\n \"Never Let Go\",\n \"Let Me Know\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"link\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 687,\n \"samples\": [\n \"/o/ozzy+osbourne/party+with+the+animals_20298771.html\",\n \"/r/reo+speedwagon/cant+get+you+out+of+my+heart_20115605.html\",\n \"/g/george+jones/best+friends_20821982.html\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"text\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 687,\n \"samples\": [\n \"Into the night I've gotta go \\r\\nThat's when the juices start to flow \\r\\nEverything will be alright \\r\\n \\r\\nI might be blind but I can see \\r\\nI got the power inside of me \\r\\nEverything will be alright \\r\\n \\r\\nI'm never gonna crack under a witch's spell \\r\\nNever put her chain's on me \\r\\nI'm never gonna break it \\r\\nNo I'll never tell \\r\\nI know she'll never let me be \\r\\n \\r\\nParty, party with the animals \\r\\nParty, no dogs allowed \\r\\nParty, party with the animals \\r\\nParty, no dogs allowed no more \\r\\n \\r\\nI like it fast, I like it slow \\r\\nThere's no direction I couldn't go \\r\\nEverything will be alright \\r\\n \\r\\nI like it loud, I like it mean \\r\\nI got the thunder in my machine \\r\\nEverything will be alright \\r\\n \\r\\nDancing with disaster is a part of me \\r\\nI'm never gonna let it go \\r\\nDon't know what I'm after I'm deserting me \\r\\nThe secret that I'll never know\\r\\n\\r\\n\",\n \"[Chorus] \\r\\nCan't get you out of my heart, can't get you out of my soul \\r\\nWhen I get next to you, all I get is out of control \\r\\nCan't get you out of my head, I've memorized every word you ever said \\r\\nYou've been here from the start, can't get you out of my heart \\r\\n \\r\\nSometimes I feel like breakin' up with you \\r\\nI'm tired of bein' true, tired of bein' blue \\r\\nStill you're the one I give my best love to \\r\\nNo other girl would do the things to me you do, and I \\r\\n \\r\\n[Chorus] \\r\\n \\r\\nSometimes I think I might be better off free \\r\\nNo strings attached to me, yeah that's how it should be \\r\\nBut just about the time that I get goin' \\r\\nYou read me like a poem, you keep me comin' home, and I \\r\\n \\r\\n[Chorus] \\r\\n \\r\\nI look at you sometimes, I see the woman I love \\r\\nBut I can be so blind, the good times I sometimes lose sight of \\r\\n \\r\\n[Chorus: x3]\\r\\n\\r\\n\",\n \"I know you've been down just as far as a good man can go. \\r\\nAnd the hurtin's come easy but the healin's been slow. \\r\\nBut you're on your way to recovery and you're not alone. \\r\\n'Cause Nancy sure loves you and she's gonna take care of ol' Jones. \\r\\n \\r\\n[Chorus] \\r\\nSo cry on my shoulder and let's both get over the bad. \\r\\nLet's chalk it up to just one more bad memory we have. \\r\\nFriendship's the one thing that keeps love from driving us mad. \\r\\nSo cry on my shoulder, we're the best friends that we ever had. \\r\\n \\r\\nI heard you left Haggard, I knew by the words in his song. \\r\\nAnd you're wondering if you're right sittin' at home all alone. \\r\\nBut I know you still love him 'cause you're always there when he calls. \\r\\nAnd always remember that you're his favorite memory of all. \\r\\n \\r\\n[Chorus] \\r\\nSo cry on my shoulder and let's both get over the bad. \\r\\nLet's chalk it up to just one more bad memory we have. \\r\\nFriendship's the one thing that keeps love from driving us mad. \\r\\nSo cry on my shoulder, we're the best friends that we ever had...\\r\\n\\r\\n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"userID\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 3,\n \"max\": 3,\n \"num_unique_values\": 1,\n \"samples\": [\n 3\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"listeners\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 176361,\n \"min\": 1,\n \"max\": 2123027,\n \"num_unique_values\": 661,\n \"samples\": [\n 97874\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"playcount\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1335316,\n \"min\": 1,\n \"max\": 21237540,\n \"num_unique_values\": 678,\n \"samples\": [\n 609866\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"tags\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 567,\n \"samples\": [\n \"bluegrass, country, female, upbeat, banjo\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}"
}
},
"metadata": {},
"execution_count": 24
}
]
},
{
"cell_type": "markdown",
"source": [
"## User Preferences: Artists"
],
"metadata": {
"id": "el3U_4o7uwmJ"
}
},
{
"cell_type": "code",
"source": [
"user_preferences.groupby(by=['artist']).count().mean(axis=1).hist()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 448
},
"id": "jaAfcehsrPJS",
"outputId": "0ac11fa1-3216-4212-edf0-afca8c2be44d"
},
"execution_count": 25,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<Axes: >"
]
},
"metadata": {},
"execution_count": 25
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
],
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAGdCAYAAAA44ojeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAnt0lEQVR4nO3df3DU9YH/8Vd+bBYCbNJAkyVHgqnaAgUkBxK2Oh6FkAAZ1JK5KUoRPQZGLnhCropYoQFqw3E9tToRxhsLvSmpLTeCByIQQ4Uyhl85qfywVCgtVthwwiQBUpYl+/7+4ZctayJkf8C+Q56PmQzZz+e9731/XtmYl5/9lWCMMQIAALBIYrwXAAAA8EUUFAAAYB0KCgAAsA4FBQAAWIeCAgAArENBAQAA1qGgAAAA61BQAACAdZLjvYBIBAIBnTx5Ur169VJCQkK8lwMAADrAGKNz584pOztbiYnXPkfSKQvKyZMnlZOTE+9lAACACHzyySfq16/fNcd0yoLSq1cvSZ8foMvlimouv9+vrVu3qqioSA6HIxbL61LIL3JkFx3yiw75RY7sItfc3Kycn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
"cell_type": "markdown",
"source": [
"In the above plot, we can see that a majority of artists make 0-20 appearances across all 10 users, on average. Some artists are outliers and appear up to 60 times!"
],
"metadata": {
"id": "q_AfVkFRuNbI"
}
},
{
"cell_type": "code",
"source": [
"user_preferences.groupby(by='songID').count().mean(axis=1).hist()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 448
},
"id": "Zwk_1GvksZpq",
"outputId": "4011e273-29f0-45b7-e060-fadd631e91f3"
},
"execution_count": 26,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<Axes: >"
]
},
"metadata": {},
"execution_count": 26
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
],
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjAAAAGdCAYAAAAMm0nCAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAq90lEQVR4nO3df3BU9b3/8VcIm4UImxgw2eQS0giV37+KEnZULkpIwFyuCH+IUsEWYeAmzoUo0PQiBPQ2bSzij0aYjj/wTsECd8RWYCBLEBANYFNz+aEywsVJHdhwC4VAgLAk+/2j35yyJkA2JHv4JM/HTMY9n/M557zPe06Gl+fsZiMCgUBAAAAABulgdwEAAAChIsAAAADjEGAAAIBxCDAAAMA4BBgAAGAcAgwAADAOAQYAABiHAAMAAIzT0e4CWktdXZ1OnDihrl27KiIiwu5yAABAEwQCAZ0/f15JSUnq0OH691nabIA5ceKEkpOT7S4DAAA0w1/+8hf16NHjuutDCjArV67UypUr9e2330qSBgwYoMWLF2v8+PGSpMuXL+u5557T73//e9XU1CgzM1NvvvmmEhISrH1UVFRozpw5+vjjj9WlSxdNnz5dBQUF6tjxH6Xs3LlTubm5Onz4sJKTk7Vo0SI9/fTToZSqrl27Svp7A1wulzXu9/tVXFysjIwMORyOkPaJ5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hJrrK6uTiUlJfJ4PDZW1n5cuHBBx44dU2Jiot2ltBupqalyu91B131VVZX27dvHdR9G3333nU6fPs21fwsCgYBycnK0ceNG7dixQ6mpqUHrhw8fLofDEXStHzlyRBUVFVzrt+BmfW9MeXm5JLX69d6uHiHl5uZq+vTpuvfeezVixAi9+uqrqq6u1k9+8hO7S2uTnn/+eU2YMEEpKSk6ceKElixZosjISD3xxBN2l9amXLhwIej/dI4fP67y8nLFxcWpZ8+emjt3rl566SX98Ic/VGpqql544QUlJSVp4sSJ9hVtuBv1PC4uTkuXLtXkyZPldrt17NgxLViwQL1791ZmZqaNVZstOztba9eu1R/+8Ad17drVel9LTEyMOnfurJiYGM2YMUO5ubmKi4uTy+XSs88+K4/Ho5EjR9pcvblu1vdjx45p7dq1euSRR9StWzcdOHBA8+bN06hRozR48ODWLS7sn3uy2RtvvBHo2bNnICoqKjBixIjA3r177S6pzXr88ccDiYmJgaioqMA//dM/BR5//PHA0aNH7S6rzfn4448Dkhr8TJ8+PRAI/P2j1C+88EIgISEh4HQ6A2PGjAkcOXLE3qINd6OeX7x4MZCRkRG46667Ag6HI5CSkhKYOXNmwOfz2V220Rrrt6TAu+++a825dOlS4N/+7d8Cd955ZyA6Ojrw2GOPBU6ePGlf0W3AzfpeUVERGDVqVCAuLi7gdDoDvXv3DsyfPz9w7ty5Vq8t4v8XCAAAYIx28x4YAADQdhBgAACAcQgwAADAOAQYAABgHAIMAAAwDgEGAAAYhwADAACMQ4ABAADGIcAAAADjEGAAAIBxCDAAAMA4/w//edUI9qW68wAAAABJRU5ErkJggg==\n"
},
"metadata": {}
}
]
},
{
"cell_type": "markdown",
"source": [
"## User Preferences: Top Artists\n",
"\n",
"Songs are not as commonly distributed across users as artists. This makes sense as artist's tend to have multiple songs and albums, whereas songs are unique to a single artist, so it's less likely users have songs in common - but they may have artists in common.\n",
"\n",
"**Our neural network model can be evaluated based on whether the song recommendations it makes perform well when using top-k categorical classification accuracy along the user preferences.**"
],
"metadata": {
"id": "uH3XD1W7u0B-"
}
},
{
"cell_type": "code",
"source": [
"# lets visualize the top 10 artist across all userIDs\n",
"for user in user_preferences.groupby(by='userID'):\n",
" print('User: ', user[0])\n",
" print('###############')\n",
" display(user_preferences[user_preferences['userID'] == user[0]].groupby(by=['artist']).count().mean(axis=1).sort_values(ascending=False).head(10))\n",
" print('###############')"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"id": "9_9rdgxlulMc",
"outputId": "da951fae-d4de-4b0a-c31d-e77aaf498a05"
},
"execution_count": 27,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"User: 0\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Diana Ross 11.000\n",
"Kenny Rogers 8.875\n",
"One Direction 8.750\n",
"Backstreet Boys 8.000\n",
"Glee 7.875\n",
"Demi Lovato 7.000\n",
"Michael Bolton 6.875\n",
"Chuck Berry 6.750\n",
"Keith Urban 6.000\n",
"Kirk Franklin 6.000\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n",
"User: 1\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Backstreet Boys 11.000\n",
"Luther Vandross 7.000\n",
"Kinks 6.875\n",
"Diana Ross 6.875\n",
"Reba Mcentire 6.750\n",
"Linda Ronstadt 6.750\n",
"Natalie Imbruglia 6.000\n",
"The Beatles 6.000\n",
"Michael Bolton 5.875\n",
"Insane Clown Posse 5.875\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n",
"User: 2\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Luther Vandross 13.000\n",
"Mariah Carey 12.625\n",
"Backstreet Boys 10.750\n",
"One Direction 9.000\n",
"Michael Jackson 9.000\n",
"Travis 7.000\n",
"Donna Summer 7.000\n",
"Phil Collins 6.875\n",
"Z-Ro 6.750\n",
"The Monkees 6.750\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n",
"User: 3\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Luther Vandross 17.000\n",
"Modern Talking 10.000\n",
"Cheap Trick 9.750\n",
"Justin Bieber 9.750\n",
"Scorpions 9.000\n",
"The Temptations 8.875\n",
"Michael Bolton 8.000\n",
"The Beatles 7.875\n",
"Def Leppard 7.750\n",
"Backstreet Boys 7.000\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n",
"User: 4\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Backstreet Boys 10.875\n",
"Diana Ross 10.750\n",
"Mariah Carey 10.000\n",
"Foreigner 9.000\n",
"Michael Bolton 8.875\n",
"Cher 8.000\n",
"Luther Vandross 7.875\n",
"Reba Mcentire 7.750\n",
"The Beatles 7.000\n",
"Isley Brothers 7.000\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n",
"User: 5\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Scorpions 12.000\n",
"Luther Vandross 11.750\n",
"Backstreet Boys 11.500\n",
"The Beatles 9.875\n",
"Wiz Khalifa 8.500\n",
"Michael Jackson 8.000\n",
"George Michael 7.750\n",
"Linda Ronstadt 7.625\n",
"Rihanna 7.500\n",
"Foreigner 7.000\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n",
"User: 6\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Luther Vandross 13.000\n",
"Bonnie Raitt 9.875\n",
"Backstreet Boys 8.875\n",
"Whitesnake 6.000\n",
"Foreigner 6.000\n",
"Michael Jackson 5.875\n",
"Queen 5.000\n",
"Kenny Rogers 4.750\n",
"Cher 4.750\n",
"Glen Campbell 4.750\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n",
"User: 7\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Luther Vandross 15.000\n",
"Backstreet Boys 15.000\n",
"Reba Mcentire 9.375\n",
"Prince 9.000\n",
"Cher 9.000\n",
"Xscape 9.000\n",
"Natalie Cole 9.000\n",
"Michael Bolton 8.750\n",
"Michael Jackson 8.750\n",
"Alison Krauss 8.000\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n",
"User: 8\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Luther Vandross 13.500\n",
"Backstreet Boys 12.875\n",
"Diana Ross 11.375\n",
"R. Kelly 9.625\n",
"Reba Mcentire 8.750\n",
"Michael Jackson 8.500\n",
"Bonnie Raitt 8.000\n",
"Usher 7.875\n",
"The Monkees 7.875\n",
"Lionel Richie 7.875\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n",
"User: 9\n",
"###############\n"
]
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"artist\n",
"Diana Ross 11.625\n",
"Linda Ronstadt 11.375\n",
"Luther Vandross 11.000\n",
"Hillsong 10.875\n",
"Rihanna 10.750\n",
"Backstreet Boys 8.875\n",
"Chris Brown 8.875\n",
"Keith Urban 8.000\n",
"Glee 7.625\n",
"Jackson Browne 7.000\n",
"dtype: float64"
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"###############\n"
]
}
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "Mg6oR8l5w5sU"
},
"execution_count": null,
"outputs": []
}
]
} |