Analysis to the film-making industry using the top-voted movies on TMDB, and sheer curiousity to find out things like: Most & least profitable genres, Change of average rating throw a movie sequel & more.
*: The tabluau dashboard is made long ago on smaller & older data
** : the kaggle dataset is mine for more look here
If you just want to explore the project the [quick links] would cut it, but if you want to replicate
what I did in the project continue reading this section.
If any of the reproducing steps didn't work for you post an issue describing what went wrong & I
should fix it ASAP.
The mining & analysis was done using Python 3.12.11 So i would recommend using a
venv with the same Python version though it's
probably Ok to use other modern versions.
Firstly clone the repo git clone https://github.com/muabdalaleam/movies-analysis.git and move
into it cd movies-analysis then create a new venv by running python3 -m venv venv then
activate it (depends or your OS) after you activated the venv install the dependicies using
pip -r install requirements.txt and that's it.
You can either download my movies dataset from Kaggle or mine it yourself again (might take a
long time) by following the steps below.
After you have done the setup, you can now run the TMDB data miner but first you should have a
TMDB API key and create an enviroment file
in the root of the project touch ./.env then write the following in it:
TMBD_API_KEY="<YOUR_TMDB_API_KEY>"
now create the directory where the movies data will be stored mkdir ./data now activate your
venv & Finally run mining scriptpython3 ./scripts/mining.py now you should have a new
file in the ./data named movies_raw.json
After you have an active venv and ./data/movies_raw.json we are now ready to get the cleaned
data that can be used in the analysis you simply have to run
python3 ./scripts/formatting.py
python3 ./scripts/cleaning.py
Now you should have ./data/movies.csv & ./data/movies_clean.csv.
Feel free to modify or rerun the report notebook ./notebooks/report.ipynb just be sure you have
./data/movies_clean.csv and a working venv.
Here is a summary of the cool findings in this project for more look at the Report notebook.
-
Profitable genres:
History, Science Fiction & Western movies can be really expensive to produce
which highers thier "budget to revenue", Where Horror & Music movies are
relativly cheaper & able to produce a large revenue. -
Pobular movies era:
Around 2015 was when most voted movies -on TMDB- were released but fill
drastically after that. -
Genres quality trends:
There was a significant drop in rating across every genre around 1985 that
continued till around 2015 where it was starting to get better again. -
Sequel rating change:
Film sequels tend to diverge to worse & most of them diverged after 4 sequels
to rating of about ~6.5
