# Project: Analyze Box Office Data with Seaborn and Python

In this project, we will be working with the TMDB Box Office Revenue Prediction data set. The motion picture industry is raking in more revenue than ever with its expansive growth the world over. Can we build models to accurately predict movie revenue? Could the results from these models be used to further increase revenue? We try to answer these questions by way of exploratory data analysis (EDA) in this project and the next.

The statistical data visualization libraries Seaborn and Plotly will be our workhorses to generate interactive, publication-quality graphs.

Duration (mins)

Learners

#### NA / 5

Rating

We will cover the following tasks in 53 minutes:

### Importing Data and Libraries

In this task, we are introduced to the project and learning outcomes. Once we are familiarized with the Rhyme interface, we begin working in Jupyter Notebook, a web-based interactive computational environment for creating notebook documents.

Next, we will import essential libraries such as `NumPy`, `pandas`, `Seaborn`, and `matplotlib`. Lastly, we will load our data sets into memory using pandas and look at the first few entries.

The TMDB data set contains 7400 movies and a variety of metadata. Movies are labeled with `id`. Data points include cast, crew, plot keywords, budget, posters, release dates, languages, production companies, and countries.

### Visualizing the Target Distribution

This database was initially released so that teams could treat it like a regression problem and predict the worldwide box office revenue of 4400 movies provided in the test file.

However, we will use this feature rich database for data analysis and data visualization in this project. In the next project, we will use the same database for feature engineering and feature visualization.

To proceed to feature analysis, we first need to visualize the target. Using Seaborn’s `distplot` function, we will plot the distribution of movie revenues. To illustrate the skew, we will also plot the distribution of revenue on a logarithmic scale using `np.log1p`.

### Comparing Film Revenue to Budget

Just as we did in Task 2, we will create two subplots. One for the distribution of the `budget`; the other to plot the log budget against log revenue. We perform the log transformation to make the distributions more manageable.

### Do Official Homepages Impact Revenue?

In this task, we will use the data to demonstrate the effect of an official homepage on movie revenue. We will create a binary feature `has_homepage` to indicate the presence or absence of official movie homepages. We can use Seaborn’s `catplot()` function to plot the revenues for movies with and without homepages using our newly created features.

### Distribution of Lanuages across Films

As Hollywood is known globally, we would expect the data to support our intuition that English movies generate the highest revenue. In this task, we will use box plots to test this hypothesis. We might be surprised that our intuitions about the world may not always align.

### Common Words in Film Titles and Descriptions

It might be of interest of to identify trends across movie titles and descriptions and their effect on revenue. In this task, we will generate word cloud for movie titles and descriptions. Word Cloud is a data visualization technique used for representing text data in which the size of each word indicates its frequency or importance.

### How do Film Descriptions Impact Revenue?

To identify which words have the highest impact on revenue, we tokenize and vectorize movie titles and descriptions, fit a linear regression model to it, and use ELI5 to display the high impact words.

## Watch Preview

Preview the instructions that you will follow along in a hands-on session in your browser.

## About the Host (Snehan Kekre)

Snehan Kekre is a Machine Learning and Data Science Instructor at Coursera. He studied Computer Science and Artificial Intelligence at Minerva Schools at KGI, based in San Francisco. His interests include AI safety, EdTech, and instructional design. He recognizes that building a deep, technical understanding of machine learning and AI among students and engineers is necessary in order to grow the AI safety community. This passion drives him to design hands-on, project-based machine learning courses on Rhyme.

##### How is this different from YouTube, PluralSight, Udemy, etc.?
In Rhyme, all projects are completely hands-on. You don't just passively watch someone else. You use the software directly while following the host's (Snehan Kekre) instructions. Using the software is the only way to achieve mastery. With the "Live Guide" option, you can ask for help and get immediate response.
##### Is this session really free?
Absolutely! Your host (Snehan Kekre) has provided this session completely free of cost!
##### Can I buy Rhyme sessions for my company or learning institution?
Absolutely. We offer Rhyme for workgroups as well larger departments and companies. Universities, academies, and bootcamps can also buy Rhyme for their settings. You can select projects and trainings that are mission critical for you and, as well, author your own that reflect your own needs and tech environments. Please email us at help@rhyme.com
##### What kind of accessibility options does Rhyme provide?
Rhyme strives to ensure that visual instructions are helpful for reading impairments. The Rhyme interface has features like resolution and zoom that will be helpful for visual impairments. And, we are currently developing a close-caption functionality to help with hearing impairments. Most of the accessibility options of the cloud desktop's operating system or the specific application can also be used in Rhyme. If you have questions related to accessibility, please email us at accessibility@rhyme.com
##### Why don't you just use containers or virtual browsers?
We started with windows and linux cloud desktops because they have the most flexibility in teaching any software (desktop or web). However, web applications like Salesforce can run directly through a virtual browser. And, others like Jupyter and RStudio can run on containers and be accessed by virtual browsers. We are currently working on such features where such web applications won't need to run through cloud desktops. But, the rest of the Rhyme learning, authoring, and monitoring interfaces will remain the same.
##### I have a different question
Please email us at help@rhyme.com and we'll respond to you within one business day.

## More Projects by Snehan Kekre

###### Classify Toxic Comments using Convolutions with Keras
1 hour and 11 minutes
42 minutes
43 minutes
57 minutes
52 minutes
41 minutes
52 minutes
###### Project: Facial Expression Recognition in Keras
1 hour and 24 minutes
###### Project: Real-Time Object Detection with YOLOv3
1 hour and 5 minutes
###### Project: Image Super Resolution using Autoencoders in Keras
1 hour and 4 minutes
###### scikit-learn: Logistic Regression for Sentiment Analysis
1 hour and 26 minutes
45 minutes
58 minutes
57 minutes
###### Predictive Analytics for Business with H2O and R
1 hour and 6 minutes
47 minutes
43 minutes
###### Create Interactive Dashboards with Streamlit and Python
1 hour and 33 minutes
50 minutes
53 minutes
###### Project: Regression Analysis with Yellowbrick
1 hour and 10 minutes
55 minutes
###### Project: Named Entity Recognition using LSTMs with Keras
1 hour and 10 minutes
47 minutes
###### Build a Machine Learning Web App with Streamlit and Python
1 hour and 21 minutes
###### Logistic Regression with NumPy and Python
1 hour and 3 minutes
47 minutes
58 minutes
###### Explainable Machine Learning with LIME and H2O in R
1 hour and 24 minutes
###### Automatic Machine Learning with H2O AutoML
1 hour and 1 minute
58 minutes
###### Build a Data Science Web App with Streamlit and Python
1 hour and 21 minutes
###### Project: Support Vector Machines with scikit-learn
1 hour and 40 minutes
48 minutes
52 minutes
52 minutes
###### Project: Predict Employee Turnover with scikit-learn
1 hour and 4 minutes
###### Project: Predictive Modelling with Azure Machine Learning Studio
1 hour and 6 minutes
###### Project: Anomaly Detection in Time Series Data with Keras
1 hour and 3 minutes
59 minutes
###### Project: Generate Synthetic Images with DCGANs in Keras
1 hour and 7 minutes
###### Project: Perform Feature Analysis with Yellowbrick
1 hour and 15 minutes
52 minutes