🎬 IMDb Movie Ratings Analysis
📄 Visual report:
Movie Analysis Report
🔹 Quick Overview
This project analyzes IMDb movie ratings using SQL and Python, with a focus on how simple averages can be misleading without proper segmentation.
The goal was to practice real-world analytical thinking:
- identifying data bias and limitations
- using thresholds and percentiles instead of naive aggregates
- clearly communicating insights through visualizations
Source: IMDb public datasets
Scope: ~93,000 movies
With ratings: ~83,000
Without ratings: ~10,000
To reduce noise and selection bias, most analyses apply minimum vote thresholds and avoid direct comparisons where data density differs significantly across groups.
- Average rating by year and decade
- Decade comparison (1990s vs 2010s)
Insight:
Post-2010 decades contain significantly fewer rated movies and are therefore excluded or handled separately.
Focused deep dive into a peak period of modern cinema.
- Best and worst years by average rating
- Top and bottom movies by rating and popularity
- Popularity (votes) vs quality (rating)
Findings:
- 1992–1995 combine high ratings with lower movie volume
- After 2000, volume increases while average ratings decline
- Popularity and quality are positively correlated, but mass popularity is not required for high quality
- Average ratings by genre
- Best movie per genre
- Genre dominance and bias awareness
Insight:
Documentary and Biography genres systematically score higher and should not be compared directly with mainstream genres without context.
Runtime buckets:
- Short (< 90 min)
- Standard (90–119 min)
- Long (120+ min)
Finding:
Longer movies achieve significantly higher average ratings, suggesting ambitious storytelling benefits from extended runtime.
Sci-Fi movies were segmented by decade and split into Top 10% vs Bottom 90% using rating percentiles.
Key insight:
Iconic Sci-Fi classics exist in every decade, but growth in lower-quality production drags down decade averages.
Segmentation reveals insights that simple averages hide.
Definitions:
- Iconic: rating ≥ 8.0 and top 5% by votes
- Cult: rating ≥ 8.0 and moderate popularity (50k–top 5%)
Insights:
- Iconic and cult movies have similar quality
- The difference lies in reach, not rating
- Iconic films dominate Drama, Crime, Action, and Adventure
- Cult films skew toward Animation, War, Romance, and international cinema
Iconicity Index = iconic movies / all movies in genre
Findings:
- Crime and Drama show the highest iconicity
- Fantasy and Sci-Fi perform strongly despite smaller volume
- Comedy and Horror produce many movies but few iconic ones
Volume ≠ cultural impact.
- SQL joins, CTEs, and window functions
- Percentiles (
PERCENTILE_CONT) - Handling multi-value fields (genre explosion)
- Bias-aware filtering (vote thresholds)
- Data segmentation and bucketing
- Analytical storytelling
Exploratory queries were intentionally excluded from final SQL scripts to keep each file focused on a single analytical question.
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Open visualizations:
jupyter notebook python/visualizations.ipynb
- Execute SQL scripts in PostgreSQL (pgAdmin) from the sql/ folder
📁 Project Structure
├── sql/
│ ├── 01_trends.sql
│ ├── 02_popularity_vs_quality.sql
│ ├── 03_genres.sql
│ ├── 04_scifi_case_study.sql
│ └── 05_iconic_movies.sql
│
├── python/
│ └── visualizations.ipynb
│
├── report/
│ └── movie_analysis_report.md
│
└── README.md
📊 Data Source
This project uses the official IMDb public datasets: https://datasets.imdbws.com/
Raw data files are not included in this repository due to their size. All analysis logic (SQL and Python) is fully reproducible using the public datasets.
🔮 Future Extensions
Alternative definitions of cultural impact (box office, awards)
Comparison with Rotten Tomatoes and Metacritic
Extension to TV shows and streaming-era content
🎯 Final Note
This project reflects how I approach data analysis in practice: asking the right questions, choosing bias-aware metrics, and communicating insights clearly.
The goal was not exhaustive analysis, but thoughtful exploration of real, imperfect data.