Exploring the Netflix Streaming Library with Plotly Visualizations
Netflix has revolutionized the way we consume TV shows and movies. With over 220 million subscribers worldwide and a constantly growing content library, Netflix offers an enormous wealth of entertainment options for every taste and preference. As data science enthusiasts, we couldn‘t resist the opportunity to dive into Netflix‘s vast trove of streaming data and uncover insights about their content portfolio, user preferences, and strategic trends.
In this post, we‘ll perform an exploratory data analysis (EDA) on a dataset of Netflix titles using the powerful Plotly graphing library. Through a series of interactive visualizations, we‘ll examine the breakdown of Netflix‘s content by type and genre, identify the most popular ratings categories, track content release trends over time, compare attributes of movies versus shows, and much more. So grab your popcorn and get ready to explore the fascinating world of Netflix content through stunning Plotly charts.
The Dataset
For this analysis, we‘ll be working with a dataset of Netflix titles available on Kaggle. The dataset contains metadata on 8807 titles (movies and shows) added to the Netflix catalog between 1925 and 2021. The raw data includes the following fields for each title:
- Title
- Type (Movie or TV Show)
- Director(s)
- Cast
- Country of production
- Release year
- Rating (e.g. TV-MA, PG, etc.)
- Duration
- Listed genres
- Description
Before diving into the analysis and visualizations, we performed some light data cleaning and preprocessing:
- Removed titles with missing data in key fields
- Extracted year added to Netflix from the date_added field
- Calculated total seasons for TV shows based on the duration field
- Simplified overlapping genre categories
With our dataset prepped, let‘s start exploring the many dimensions of Netflix‘s content library using Plotly.
Movie vs TV Show Balance
First, let‘s look at the overall breakdown of content type within Netflix‘s catalog. Are there more movies or TV shows available to stream? We can easily visualize the relative proportion of each using a simple donut chart:
px.pie(netflix, names=‘type‘, hole=0.6,
title=‘Content Type Breakdown‘)
The results show that an overwhelming majority of titles (69%) in the Netflix library are movies rather than multi-episode TV shows. This makes sense given that movies have been around much longer than streaming TV series, so there is a deeper back catalog to pull from.
However, Netflix has invested heavily in original series content over the past decade, which has shifted the balance somewhat. It will be interesting to see if the proportion of TV shows continues to grow over time. Speaking of which…
Content Release Trends
Next, let‘s examine how Netflix‘s content library has evolved over the years. We can track the total number of movies and TV shows added to the platform each year using an area chart:
px.area(netflix, x="year_added", color="type",
stackgroup=‘one‘, groupnorm=‘percent‘,
title=‘Percent of Titles Added by Year‘)
This chart reveals some fascinating insights about Netflix‘s content growth:
- Overall content additions have increased exponentially since the early 2010s as streaming took off
- TV shows have made up a larger percent of new titles in recent years, supporting our hypothesis above
- There was a noticeable dip in movie and show releases in 2020, likely due to COVID-related production delays
So while movies still dominate the back catalog, the streaming era has ushered in a boom in high-quality serial content. What kinds of series are most prevalent on the platform? Let‘s look at the top genres next.
Genre Popularity
Using a treemap chart, we can quickly visualize the relative popularity of different genres across all titles in the Netflix library:
px.treemap(netflix, path=[‘listed_in‘], values=‘count‘,
title=‘Most Popular Netflix Genres‘)
The treemap shows that Dramas and Comedies are by far the most common genres on Netflix, followed by Documentaries, Action & Adventure, and Thrillers. This aligns with Netflix‘s strategic focus on prestige dramas and popular comedy specials in recent years.
Interestingly, while Reality TV has exploded in popularity on broadcast networks, the genre is underrepresented on Netflix compared to scripted fare. Meanwhile, niche genres like Anime and Stand-Up Comedy have sizable followings on the platform.
Rating the Ratings
Another lens we can use to understand the Netflix content mix is through rating categories. Ratings indicate the intended age appropriateness of a title and can provide clues about the target audience. Here‘s the distribution of titles by rating on Netflix:
px.histogram(netflix, x="rating",
title=‘Distribution of Ratings‘,
labels={‘rating‘:‘Rating‘, ‘count‘:‘No. of Titles‘})
A few quick takeaways:
- The most frequent rating by far is TV-MA (Mature Audiences), encompassing over 40% of titles. Netflix is clearly catering heavily to an adult audience.
- The next two most popular ratings are TV-14 and R, suggesting a focus on content for teens and older.
- There is a limited selection of content rated G or PG for younger kids. As Netflix‘s audience ages up, they may need to expand offerings for families.
Binge-Worthy Box Office
As a final comparison, let‘s see how Netflix‘s original movies stack up against their TV shows in terms of critical reception. We can visualize each title‘s Rotten Tomatoes critic score and audience score in an interactive scatter plot:
px.scatter(netflix, x=‘rt_critic‘, y=‘rt_audience‘, color=‘type‘,
hover_data=[‘title‘],
title=‘Critic & Audience Scores for Netflix Originals‘)
Scanning the plot, we can see that Netflix‘s original series (especially prestige dramas like The Crown and Stranger Things) tend to earn higher critic and audience scores compared to their movie offerings on average.
However, the movie side has released a number of critical darlings as well, such as Roma, Marriage Story, and The Irishman. As Netflix continues to attract top directorial talent and make a splash with their original films, it will be interesting to track how they perform with critics and audiences over time.
Conclusion
Through our exploratory analysis and Plotly visualizations, we uncovered a number of key insights about Netflix‘s content library:
- Movies make up over two-thirds of all titles, leveraging Netflix‘s access to studio back catalogs
- However, original series now account for a larger share of new content additions each year
- Dramas and Comedies are the most popular genres, reflecting Netflix‘s strategic investments
- A large majority of content is rated TV-MA, TV-14, or R, aimed at teen and adult audiences
- Netflix‘s original series earn higher average critic and audience scores vs. original films
These findings could help inform several aspects of Netflix‘s content and marketing strategies, such as:
- Calibrating the balance of licensed vs. original content investments based on engagement data
- Identifying white space opportunities in underserved genres and age ratings
- Optimizing content merchandising and recommendations based on genre and rating insights
- Setting greenlight priorities for original movies to maximize critical reception
Of course, this analysis only scratches the surface of what is possible with Plotly and the Netflix streaming dataset. There are many more dimensions to explore, such as:
- Analyzing title-level attributes like cast members, directors, runtime, etc.
- Comparing metrics for different Netflix regions and countries
- Examining interaction effects between genres, ratings, release year, etc.
I encourage you to download the dataset and see what other insights you can uncover using Plotly‘s versatile charting capabilities. The power of data visualization awaits! If you have any questions or suggestions for further analysis, feel free to leave them in the comments below.