This project aims to analyze Spotify's music dataset to uncover insights into popular songs, genres, trends, and audio features. Using Python and data visualization techniques, we explore how various factors influence song popularity and listener preferences.
The dataset used in this project includes information about songs such as:
- Track Name
- Artist
- Album
- Release Year
- Duration (ms)
- Danceability
- Energy
- Loudness
- Tempo
- Valence (Musical Positivity)
- Popularity Score
You can find the dataset https://www.kaggle.com/datasets/lehaknarnauli/spotify-datasets
- Python
- Pandas – Data manipulation and analysis
- Matplotlib & Seaborn – Data visualization
- NumPy – Numerical computations
- Scikit-learn – Machine learning for trend analysis
- Spotify API (Spotipy) – Fetch real-time data
✅ Data Cleaning & Preprocessing – Handling missing values, formatting data
✅ Exploratory Data Analysis (EDA) – Visualizing trends in song attributes
✅ Feature Correlation – Identifying relationships between attributes (e.g., danceability vs. popularity)
✅ Trend Analysis – Examining how song characteristics evolved over time
✅ Genre Popularity Insights – Which genres perform best over time
✅ Machine Learning Prediction – Predicting song popularity based on features
1️⃣ Clone the repository:
git clone https://github.com/yourusername/Spotify-Data-Analysis-Using-Python.git
cd Spotify-Data-Analysis-Using-Python
2️⃣ Install dependencies:
pip install pandas numpy matplotlib seaborn scikit-learn spotipy
3️⃣ Run the analysis script:
python analysis.py
- Songs with high energy and danceability tend to have higher popularity scores.
- Tempo and valence (happiness factor) have a moderate impact on song success.
- Over the years, loudness and tempo have increased in popular songs.
- Certain genres dominate in different decades (e.g., Hip-Hop in the 2000s).
This analysis provides valuable insights into what makes a song popular on Spotify. The findings can help artists, producers, and playlist curators optimize their music for a wider audience.
Feel free to fork this repository, make improvements, and submit a pull request!