In this notebook I wiil look at how IGNās scores changed through time/platform/genre ## data file
df<-read.csv('/Users/jonathanbouchet/Desktop/WORK/PROJECT/gaming/IGN/ign.csv',sep=',')
#fix one entry having release_year = 1970
df[df$release_year<1980,]
## X score_phrase title
## 517 516 Great The Walking Dead: The Game -- Episode 1: A New Day
## url platform
## 517 /games/the-walking-dead-season-1-episode-1/xbox-360-135866 Xbox 360
## score genre editors_choice release_year release_month release_day
## 517 8.5 Adventure N 1970 1 1
df[df$release_year<1980,'release_year']<-2012
df[df$release_year<1980,'release_month']<-4
df[df$release_year<1980,'release_day']<-27
library(ggplot2)
library(gridExtra)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following object is masked from 'package:gridExtra':
##
## combine
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(circlize)
#platform
sony<-c('PlayStation','PlayStation 2','PlayStation 3','PlayStation 4' ,'PlayStation Portable','PlayStation Vita')
micro<-c('Xbox','Xbox 360','Xbox One')
bigN<-c('Game Boy','Game Boy Advance','Game Boy Color' ,'GameCube', 'NES', 'New Nintendo 3DS' ,'Nintendo 3DS','Nintendo 64', 'Nintendo 64DD','Nintendo DS', 'Nintendo DSi','Super NES','Wii','Wii U')
sega<-c('Dreamcast','Dreamcast VMU','Genesis', 'Master System','Saturn' ,'Sega 32X','Sega CD')
bandai<-c('WonderSwan','WonderSwan Color')
nokia<-c('N-Gage')
neogeo<-c('NeoGeo','NeoGeo Pocket Color')
nec<-c('TurboGrafx-16','TurboGrafx-CD')
atari<-c('Atari 5200','Atari 2600','Lynx')
apple<-c('iPad','iPhone','iPod','Macintosh')
win<-c('Pocket PC','PC','Windows Phone','Windows Surface')
and<-c('Android','Ouya')
lin<-c('SteamOS','linux')
#genre
action<-c('Action','Action, Adventure','Action, Compilation','Action, Platformer','Action, Puzzle','Action, RPG','Action, Simulation','Action, Editor','Action, Strategy')
adventure<-c('Adventure','Adventure, Adventure','Adventure, Compilation','Adventure, Episodic','Adventure, Platformer','Adventure, RPG','Adventure, Adult')
sport<-c('Baseball','Sports','Sports, Action','Sports, Baseball','Sports, Compilation','Sports, Racing','Sports, Simulation','Sports, Editor','Sports, Fighting','Sports, Golf','Sports, Other','Sports, Party')
fighting<-c('Fighting','Fighting, Action','Fighting, Adventure','Fighting, Compilation','Fighting, RPG','Fighting, Simulation')
platform<-c('Platformer','Platformer, Action','Platformer, Adventure')
racing<-c('Racing','Racing, Action','Racing, Shooter','Racing, Simulation','Racing, Editor','Racing, Compilation')
rpg<-c('RPG','RPG, Editor','RPG, Simulation','RPG, Action','RPG, Compilation')
sim<-c('Simulation','Simulation, Adventure')
music<-c('Music','Music, Action','Music, Compilation','Music, Editor','Music, Adventure','Music, RPG')
puzzle<-c('Puzzle','Puzzle, Action','Puzzle, Compilation','Puzzle, Adventure','Puzzle, Platformer','Puzzle, RPG','Puzzle, Word Game','Puzzle, Compilation')
strategy<-c('Strategy','Strategy, RPG','Strategy, Compilation','Strategy, Simulation')
edu<-c('Educational','Educational, Action','Educational, Puzzle','Educational, Trivia','Educational, Adventure','Educational, Card','Educational, Productivity','Educational, Simulation')
flight<-c('Flight','Flight, Action','Flight, Racing','Flight, Simulation')
shooter<-c('Shooter','Shooter, Platformer','Shooter, RPG','Shooter, Adventure','Shooter, First-Person')
party<-c('Party')
card<-c('Card','Card, Battle','Card, Compilation','Card, RPG')
pinball<-c('Pinball','Pinball, Compilation')
compil<-c('Compilation','Compilation, RPG')
hunting<-c('Hunting','Hunting, Action','Hunting, Simulation')
wrestling<-c('Wrestling','Wrestling, Simulation')
prod<-c('Productivity','Productivity, Action')
I create new columns for these 2 new features
newManufacturer<-function(x){
if (x %in% sony == TRUE) {return('SONY')}
else if(x %in% micro == TRUE) {return('MICROSOFT')}
else if(x %in% bigN == TRUE) {return('NINTENDO')}
else if(x %in% sega == TRUE) {return('SEGA')}
else if(x %in% bandai == TRUE) {return('BANDAI')}
else if(x %in% nokia == TRUE) {return('NOKIA')}
else if(x %in% neogeo == TRUE) {return('NEOGEO')}
else if(x %in% nec == TRUE) {return('NEC')}
else if(x %in% atari == TRUE) {return('ATARI')}
else if(x %in% apple == TRUE) {return('APPLE')}
else if(x %in% win == TRUE) {return('WINDOWS')}
else if(x %in% and == TRUE) {return('ANDROID')}
else if(x %in% lin == TRUE) {return('LINUX')}
else{return('OTHER')}
}
genreBetter<-function(x){
if(x %in% action == TRUE) {return('ACTION')}
else if(x %in% adventure == TRUE) {return('ADVENTURE')}
else if(x %in% sport == TRUE) {return('SPORTS')}
else if(x %in% fighting == TRUE) {return('FIGHTING')}
else if(x %in% platform == TRUE) {return('PLATFORM')}
else if(x %in% racing == TRUE) {return('RACING')}
else if(x %in% rpg == TRUE) {return('RPG')}
else if(x %in% sim == TRUE) {return('SIMULATION')}
else if(x %in% music == TRUE) {return('MUSICAL')}
else if(x %in% puzzle == TRUE) {return('PUZZLE')}
else if(x %in% strategy == TRUE) {return('STRATEGY')}
else if(x %in% edu == TRUE) {return('EDUCATIONAL')}
else if(x %in% flight == TRUE) {return('FLIGHT')}
else if(x %in% shooter == TRUE) {return('SHOOTER')}
else if(x %in% party == TRUE) {return('PARTY')}
else if(x %in% card == TRUE) {return('CARD')}
else if(x %in% pinball == TRUE) {return('PINBALL')}
else if(x %in% compil == TRUE) {return('COMPIL')}
else if(x %in% prod == TRUE) {return('PRODUCTIVITY')}
else if(x %in% wrestling == TRUE) {return('WRESTLING')}
else if(x %in% hunting == TRUE) {return('HUNTING')}
else{return('OTHER')}
}
df$newGenre<-sapply(df$genre, genreBetter)
df$newPlatform<-sapply(df$platform, newManufacturer)
a alphanumeric notation :
sort(unique(df$score_phrase))
## [1] Amazing Awful Bad Disaster Good
## [6] Great Masterpiece Mediocre Okay Painful
## [11] Unbearable
## 11 Levels: Amazing Awful Bad Disaster Good Great Masterpiece ... Unbearable
scoreNoteVsPhrase<-ggplot(data=df,aes((score))) + geom_histogram(aes(fill=factor(score_phrase)),bins=83) + xlab('score') + theme(legend.position=c(.2, .6))+ theme(legend.title=element_blank())
scoreNoteVsChoice<-ggplot(data=df,aes((score))) + geom_histogram(aes(fill=factor(editors_choice)),bins=83) + xlab('score') + theme(legend.position=c(.2, .7)) + theme(legend.title=element_blank())
score_phraseVsChoice<-ggplot(data=df,aes((score_phrase))) + geom_bar(aes(fill=factor(editors_choice))) + theme(legend.position=c(.2, .85)) + xlab('score -word-') + theme(legend.title=element_blank())
print(scoreNoteVsPhrase)
print(scoreNoteVsChoice)
print(score_phraseVsChoice)
#grid.arrange(scoreNoteVsPhrase,scoreNoteVsChoice,score_phraseVsChoice,ncol=3)
Did IGN change its notation through the years or are there platforms and/or genres that got better scores ?
short answer : not really
ggplot(data=subset(df,newPlatform %in% c('SONY','MICROSOFT','NINTENDO')),aes(x=factor(release_year),y=score)) + geom_boxplot(aes(fill=(newPlatform))) + theme(legend.position=c(.1, .2)) + xlab('Year') + ylab('score')+ theme(legend.title=element_blank())
It looks like Microsoftās consoles get better score than Sonyās or Nintendoās, but not true for the last ~ 4-5 years. It looks also there is a wave pattern with a dip around year 2008 (2008 is also know as the golden year, whch saw the highrer number of titles, all consoles)
To select the best genres through all platforms :
sort(table(df[,c('newGenre')]),decreasing=TRUE)
##
## ACTION SPORTS SHOOTER RACING ADVENTURE
## 5019 2184 1640 1470 1200
## STRATEGY PUZZLE RPG PLATFORM FIGHTING
## 1150 1040 995 842 647
## SIMULATION OTHER MUSICAL FLIGHT CARD
## 568 450 422 189 174
## PARTY WRESTLING HUNTING PINBALL EDUCATIONAL
## 141 135 115 78 69
## COMPIL PRODUCTIVITY
## 56 41
ggplot(data=subset(df,newGenre %in% c('ACTION','SPORTS','SHOOTER','RACING')),aes(x=factor(release_year),y=score)) + geom_boxplot(aes(fill=(newGenre))) + theme(legend.position=c(.1, .2)) + xlab('Year') + ylab('score')+ theme(legend.title=element_blank())
There is a small dependence all the genreās score vs time : prior 1998-1999, scores were much lower than what they are now.
Comments