library(ggplot2)
In this data analysis, I will focusing to three big names in console game industry. They are Nintendo, Sony, and Microsoft. I will try to visualize who exactly win the Console Wars during 20 years timeline between 1996-2016
ign <- read.csv("data_input/ign.csv", stringsAsFactors = FALSE)
#str(ign)
ign[, c("score_phrase", "platform", "genre", "editors_choice")] <- lapply(ign[, c("score_phrase", "platform", "genre", "editors_choice")] , as.factor)
ign20 <- ign[ign$release_year >= 1996 & ign$release_year <= 2016, ]
## save memory by removing unused data frame
rm(ign)
I define new variables for only 3 big console game vendor: Nintendo, Sony, and Microsoft
nintendo <- 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")
sony <- c("PlayStation","PlayStation 2","PlayStation 3","PlayStation 4" ,"PlayStation Portable","PlayStation Vita")
microsoft <- c("Xbox","Xbox 360","Xbox One")
# Function to create new console platform
consolePlatform <- function(x) {
if (x %in% nintendo == TRUE){
return("Nintendo")
}
else if(x %in% sony == TRUE){
return("Sony")
}
else if(x %in% microsoft == TRUE){
return("Microsoft")
}
else{
return("Others")
}
}
ign20$consolePlatform <- sapply(ign20$platform, consolePlatform)
table(ign20$consolePlatform)
##
## Microsoft Nintendo Others Sony
## 2659 4907 5999 5059
Sony won total released game on their platform with total 5059 Nintendo in 2nd position with 4907 total games and Microsoft in 3rd position with 2659 total games
ggplot(ign20[ign20$consolePlatform=="Nintendo",],aes(x=factor(release_year))) +
geom_bar(aes(fill=platform)) +
theme(axis.text.x = element_text(angle=90, hjust=1)) +
labs(title = "Total game were released every year in Nintendo console", x = "Release Year", y = "Total Game")
summary(ign20[ign20$consolePlatform=="Nintendo",])
## X score_phrase title url
## Min. : 33 Good :1165 Length:4907 Length:4907
## 1st Qu.: 4802 Great :1037 Class :character Class :character
## Median : 9777 Okay : 815 Mode :character Mode :character
## Mean : 9193 Mediocre: 661
## 3rd Qu.:13066 Bad : 463
## Max. :18620 Amazing : 337
## (Other) : 429
## platform score genre editors_choice
## Wii :1366 Min. : 0.800 Action :1094 N:4234
## Nintendo DS :1045 1st Qu.: 5.300 Sports : 485 Y: 673
## Game Boy Advance: 623 Median : 7.000 Platformer: 348
## GameCube : 509 Mean : 6.548 Adventure : 299
## Game Boy Color : 356 3rd Qu.: 8.000 Racing : 296
## Nintendo 64 : 302 Max. :10.000 Puzzle : 259
## (Other) : 706 (Other) :2126
## release_year release_month release_day consolePlatform
## Min. :1996 Min. : 1.000 Min. : 1.00 Length:4907
## 1st Qu.:2003 1st Qu.: 4.000 1st Qu.: 8.00 Class :character
## Median :2007 Median : 8.000 Median :15.00 Mode :character
## Mean :2006 Mean : 7.251 Mean :15.35
## 3rd Qu.:2009 3rd Qu.:11.000 3rd Qu.:22.50
## Max. :2016 Max. :12.000 Max. :31.00
##
Nintendo was the most senior game company compare to Sony and Microsoft. Nintendo has the worst year during 1996-1998, because Sony almost take down all the console game marketshare with their premiere platform. With the release of Wii, Nintendo is rising again with their most innovative game console Unfortunately, the Wii successor, Wii U, didn’t work well as its predecessor, and make Nintendo has the worst year again during 2014-2016.
ggplot(ign20[ign20$consolePlatform=="Sony",],aes(x=factor(release_year))) +
geom_bar(aes(fill=platform)) +
theme(axis.text.x = element_text(angle=90, hjust=1)) +
labs(title = "Total game were released every year in Sony console", x = "Release Year", y = "Total Game")
summary(ign20[ign20$consolePlatform=="Sony",])
## X score_phrase title url
## Min. : 0 Good :1276 Length:5059 Length:5059
## 1st Qu.: 3656 Great :1241 Class :character Class :character
## Median : 8481 Okay : 808 Mode :character Mode :character
## Mean : 8850 Amazing : 532
## 3rd Qu.:13940 Mediocre: 520
## Max. :18622 Bad : 363
## (Other) : 319
## platform score genre
## PlayStation 2 :1686 Min. : 1.000 Action :1030
## PlayStation 3 :1356 1st Qu.: 6.000 Sports : 702
## PlayStation : 952 Median : 7.300 Racing : 414
## PlayStation Portable: 633 Mean : 6.945 Shooter : 405
## PlayStation 4 : 277 3rd Qu.: 8.200 RPG : 286
## PlayStation Vita : 155 Max. :10.000 Adventure: 268
## (Other) : 0 (Other) :1954
## editors_choice release_year release_month release_day
## N:4105 Min. :1996 Min. : 1.000 Min. : 1.00
## Y: 954 1st Qu.:2002 1st Qu.: 4.000 1st Qu.: 8.00
## Median :2007 Median : 8.000 Median :16.00
## Mean :2006 Mean : 7.287 Mean :15.86
## 3rd Qu.:2010 3rd Qu.:10.000 3rd Qu.:23.00
## Max. :2016 Max. :12.000 Max. :31.00
##
## consolePlatform
## Length:5059
## Class :character
## Mode :character
##
##
##
##
Sony has been active in console game industry since 1996 with the release of phenomenal PlayStation 1. Until 2016, PlaySation 2 still the most popular console game for game release.
ggplot(ign20[ign20$consolePlatform=="Microsoft",],aes(x=factor(release_year))) +
geom_bar(aes(fill=platform)) +
theme(axis.text.x = element_text(angle=90, hjust=1)) +
labs(title = "Total game were released every year in Microsoft console", x = "Release Year", y = "Total Game")
summary(ign20[ign20$consolePlatform=="Microsoft",])
## X score_phrase title url
## Min. : 3 Great :772 Length:2659 Length:2659
## 1st Qu.: 6804 Good :604 Class :character Class :character
## Median :11283 Okay :413 Mode :character Mode :character
## Mean :10998 Amazing :323
## 3rd Qu.:15418 Mediocre:253
## Max. :18623 Bad :169
## (Other) :125
## platform score genre editors_choice
## Xbox 360 :1630 Min. : 1.000 Action :556 N:2038
## Xbox : 821 1st Qu.: 6.200 Shooter :380 Y: 621
## Xbox One : 208 Median : 7.500 Sports :331
## Android : 0 Mean : 7.179 Racing :177
## Arcade : 0 3rd Qu.: 8.500 Action, Adventure:157
## Atari 2600: 0 Max. :10.000 Adventure :117
## (Other) : 0 (Other) :941
## release_year release_month release_day consolePlatform
## Min. :2001 Min. : 1.000 Min. : 1.00 Length:2659
## 1st Qu.:2005 1st Qu.: 4.000 1st Qu.: 8.00 Class :character
## Median :2008 Median : 8.000 Median :16.00 Mode :character
## Mean :2008 Mean : 7.218 Mean :15.75
## 3rd Qu.:2011 3rd Qu.:10.000 3rd Qu.:23.00
## Max. :2016 Max. :12.000 Max. :31.00
##
We can see that Microsoft doesn’t have any game released before 2001, that was because the first Microsoft game console, Xbox, was release on 2001. That means Bill Gates own-company doesn’t compete with Nintendo and Sony before that time.
Xbox 360 was the most popular Microsoft game platform
What is the most popular console during 1996-2016
ggplot(ign20[ign20$consolePlatform != "Others",],aes(x=factor(release_year))) +
geom_bar(aes(fill=consolePlatform)) +
theme(axis.text.x = element_text(angle=90, hjust=1)) +
labs(title = "Total game were released every year", x = "Release Year", y = "Total Game")
Sony wins the 20-years Console Wars based on their consistency in game release every year, with more than 5000 game title released on their platform from 1996-2016.
geom_bar() + theme() + labs()