Blockbuster Movie Trends
Tags: python, datascience, sql, database
Published: 2019-09-20 00:40:55

Imagine that you are the CEO of a trillion-dollar company like Microsoft. One night, after watching a movie at the AMC with your girlfriend, you thought about entering the Hollywood industry and make a lot of money for your company. Before doing that, you need to hear a little insight about the current movies market. Consequently, you consult with a data scientist and here is what he has:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/1gxlp3iu6c87lr5os59a.gif)


##Data
The objective of this project is to find the trend of popular movies in the U.S. This blog will explain the data through visualization that requires no technical knowledge to understand.  However, a [GitHub repository](https://github.com/williamhuybui/Blockbuster-Movie-Trends) is provided for those interested in the technical details of this project in regards to Data Science.  

The data come from 220 top gross revenue movies from 2009 to 2019. This is obtained through the API requests from the [movies database] (https://www.themoviedb.org/). Also, a list of the 1000 best actor is collected from [imdb] (https://imdb.com/).
The program is written in Python and is presented by Tableau.

## Question
### 1) What is the average profit and rating?
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/w6c2mj0uib920cws23fv.png)

The average rating is 6.845, ranging from 4.8 (Independent Day) to 8.3 (Inception).  

Avengers: Endgame unsurprisingly made more money than any movie in history with $2.4b in profit. The lowest one come from Dark Phoenix with $45m. The average profit of this top 220 movies is $538m.

### 2) Which MPAA rating attracts the most audience? 
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/58s1nkobme8rz3j20nd1.png)

Teen friendly movies, **PG-13**, are top of the chart for the Motion Picture Association of America (MPAA) rating with over 50% of the top-grossing movie market. The reason is simple, it has the widest range of audience.

### 3) When is the best time to release a movie?
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/fhafcldstr34i7fk6ci3.png)

The best months for going to the box office are : 
Summer blockbusters: **May, June, July**.
Thanksgiving and Christmas time: **November, December**.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/875pkc2nw3yfjyobr5in.gif)

### 4) Best genres to invest
![Alt Text]
(https://thepracticaldev.s3.amazonaws.com/i/7xtbfltjz32i9cu12i4a.png)
 
No 1: **Action-Adventure** such as Wonder Woman, Captain America, The Hunger Games.
No 2: **Action-Fantasy** such as Lord of the Rings, Maleficent, Star Wars.
No 3: **Animation-Family** such as Lion King, Inside Out, Wall-E.

### 5) Profit expectancy
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/9zw26ioiqjnbftpm8peu.png)

The linear regression line shows the correlation between your profit and investment with the formula: **profit=1.55*budget+3.08*10^8**.

For example, let's assume that every step from marketing, production, leadership, to choosing the right studio is nearly perfect, if your company invest in $100m, then you should expect to see $455m in return!

It also worths to mention some of the special cases:
**Avatar** is the most profitable movie of all time, where profitability is derived from profit/budget ratio. One reason for that is Avatar is the **first 3D movie** released in the movie theater.

**Avengers: Endgames** is the next outliner. The sequence is the culmination of 22 movies released over 11 years!

Therefore, new technology or careful sequel planning is the game changer! 

Justice League is on the other side of the spectrum. The movie falls at the bottom of this list due to the failure of its leadership. More about it [here](https://www.forbes.com/sites/markhughes/2018/03/23/justice-league-was-a-sad-failure-in-studio-leadership/#703a215e5e5d).

### 6) The association of genres and profit
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/h3mbqwty4547eno4sq2e.png)

Take a look closer to the best three genres. The trend lines show that if the budget is:
* **Less than $125m**, you should invest in **Animation**.
* **Between $125 and $182**,  you should invest in **Action**.
* **More than $182m**, you should invest in **Adventure**.

### 7) How many good actors should we hire?
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/qv06967s6qtft963lgy3.png)

The casting is a big factor in our calculation. Hiring popular actors can significantly increase the anticipation/attention of the audience. A stunning moment of Gal Gadot could go viral on the internet for a few weeks.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/9c7kq5qy5sza2u14p8il.gif)
 
We also want to hire actors that can roller coaster audience's emotion. The list of 1000 best actor capture all of these features. Some of the people on the list are Jack Nicholson,  Leonardo DiCaprio,  Morgan Freeman. 

The graph shows that action, adventure, and family genres have an average of **5 A-rank actors**. Interestingly, history movies have the most, 7 actors on average. Though, it has been proved that visual effects can overshadow acting skill.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/cvnp5b7h3wvn1qi572rn.gif)

##Summary:
* Top 3 genres for a high grossing film are **Action, Animation, and Adventure** with action being the highest rank. The profitability also **depends on the budget range**. 
* Release movies during the **summer months** and before and during **winter break**. 
* Hire at least **5 movie stars**.
* Rate it **PG13**.