lepvteo/listening-data-explorer
Spotify Listening Data Explorer
An interactive Streamlit application for analyzing personal Spotify listening history with statistical insights and nice visualizations.
Features
Data Analysis
- Top Content — Explore your most-played artists, tracks, and albums
- Temporal Analysis — Visualize listening patterns by hour, day, and month
- Valid Streams Filtering — Understand Spotify's 30-second threshold and its impact on your stats
- Hypothesis Testing — Statistical tests on naive listening behavior hypotheses:
- Pareto Principle (80/20 rule)
- Platform comparison (mobile vs desktop)
- Time-of-day listening patterns
Two Modes 🎭
Demo Mode — Try the app instantly with pre-loaded sample data (author's listening history)
Upload Mode — Analyze your own Spotify Extended Streaming History
How to use
Option 1: Try Online (Recommended)
Visit the HuggingFace Space
Option 2: Run Locally
Prerequisites: Python 3.13+, pip
Installation
- Clone the repository
git clone https://github.com/lepvteo/spotify-listening-explorer.git
cd spotify-listening-explorer- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Run the app
streamlit run app.py- The app will open at
http://localhost:8501. Choose your mode (demo or upload your data) and explore the application.
Data (If you want to get your own spotify data)
- Go to Spotify Account Privacy Settings
- Request Extended Streaming History
- Wait for email (between 1-30 days)
- Download and extract the zip files
- Upload the
Streaming_History_Audio_*.jsonto the app
Privacy & Security
Demo Data
- Real listening history from the author with all sensitive information removed.
- Only music preferences and temporal patterns are visible
Your Data
- Processed entirely client-side in your browser
- Never stored on any server
- Complete privacy: Your data stays with you
Project Structure
repository/
├── app.py # Main Streamlit application
├── demo_data/ # Pre-processed demo data
│ ├── streams_all.parquet
│ └── streams_valid.parquet
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore patterns
└── README.md # This fileAuthor
Teo Le Provost Data Science & Business Analytics Master Student University of Warsaw
Originally developed as a final project for Introduction to Python and SQL course (January 2026), and extended with additional features for portfolio purposes.
📧 Contact
Feel free to reach out for questions or collaboration!
License
MIT License This app is not affiliated with Spotify. It's an independent project initially submitted as academic coursework for educational purposes.
