Concept
I was going through Kaggle, looking at interesting datasets that I could use to visualize some data. I stumbled upon a dataset about “IMDB Top 250 Movies Dataset” and decided to give it a look. After looking through the dataset I became interested to how the budget the movie had initially gotten corelates to the Box-office revenue it received so I decided to make a graph using that data and present it using p5js.
The project might have a simple look, but I believe the data that it shows and the results are quite interesting.
Process
For the process I first looked at the dataset on my computer, trying to find interesting data that I could present visually. After finding the budget and the box office values I then loaded them into the p5js and first printed a few values just to see if the dataset works. Then came the process of actually pulling all the data and plotting it on the preview. This process was a bit tricky as I had to play around with the map function to understand it completely and make the graph look how it should. I am proud of the way I found mins and maxes and the way I mapped them.
// Getting the minimums and maximums, by pulling only the budget or only the boxOffice data let minBudget = min(movieData.map((m) => m.budget)); let maxBudget = max(movieData.map((m) => m.budget)); let minBoxOffice = min(movieData.map((m) => m.boxOffice)); let maxBoxOffice = max(movieData.map((m) => m.boxOffice)); //Maping and placing the data for (let movie of movieData) { let x = map(movie.budget, minBudget, maxBudget, 50, width - 50); let y = map(movie.boxOffice, minBoxOffice, maxBoxOffice, height - 50, 50); fill(0, 255, 0); ellipse(x, y, 5, 5); }
Reflection and Future improvements
For the future improvements I would maybe want to find a bigger dataset and try to plot more movies into the existing one and see what the difference it makes. Maybe I could also incorporate allowing user to tweak what other “filters” are present to see what maybe affects the budget to box office revenue difference in movies. Overall I found this project very interesting and challenging, but at the same time tons of fun!