The Data
The Data#

Review data for the title ‘Call of Duty: Modern Warfare 2’ published by Activision were collected.
At the time of access (2022-12-11), this title held a ‘Mixed’ review score based on 142,374 user reviews.
Reviews were scraped from the Steam store using the steamreviews
API for Python [Wok, 2018].
# api access
import steamreviews
# set parameters
request_params = dict()
request_params['language'] = 'english'
request_params['purchase_type'] = 'all'
app_id = 1938090
# store results as dictionary
review_dict, query_count = steamreviews.download_reviews_for_app_id(app_id,chosen_request_params=request_params)
All available English language reviews were scraped.
Review text is extracted and all observations without text are dropped. This forms an initial sample of 115,952 observations.
The resulting data frame is stored as a .csv for use in subsequent stages of the project.
import pandas as pd
review_id = [x for x in review_dict['reviews']]
review_text = [review_dict['reviews'][x]['review'] for x in review_id]
df = pd.DataFrame({'review_text':review_text})
# Keep reviews with >=1 word
df = df.drop(df[df['review_text'].str.split().str.len()<1].index)
df.to_csv('data/processed_review_data.csv',index=False)
df
review_text | |
---|---|
0 | ye is pretty good |
1 | The game hasn't crashed on me, don't know what... |
2 | Best Cod since BO2. Coming from a cod vet, the... |
3 | I liked the game because I'm a big COD fan eve... |
4 | Just hit lvl 55 in 18 hours\n\nIs it fun? Yes\... |
... | ... |
116350 | I've liked how COD makes sure to add some cont... |
116351 | i hate this game but i still play it because i... |
116352 | muy bien |
116353 | too many modes catering to the younger (below ... |
116354 | Pew pew game :) |
115952 rows × 1 columns