Technical Report
Executive Summary
The purpose of this project was to see what factors relate to a video games sales. We looked at a variety of factors including the consoles the video games were offered on, steam data base info on the player base size, and the year that the game was made. We found that the three most important factors for determining Global Sales are the platform the game was on (being on XBox 360 Was really important), the last thirty day player average and the all time peak number of players on that game.
Project Context
Really the big motivation behind this analysis was to see what criteria really lead to a successful game. We measured our success on our ability to predict and better understand the relationship between variables like the games genre, year, platforms and player base size effect the number of copies a game sells.
Data Sources
We merge two data sets together in order to get the final data set. The first data set is a csv file that contains thousands of games and their platforms and their sales. This data set can be found here. The second data set used a web scraper to scrape player base information off of the steam data base and can be found in this repository.
Methodology
- Data acquisition: Luckily the video game sales data was already in the form of a csv, but getting the steam player base data was a little more complicated. In steam each game is referred to by a game id, not their actual name, so in order to get information on as many games as possible we made a call to the steam API and got 50,000 different game ids. Of those 50,000 game ids we merged that with our original game sales data and only kept games that we had an game id for. Then for each game with a game id we pulled the information for the respective game off of steamcharts.com and scraped the data off of there to get the player base size and the average number of players on the game within the last 30 days.
- Cleaning pipeline: Once the data was pulled each game was in the data set multiple times because it was in the data set once for each console it was released on. So for our analysis we just aggregated the games so each game was only in the data set once and summed their total sales across consoles. Then we encoded the consoles that a specific game was on with just binary indicators. This allowed us to see the effect that different consoles have on a games sales.
- Analysis workflow: We used a Random Forest model to train and fit the data, allowing us to make predictions about new games and see which features are most important in modeling a games sales.
- Tooling: We used a variety of different packages for each step of the process below is a list of the step and which packages were used for that step: Data Acquisition & Webscraping:
- Pandas (for Data Frame Manipulation)
- Numpy (for math)
- Requests (to access the web)
- BeautifulSoup (for HTML parsing)
- TQDM (for progress bar on webscraping) Cleaning and Analysis:
- Pandas (for Data Frame manipulation)
- Numpy (for math)
- Seaborn (for charts)
- Matplotlib (for charts)
- Scikitlearn (for the binary console indicators) Modeling:
- Scikitlearn (for the model, scaler, splitting into train and test, and model evaluation metrics)
Results & Diagnostics
Best Hyperparameters:
max_depth: 10 min_samples_leaf: 1 min_samples_split: 5 n_estimators: 200
Performance Metrics:
R² (Test Set): 0.6604 RMSE (log scale): 0.1269
Feature Importance (Top 10):
Rank – 0.2906 Platform_X360 – 0.1819 last_30_day_avg – 0.1439 all_time_peak – 0.0575 Platform_PS3 – 0.0537 Platform_SAT – 0.0359 Platform_PS2 – 0.0356 Year – 0.0319 Platform_PC – 0.0297 Platform_GC – 0.0287
Interpretation:
After training and tuning the model it found that rank was the most important followed by the game being on the Xbox 360, then last 30 day average and finally all time peak players. It makes sense that the model relied heavily on the rank because the data set did rank the games on number of sales, but furthermore it seams that what really matters in the platform (specifically being on Xbox 360) and then the player base size.
Discussion & Next Steps
Because of the limited data we were able to collect on game specifics(game price, length, mechanics, etc…) we are unable to make concrete inference on what makes a video game successful. Further data collection and research is necessary to make specific recommendations for video game design. That research could include things like budget spent on the game, years in development, and an indicator if the game is a part of a series (as opposed to a stand alone game). Regardless our analysis still offers some insights, suggesting that player count is a good indicator of a games financial success.