<jupyter_start><jupyter_text>Research questions    1. Is there a significant difference in the average number of units sold for different genres of games in NA in the 2000's and 2010's?    2. Is there a significant difference in the average number of units sold by genre in the 2000's than in 2010?<jupyter_code>vg_sales.info()
vg_sales.head()
vg_sales = vg_sales.dropna()
eighties = list(range(1980, 1990))
nineties = list(range(1990, 2000))
oughts = list(range(2000, 2010))
tens = list(range(2010, 2020))
twenties = list(range(2020, 2030))

vg_sales["decade"] = "80s"
vg_sales.loc[vg_sales["Year"].isin(nineties), "decade"] = "90s"
vg_sales.loc[vg_sales["Year"].isin(oughts), "decade"] = "00s"
vg_sales.loc[vg_sales["Year"].isin(tens), "decade"] = "10s"
vg_sales.loc[vg_sales["Year"].isin(twenties), "decade"] = "20s"
# we are going to analyze from 2000's onward, as this is when modern gaming markets matured
# also throw out 2020 as there is only 1 game
# see https://learn.stash.com/defining-moments-in-video-game-history-a-timeline

vg_sales = vg_sales[vg_sales["decade"] != "80s"]
vg_sales = vg_sales[vg_sales["decade"] != "20s"]
vg_sales = vg_sales[vg_sales["decade"] != "90s"]

vg_sales.decade.value_counts()
vg_sales.Genre.value_counts()
# separate based on genres.
sports = vg_sales[vg_sales["Genre"] == "Sports"]
action = vg_sales[vg_sales["Genre"] == "Action"]
misc = vg_sales[vg_sales["Genre"] == "Misc"]
rpg = vg_sales[vg_sales["Genre"] == "Role-Playing"]
adventure = vg_sales[vg_sales["Genre"] == "Adevnture"]
shooter = vg_sales[vg_sales["Genre"] == "Shooter"]
racing = vg_sales[vg_sales["Genre"] == "Racing"]
sim = vg_sales[vg_sales["Genre"] == "Simulation"]
platform = vg_sales[vg_sales["Genre"] == "Platform"]
fighting = vg_sales[vg_sales["Genre"] == "Fighting"]
startegy = vg_sales[vg_sales["Genre"] == "Strategy"]
puzzle = vg_sales[vg_sales["Genre"] == "Puzzle"]
sns.boxplot("Genre", "NA_Sales", data=sports)
plt.tight_layout()
plt.show()
# wii sports shipped with the wii console, and is not representative of games that sell normally.
# It shipped with the wii, and it is already clear how we can learn from it's success: accessibility.
# https://www.gamespot.com/articles/the-most-influential-games-of-the-21st-century-wii/1100-6466810/#:~:text=Like%20the%20Wii%2C%20it%20focused,the%20industry%20would%20approach%20accessibility.
# it also a outlier amongst outliers. I will be tossing it
sports = sports[sports["Name"] != "Wii Sports"]
sns.boxplot("Genre", "NA_Sales", data=sports)
plt.tight_layout()
plt.show()
# removal of wii sports cuts the skew dramtically
# |sports.head()
sports_mod = sports[sports["Rank"] != 4]
sports_mod = sports[sports["Rank"] != 14]
sports_mod = sports[sports["Name"] != "<NAME>"]
# sports_mod.hist(column="NA_Sales")
sports_mod.head()
vg_sales.groupby("Genre").hist(column="NA_Sales")
sns.boxplot("Genre", "NA_Sales", data=sports_mod)
plt.show()
qqplot(sports["NA_Sales"], line="s")
plt.show()
sns.lineplot("Year", "NA_Sales", hue="Genre", ci=100, data=vg_00_10)
# make line graphs for each sig pair from posthoc testing
* individual histograms for interesting pairs

** original and log to show real meaning and validity

* show some exploratory anlaysis

* next steps

** corr with marketing and sales?

** how do the bottom of the genres compare to each other?<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15586742311137652, 'fraction_numerical': 0.036727381307853094, 'mean_word_length': 6.511210762331839, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '380729', 'license': 'MIT', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1200, 'n_words': 298, 'path': 'eda_video_game_sales.ipynb', 'repo_name': 'DJGump/video_game_sales_analysis', 'size': '3355'}