Abhiram Diddigi home

Those movies I dig..

I’ve been curious the ‘type’ of movies I collect, hence over the weekend I was doing some analysis. Here is the output graph(Considering the genres of around 350+ movies).

I’ve used Python to read filenames, process them, strip the name into a meaningful one, send a request to IMDB or IMDBAPI, collect the data in a Output.JSON file, then use Node.js to filter into manageable JSON and using Morris.js draw them. BTW, Thriller takes the first place.

Observations and Challenges:

Steps Involved:

  * Prune them, as per a common format:

God,that was easy. When you run these scripts, your output.JSON will nicely get populated with the JSON information of your Movies.

Lastly, making using of Node.js to organize the output.JSON based on genres(Could have used Python as well)

the arr in the above script will nicely give you the count of each genre of all the movies you have,something like this.

 [ { label: 'Action', value: 132 },
 { label: 'Comedy', value: 66 },
 { label: 'Adventure', value: 71 },
 { label: 'Sci-Fi', value: 53 },
 { label: 'Biography', value: 18 },
 { label: 'Drama', value: 174 },
 { label: 'History', value: 15 },
 { label: 'Romance', value: 41 },
 { label: 'Crime', value: 128 },
 { label: 'Mystery', value: 71 },
 { label: 'Thriller', value: 185 },
 { label: 'War', value: 21 },
 { label: 'Fantasy', value: 50 },
 { label: 'Horror', value: 30 },
 { label: 'Sport', value: 11 },
 { label: 'Family', value: 16 },
 { label: 'Western', value: 10 },
 { label: 'Animation', value: 11 },
 { label: 'Film-Noir', value: 1 },
 { label: 'Documentary', value: 2 },
 { label: 'Short', value: 3 },
 { label: 'Musical', value: 1 } ]

Once you have those results with you, use morris.js to draw a Donut as above.

I was never surprised, I never knew I watch Drama that much!