A full end-to-end data analytics project built using MySQL and Power BI, analyzing 114,000 Spotify tracks across 114 genres to uncover music trends, audio patterns, and popularity insights.
This project takes raw Spotify track data, loads it into a MySQL database, connects it to Power BI, and builds a 4-page interactive dashboard that answers:
- Which artists and genres are most popular?
- What audio features make a song a hit?
- How do genres differ in energy, danceability, and mood?
- How can we search and explore any track instantly?
flowchart TD
subgraph SRC["π¦ Source"]
A["Kaggle Dataset<br/>Spotify Tracks Dataset<br/>114,000 rows Γ 21 cols"]
end
subgraph DB["ποΈ MySQL 8.0"]
B["dataset.csv"]
C["create_table.sql<br/>(schema definition)"]
D["load_data.sql<br/>(bulk load via<br/>secure file path)"]
E[("spotify_db<br/>Spotify Tracks table")]
end
subgraph ETL["π Power Query Transformations"]
F["duration_ms β duration_min"]
G["explicit: 0/1 β Clean/Explicit"]
H["popularity_tier:<br/>Low / Medium / High"]
I["Trim whitespace<br/>(artists, track_name, album_name)"]
J["Remove duplicate track_id"]
K["Fix numeric data types"]
end
subgraph DAX["π DAX Measures"]
L["Total Tracks, Avg Popularity,<br/>Explicit %, Total Genres,<br/>Avg Duration Min"]
end
subgraph BI["π Power BI Dashboard (Spotify.pbix)"]
M["Page 1: Music Overview<br/>KPIs, Top Artists, Genre Treemap"]
N["Page 2: Genre Analysis<br/>Popularity & Audio Features by Genre"]
O["Page 3: Track & Artist Deep Dive<br/>Top Tracks, Tempo, Valence vs Energy"]
P["Page 4: Track Intelligence Hub<br/>Search & Filter any Track"]
end
A --> B
C -->|1. creates schema| E
B --> D
D -->|2. inserts data into schema| E
E -->|MySQL Connector/NET| F
F --> G --> H --> I --> J --> K
K --> L
L --> M
L --> N
L --> O
L --> P
- Source: Spotify Tracks Dataset (Kaggle)
- File: dataset.csv
- Size: 114,000 rows Γ 21 columns
- Key columns:
track_name,artists,track_genre,popularity,danceability,energy,tempo,valence,explicit,duration_ms
| Tool | Purpose |
|---|---|
| MySQL 8.0 | Database storage and querying |
| MySQL Workbench | Database management |
| Power BI Desktop | Dashboard creation |
| Power Query | Data transformation |
| DAX | Calculated measures |
git clone https://github.com/vedant-kawale-27/spotify-track-intelligence-powerbi-mysql.git
cd Spotify-Track-IntelligenceOpen create_table.sql in MySQL Workbench and run the query.
Copy dataset.csv to your MySQL secure file path: 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/'
Open load_data.sql in MySQL Workbench and run the query.
- Install MySQL Connector/NET from https://dev.mysql.com/downloads/connector/net/
- Open Power BI Desktop
- Home β Get Data β MySQL Database
- Server:
localhost| Database:spotify_db - Select: Database β Enter: User name & Password β Connect
- Click Transform Data
Open Spotify.pbix in Power BI Desktop β all visuals load automatically.
- Converted
duration_msβduration_min(milliseconds to minutes) - Replaced
explicitvalues:0βClean,1βExplicit - Added
popularity_tiercolumn: Low / Medium / High - Trimmed whitespace from
artists,track_name,album_name - Removed duplicate
track_identries - Changed data types for all numeric columns
Total Tracks = COUNTROWS('Spotify Tracks')
Avg Popularity = ROUND(AVERAGE('Spotify Tracks'[popularity]), 2)
Explicit Tracks = COUNTROWS(FILTER('Spotify Tracks', 'Spotify Tracks'[explicit] = "Explicit"))
Explicit % = ROUND(DIVIDE([Explicit Tracks], [Total Tracks]) * 100, 1)
Total Genres = DISTINCTCOUNT('Spotify Tracks'[track_genre])
Avg Duration Min = ROUND(AVERAGE('Spotify Tracks'[duration_min]), 2)
- 5 KPI Cards: Total Tracks, Avg Popularity, Explicit %, Total Genres, Avg Duration
- Top 10 Artists by Track Count (Bar Chart)
- Popularity Distribution: Low / Medium / High (Column Chart)
- Explicit vs Clean split (Donut Chart)
- Tracks by Genre (Treemap)
- Avg Popularity by Genre (Horizontal Bar Chart)
- Energy vs Popularity by Genre (Scatter Plot)
- Audio Features by Genre: Danceability, Energy, Valence, Acousticness (Clustered Bar)
- Genre Slicer (Dropdown)
- Top 10 Tracks by Popularity (Table with conditional formatting)
- Danceability vs Popularity (Scatter Plot)
- Avg Tempo by Genre (Column Chart)
- Valence vs Energy mood map (Scatter Plot)
- Slicers: Genre, Explicit, Popularity Tier
- Search by Track Name (Text Slicer)
- Search by Artist (Text Slicer)
- Filter by Genre (List Slicer)
- Explicit Filter (Tile Slicer)
- Popularity Range (Between Slider)
- Results Table: track_name, artists, genre, popularity, explicit, duration_min
- Detail Cards: Avg Danceability, Avg Energy, Avg Tempo, Avg Duration
Spotify-Track-Intelligence/
β
βββ dataset/
β βββ dataset.csv
β
βββ database/
β βββ create_table.sql
β βββ load_data.sql
β
βββ dashboard/
β βββ Spotify.pbix
| βββ Spotify.pdf
β
βββ assets/
β βββ Spotify_page-0001.jpg
β βββ Spotify_page-0002.jpg
β βββ Spotify_page-0003.jpg
β βββ Spotify_page-0004.jpg
β
βββ README.md
|
βββ LICENSE
- Pop-film, K-pop, and Chill are the most popular genres on average
- The Beatles, George Jones, and Stevie Wonder have the most tracks in the dataset
- Only 8.6% of tracks are explicit β most content is clean
- Songs with higher danceability tend to have moderately higher popularity
- Grunge and Sertanejo genres have the highest average tempo
Vedant Kawal
- Built with MySQL + Power BI
- Dataset: Spotify Tracks (Kaggle)
- Tools: MySQL Workbench 8.0, Power BI Desktop
This project is open source under the MIT License.



