Upload README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Assignment #1 - EDA & Dataset - orian rivlin
|
| 2 |
+
|
| 3 |
+
**Goal:**
|
| 4 |
+
Explore which audio features are most strongly related to a track’s **popularity** on Spotify.
|
| 5 |
+
This repository includes the dataset sample, a well-documented notebook, saved figures, and a short video walkthrough.
|
| 6 |
+
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## Dataset
|
| 10 |
+
- **Name:** Spotify Features (Sample)
|
| 11 |
+
- **File:** `SpotifyFeatures_sample.csv`
|
| 12 |
+
- **Rows:** ~10,000 | **Columns:** 18 (mostly numeric)
|
| 13 |
+
- **Target:** `popularity` (0–100)
|
| 14 |
+
- **Main numeric features:** `danceability`, `energy`, `loudness`, `speechiness`, `acousticness`, `instrumentalness`, `liveness`, `valence`, `tempo`, `duration_ms`
|
| 15 |
+
- **Source:** Spotify Tracks DB (via Kaggle)
|
| 16 |
+
|
| 17 |
+
**Main question:** Which audio features are most strongly related to popularity?
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## Data Cleaning (Step 2.1)
|
| 22 |
+
- Removed duplicate rows.
|
| 23 |
+
- Checked missing values (none in key columns)
|
| 24 |
+
- Dropped rows with NA in core numeric features if present.
|
| 25 |
+
- Built a numeric-only DataFrame for stats and correlations.
|
| 26 |
+
|
| 27 |
+
Result: **10,000 rows × 11 numeric features** ready for EDA.
|
| 28 |
+
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
## EDA Highlights
|
| 32 |
+
|
| 33 |
+
### 1) Distributions
|
| 34 |
+
- **Popularity** is concentrated around **40-60** with few very high hits (80+).
|
| 35 |
+
- **Danceability** ~ bell-shaped around ~0.56.
|
| 36 |
+
- **Energy** skews higher (many tracks at 0.7-0.9).
|
| 37 |
+
- **Valence** is broadly spread (neutral on average).
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+

|
| 41 |
+
|
| 42 |
+
### 2) Correlations with Popularity
|
| 43 |
+
Top relationships:
|
| 44 |
+
|
| 45 |
+
| Feature | Corr. with popularity |
|
| 46 |
+
|------------------|-----------------------|
|
| 47 |
+
| **loudness** | **+0.31** |
|
| 48 |
+
| **energy** | **+0.27** |
|
| 49 |
+
| danceability | +0.06 |
|
| 50 |
+
| tempo | +0.02 |
|
| 51 |
+
| valence | −0.06 |
|
| 52 |
+
| **acousticness** | **−0.35** |
|
| 53 |
+
|
| 54 |
+
**Interpretation.** Popular tracks tend to be **louder** and **more energetic**, and **less acoustic**.
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
|
| 58 |
+
### 3) Popular vs. Unpopular (Top 10% vs Bottom 10%)
|
| 59 |
+
- **Energy** and (slightly) **danceability** are higher among top-10% tracks.
|
| 60 |
+
- **Tempo** shows little difference.
|
| 61 |
+
- **Valence** is only slightly higher for top tracks.
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
+
## Key Insights
|
| 68 |
+
- Popularity on Spotify is **uneven**: only a small minority of tracks become very popular.
|
| 69 |
+
- **Loudness** and **energy** are the strongest positive correlates of popularity; **acousticness** is the strongest negative correlate.
|
| 70 |
+
- Highly popular songs tend to sound **modern/produced** (loud, energetic), while purely acoustic/instrumental tracks underperform on average.
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## 2-3 Minute Video
|
| 75 |
+
Paste your video link here (Loom/YouTube/Drive):
|
| 76 |
+
**Video:** _ADD_LINK_HERE_
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## Files
|
| 81 |
+
- `SpotifyFeatures_sample.csv` – dataset sample
|
| 82 |
+
- `spotify_eda_notebook.ipynb` – code & plots
|
| 83 |
+
- `materials/` – exported materials used in this README
|
| 84 |
+
- `README.md` – this summary
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
## Notes and Decisions
|
| 89 |
+
- **Outliers** (very long tracks; very low/high popularity) were **kept** as real observations; statistics were interpreted cautiously.
|
| 90 |
+
- Correlations are **modest** overall (music success is multifactorial); results describe associations, not causation.
|