top of page
Search

Investigating Netflix Movies and Guest Stars in The Office

efeomoghene82
Jan 16, 2024
3 min read
Introduction:

This project was my first on Data Camp where I completed a certification course in data analytics using Python. It gave me an awesome and soft-padded opportunity to both exhibit and develop my data manipulation skills using entertainment industry data. The project was done on the Data Camp website.


Loading Data in a Dictionary:

The premise for this project was that the average duration of movies has been declining over the years. The purpose of this analysis therefore, was to prove or disprove this hypothesis. To start, I had information on the average movie durations for 2011 to 2020, which I used to create two lists, and then created a dictionary of the two lists.



Creating DataFrame from Dictionary + Visualisation:

Then I created a DataFrame from the dictionary; I first imported pandas library. After creating the DataFrame, I checked it out to be sure it was created correctly. To follow up the assertion that movie lengths have been decreasing over the years, I visualised the data. Given that the data was numerical and continuous, I used a line plot to represent the data. Matplotlib was used for this.



Loading Data From CSV file:

As it turned out, the assumption that movie lengths have been declining did hold some water after all. However, this insight led to more questions:

  1. What does this trend look like over a longer period of time?

  2. Is this explainable by something like the genre of entertainment?

The answering of these questions started by collecting and reading the original CSV file that contains all the information on Netflix movies as a DataFrame. The dataset contained information on show_id, type, title, director, cast, country, date_added, release_year, duration, description, and genre. From printing the first five rows of the data, it showed that the dataset contained TV shows as well as movies, and the durations were very disparate depending on whether it represented a movie or a show.


Filtering and Subsetting + Creating a Scatter Plot:

I filtered the DataFrame to leave only those whose type was movie; I also created a new DataFrame containing only the relevant columns. Since I now had data covering a much longer range of time, I wanted to insect to see what it looked like. A scatter plot was now more suitable.





Digging Deeper:

From this visual, I could see that there were lots more newer movies than older ones. Also, in the last two decades, several short movies were released. There were films that were even under an hour long. To find out what was influencing the average, I filtered the DataFrame for movies with a duration under 60 minutes, and printed the first twenty rows.


Marking Non-feature Films

Many of the films fell into genres such as "Children", "Stand-Up", and "Documentaries" which are typically shorter that a regular movie length. Instead of eliminating the rows and plotting the scatter plot again, I explored the effects of these genres on the data using different colours. To do this, I used a loop to generate a list of colours based on the contents of the genre column, then passed this list to the plotting function to colour all non-typical genres in a different colour.




This was the final result, and as suspected, non-typical genres such as children's movies and documentaries are all clustered around the bottom half of the plot, amongst the shortest durations. To answer the questions generated from the first insight:

  1. More movies (black dots) were released over the decades, with shorter durations than older movies

  2. The genre of entertainment had a huge effect on bringing down the average duration of films with children's movies, documentaries and stand-up having durations under 90 minutes. in their absence, the decline in movie durations would probably not be so stark.

 

 
 
 

Comments


Subscribe to Receive The Latest Tech News

About Me

As an ever-upscaling data analyst, I am constantly striving to learn and grow in this field. I am self-taught and eager to take on any challenge that comes my way. I am passionate about using data and analytics to drive business decision-making and provide valuable insights. I believe that my analytical skills and ability to communicate complex insights make me a valuable asset to any team.

© 2023 by Efe. Powered and secured by Wix

bottom of page