{ "metadata": { "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.0" }, "orig_nbformat": 2, "kernelspec": { "name": "python37364bit8d3b438fb5fc4430a93ac2cb74d693a7", "display_name": "Python 3.7.0 64-bit ('3.7')" }, "metadata": { "interpreter": { "hash": "70b38d7a306a849643e446cd70466270a13445e5987dfa1344ef2b127438fa4d" } } }, "nbformat": 4, "nbformat_minor": 2, "cells": [ { "source": [ "# Nigerian Music scraped from Spotify - an analysis" ], "cell_type": "markdown", "metadata": {} }, { "cell_type": "code", "execution_count": 81, "metadata": {}, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Requirement already satisfied: seaborn in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (0.11.1)\n", "Requirement already satisfied: scipy>=1.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from seaborn) (1.4.1)\n", "Requirement already satisfied: pandas>=0.23 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from seaborn) (1.1.2)\n", "Requirement already satisfied: numpy>=1.15 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from seaborn) (1.19.2)\n", "Requirement already satisfied: matplotlib>=2.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from seaborn) (3.1.0)\n", "Requirement already satisfied: pytz>=2017.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pandas>=0.23->seaborn) (2019.1)\n", "Requirement already satisfied: python-dateutil>=2.7.3 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pandas>=0.23->seaborn) (2.8.0)\n", "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn) (2.4.0)\n", "Requirement already satisfied: kiwisolver>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn) (1.1.0)\n", "Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn) (0.10.0)\n", "Requirement already satisfied: six>=1.5 in /Users/jenlooper/Library/Python/3.7/lib/python/site-packages (from python-dateutil>=2.7.3->pandas>=0.23->seaborn) (1.12.0)\n", "Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib>=2.2->seaborn) (45.1.0)\n", "\u001b[33mWARNING: You are using pip version 20.2.3; however, version 21.1.2 is available.\n", "You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -m pip install --upgrade pip' command.\u001b[0m\n", "Note: you may need to restart the kernel to use updated packages.\n" ] } ], "source": [ "pip install seaborn" ] }, { "cell_type": "code", "execution_count": 82, "metadata": {}, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " name album \\\n", "0 Sparky Mandy & The Jungle \n", "1 shuga rush EVERYTHING YOU HEARD IS TRUE \n", "2 LITT! LITT! \n", "3 Confident / Feeling Cool Enjoy Your Life \n", "4 wanted you rare. \n", "\n", " artist artist_top_genre release_date length popularity \\\n", "0 Cruel Santino alternative r&b 2019 144000 48 \n", "1 Odunsi (The Engine) afropop 2020 89488 30 \n", "2 AYLØ indie r&b 2018 207758 40 \n", "3 Lady Donli nigerian pop 2019 175135 14 \n", "4 Odunsi (The Engine) afropop 2018 152049 25 \n", "\n", " danceability acousticness energy instrumentalness liveness loudness \\\n", "0 0.666 0.8510 0.420 0.534000 0.1100 -6.699 \n", "1 0.710 0.0822 0.683 0.000169 0.1010 -5.640 \n", "2 0.836 0.2720 0.564 0.000537 0.1100 -7.127 \n", "3 0.894 0.7980 0.611 0.000187 0.0964 -4.961 \n", "4 0.702 0.1160 0.833 0.910000 0.3480 -6.044 \n", "\n", " speechiness tempo time_signature \n", "0 0.0829 133.015 5 \n", "1 0.3600 129.993 3 \n", "2 0.0424 130.005 4 \n", "3 0.1130 111.087 4 \n", "4 0.0447 105.115 4 " ], "text/html": "
\n | name | \nalbum | \nartist | \nartist_top_genre | \nrelease_date | \nlength | \npopularity | \ndanceability | \nacousticness | \nenergy | \ninstrumentalness | \nliveness | \nloudness | \nspeechiness | \ntempo | \ntime_signature | \n
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \nSparky | \nMandy & The Jungle | \nCruel Santino | \nalternative r&b | \n2019 | \n144000 | \n48 | \n0.666 | \n0.8510 | \n0.420 | \n0.534000 | \n0.1100 | \n-6.699 | \n0.0829 | \n133.015 | \n5 | \n
1 | \nshuga rush | \nEVERYTHING YOU HEARD IS TRUE | \nOdunsi (The Engine) | \nafropop | \n2020 | \n89488 | \n30 | \n0.710 | \n0.0822 | \n0.683 | \n0.000169 | \n0.1010 | \n-5.640 | \n0.3600 | \n129.993 | \n3 | \n
2 | \nLITT! | \nLITT! | \nAYLØ | \nindie r&b | \n2018 | \n207758 | \n40 | \n0.836 | \n0.2720 | \n0.564 | \n0.000537 | \n0.1100 | \n-7.127 | \n0.0424 | \n130.005 | \n4 | \n
3 | \nConfident / Feeling Cool | \nEnjoy Your Life | \nLady Donli | \nnigerian pop | \n2019 | \n175135 | \n14 | \n0.894 | \n0.7980 | \n0.611 | \n0.000187 | \n0.0964 | \n-4.961 | \n0.1130 | \n111.087 | \n4 | \n
4 | \nwanted you | \nrare. | \nOdunsi (The Engine) | \nafropop | \n2018 | \n152049 | \n25 | \n0.702 | \n0.1160 | \n0.833 | \n0.910000 | \n0.3480 | \n-6.044 | \n0.0447 | \n105.115 | \n4 | \n