- Ezra Hsieh
- Tara Parker
Box Office Analysis Dashboard (BOAD) allows users to visualize trends at the box office through an interactive dashboard. BOD is a Python-based web interface to obtain, analyze, and visualize box office data from Box Office Mojo by IMDB. BOAD allows users to explore the latest and historical box office data and visuazlize temporal trends. BOAD displays timeseries via bar charts for weekly gross box office gross. Futhermore, BOAD allows users explore and compare detailed information about annual top movies by displaying pie charts of the top movies for each year for the domestic and worldwide box office. By combining data collection, storage, and visualization techniques, BOAD aims to streamline the process of accessing and understanding box office trends.
Box Office Analysis displays data with a web interface, created with Flask. Our interface presents a weekly gross revenue timeseries as a bar chart, as well as a pie chart to compare the annual top 8 domestic and worldwide movies. User can navigate the years and update data with widgets.
- Home screen with timeseries bar chart of gross revenue by week.
- Two pie charts of top 8 movies (domestic and worldwide), by annual gross, for the queried year.
- A drop-down menu to change the year of data shown on window 1.
- A go button to reload/update the data shown on window 1.
- A next button to show the next year and a previous button to show the bar chart for the previous year.
- An entry widget (at the bottom of window 1) to open window 2 that displays pie charts for the entered year.
- An entry widget to display pie charts for a given year.
- A next button to show the next year and a previous button to show the previous year pie charts.
- A home button that returns the user to Window 1
Application uses Requests and Beautiful soup to gather data from Box Office Mojo Domestic Box Office Weeklies.
Scraped data from Box Office Mojo is stored using Pandas dataframes and CSV files. The scraped data is first put into a Pandas dataframe and cleaned. The domestic weekly data is stored in CSV files for the bar charts and top 8 movie data is passed directly to the plotting function to create PNG files. Bar and pie charts are stored locally as png files.
Example of data from Box Office Mojo.
Rank (This week) | LW | Release | Gross | %± LW | Theaters | Change | Average | Total Gross | Weeks | Distributor |
---|---|---|---|---|---|---|---|---|---|---|
2 | 1 | The Exorcist: Believer | $14,675,000 | -56.7% | 3,684 | +21 | $3,983 | $48,601,950 | 2 | Universal Pictures |
Box Office Analysis utilizes matplotlib to create bar and pie charts for depicting the trends in weekly domestic box office gross over time and comparing annual domestic and worldwide top movies. Window 1 visualizes weekly gross trends of weekly box office data with bar chart timeseries. Window 2 uses side-by-side pie charts to vizualize and compare the domestic and worldwide top 8 movies for a given year.
For Mac based OS:
export FLASK_APP=box_office_analysis.py
export FLASK_ENV=development
flask run
For Windows and alternatively:
python box_office_analysis.py
Application is pre-loaded with 2021, 2022, and 2023. Please use the "Update Data" button on the homepage to aquire the rest of the data as CSV files. This feature also updates existing files.