The Market Basket Analysis is a data mining technique used to uncover some of the associations between items frequently in time which is purchased together. It is widely applied in retail and e-commerce, but it is a potential in digital game sales remains underexplored. This article will show, the applies Association Rule Mining to identify trends in video game purchases with providing insights into some customer behavior, game bundling strategies and adviced systems.
The dataset for this article consists of video game purchase transactions from an online gaming platform which is known very famous vgchartz.com.
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.4.2
library(arules)
## Warning: package 'arules' was built under R version 4.4.3
## Loading required package: Matrix
##
## Attaching package: 'arules'
## The following objects are masked from 'package:base':
##
## abbreviate, write
library(arulesViz)
## Warning: package 'arulesViz' was built under R version 4.4.3
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.4.2
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:arules':
##
## intersect, recode, setdiff, setequal, union
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
data <- read.csv("vgsales.csv", header = TRUE, stringsAsFactors = FALSE, na.strings = c("", "NA"))
Summary of data
summary(data)
## Rank Name Platform Year
## Min. : 1 Length:16598 Length:16598 Length:16598
## 1st Qu.: 4151 Class :character Class :character Class :character
## Median : 8300 Mode :character Mode :character Mode :character
## Mean : 8301
## 3rd Qu.:12450
## Max. :16600
## Genre Publisher NA_Sales EU_Sales
## Length:16598 Length:16598 Min. : 0.0000 Min. : 0.0000
## Class :character Class :character 1st Qu.: 0.0000 1st Qu.: 0.0000
## Mode :character Mode :character Median : 0.0800 Median : 0.0200
## Mean : 0.2647 Mean : 0.1467
## 3rd Qu.: 0.2400 3rd Qu.: 0.1100
## Max. :41.4900 Max. :29.0200
## JP_Sales Other_Sales Global_Sales
## Min. : 0.00000 Min. : 0.00000 Min. : 0.0100
## 1st Qu.: 0.00000 1st Qu.: 0.00000 1st Qu.: 0.0600
## Median : 0.00000 Median : 0.01000 Median : 0.1700
## Mean : 0.07778 Mean : 0.04806 Mean : 0.5374
## 3rd Qu.: 0.04000 3rd Qu.: 0.04000 3rd Qu.: 0.4700
## Max. :10.22000 Max. :10.57000 Max. :82.7400
Distribution of the game genres
ggplot(data, aes(x = Genre))+geom_bar(fill= "red")+ theme_minimal()+ggtitle("Distribution")
First of all we will prepare our data for analysis:
1- Removing the missing values. 2- Filtering the popular games 3-Converting categorical variables.
colnames(data)
## [1] "Rank" "Name" "Platform" "Year" "Genre"
## [6] "Publisher" "NA_Sales" "EU_Sales" "JP_Sales" "Other_Sales"
## [11] "Global_Sales"
summary(data)
## Rank Name Platform Year
## Min. : 1 Length:16598 Length:16598 Length:16598
## 1st Qu.: 4151 Class :character Class :character Class :character
## Median : 8300 Mode :character Mode :character Mode :character
## Mean : 8301
## 3rd Qu.:12450
## Max. :16600
## Genre Publisher NA_Sales EU_Sales
## Length:16598 Length:16598 Min. : 0.0000 Min. : 0.0000
## Class :character Class :character 1st Qu.: 0.0000 1st Qu.: 0.0000
## Mode :character Mode :character Median : 0.0800 Median : 0.0200
## Mean : 0.2647 Mean : 0.1467
## 3rd Qu.: 0.2400 3rd Qu.: 0.1100
## Max. :41.4900 Max. :29.0200
## JP_Sales Other_Sales Global_Sales
## Min. : 0.00000 Min. : 0.00000 Min. : 0.0100
## 1st Qu.: 0.00000 1st Qu.: 0.00000 1st Qu.: 0.0600
## Median : 0.00000 Median : 0.01000 Median : 0.1700
## Mean : 0.07778 Mean : 0.04806 Mean : 0.5374
## 3rd Qu.: 0.04000 3rd Qu.: 0.04000 3rd Qu.: 0.4700
## Max. :10.22000 Max. :10.57000 Max. :82.7400
str(data)
## 'data.frame': 16598 obs. of 11 variables:
## $ Rank : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Name : chr "Wii Sports" "Super Mario Bros." "Mario Kart Wii" "Wii Sports Resort" ...
## $ Platform : chr "Wii" "NES" "Wii" "Wii" ...
## $ Year : chr "2006" "1985" "2008" "2009" ...
## $ Genre : chr "Sports" "Platform" "Racing" "Sports" ...
## $ Publisher : chr "Nintendo" "Nintendo" "Nintendo" "Nintendo" ...
## $ NA_Sales : num 41.5 29.1 15.8 15.8 11.3 ...
## $ EU_Sales : num 29.02 3.58 12.88 11.01 8.89 ...
## $ JP_Sales : num 3.77 6.81 3.79 3.28 10.22 ...
## $ Other_Sales : num 8.46 0.77 3.31 2.96 1 0.58 2.9 2.85 2.26 0.47 ...
## $ Global_Sales: num 82.7 40.2 35.8 33 31.4 ...
head(data, 10)
## Rank Name Platform Year Genre Publisher NA_Sales
## 1 1 Wii Sports Wii 2006 Sports Nintendo 41.49
## 2 2 Super Mario Bros. NES 1985 Platform Nintendo 29.08
## 3 3 Mario Kart Wii Wii 2008 Racing Nintendo 15.85
## 4 4 Wii Sports Resort Wii 2009 Sports Nintendo 15.75
## 5 5 Pokemon Red/Pokemon Blue GB 1996 Role-Playing Nintendo 11.27
## 6 6 Tetris GB 1989 Puzzle Nintendo 23.20
## 7 7 New Super Mario Bros. DS 2006 Platform Nintendo 11.38
## 8 8 Wii Play Wii 2006 Misc Nintendo 14.03
## 9 9 New Super Mario Bros. Wii Wii 2009 Platform Nintendo 14.59
## 10 10 Duck Hunt NES 1984 Shooter Nintendo 26.93
## EU_Sales JP_Sales Other_Sales Global_Sales
## 1 29.02 3.77 8.46 82.74
## 2 3.58 6.81 0.77 40.24
## 3 12.88 3.79 3.31 35.82
## 4 11.01 3.28 2.96 33.00
## 5 8.89 10.22 1.00 31.37
## 6 2.26 4.22 0.58 30.26
## 7 9.23 6.50 2.90 30.01
## 8 9.20 2.93 2.85 29.02
## 9 7.06 4.70 2.26 28.62
## 10 0.63 0.28 0.47 28.31
game_counts <- table(data$Name)
filtered_data <- data[data$Name %in% names(game_counts[game_counts >= 5]), ]
filtered_data$Name <- as.character(filtered_data$Name)
filtered_data$Platform <- as.character(filtered_data$Platform)
filtered_data <- na.omit(filtered_data)
datatransactions <- as(split(filtered_data$Name, filtered_data$Platform),"transactions")
## Warning in asMethod(object): removing duplicated items in transactions
inspect(head(datatransactions, 10))
## items transactionID
## [1] {Adventure Time: Finn & Jake Investigations,
## Angry Birds Star Wars,
## Ben 10 Galactic Racing,
## Brunswick Pro Bowling,
## Captain America: Super Soldier,
## Cars 2,
## Disney Infinity,
## DreamWorks Super Star Kartz,
## F1 2011,
## FIFA 12,
## FIFA 14,
## FIFA 15,
## FIFA Soccer 13,
## Generator Rex: Agent of Providence,
## Green Lantern: Rise of the Manhunters,
## Happy Feet Two,
## How to Train Your Dragon 2,
## LEGO Batman 2: DC Super Heroes,
## Lego Batman 3: Beyond Gotham,
## LEGO Harry Potter: Years 5-7,
## LEGO Jurassic World,
## LEGO Marvel's Avengers,
## LEGO Marvel Super Heroes,
## LEGO Pirates of the Caribbean: The Video Game,
## LEGO Star Wars III: The Clone Wars,
## Lego Star Wars: The Force Awakens,
## LEGO The Hobbit,
## LEGO The Lord of the Rings,
## Marvel Super Hero Squad: The Infinity Gauntlet,
## Need for Speed: The Run,
## Pinball Hall of Fame: The Williams Collection,
## Pro Evolution Soccer 2012,
## Pro Evolution Soccer 2013,
## Pro Evolution Soccer 2014,
## Rayman Origins,
## Resident Evil: Revelations,
## Skylanders Giants,
## Skylanders SWAP Force,
## Skylanders: Spyro's Adventure,
## Skylanders: SuperChargers,
## Skylanders: Trap Team,
## Sonic & All-Stars Racing Transformed,
## Spider-Man: Edge of Time,
## Terraria,
## The Amazing Spider-Man (Console Version),
## The Amazing Spider-Man 2 (2014),
## The LEGO Movie Videogame,
## The Sims 3,
## Thor: God of Thunder,
## Turbo: Super Stunt Squad,
## Wipeout 2,
## WWE All Stars} 3DS
## [2] {007: Quantum of Solace,
## Avatar: The Game,
## Bakugan Battle Brawlers: Defenders of the Core,
## Bakugan: Battle Brawlers,
## Band Hero,
## Ben 10 Alien Force: Vilgax Attacks,
## Ben 10 Galactic Racing,
## Ben 10 Ultimate Alien: Cosmic Destruction,
## Bolt,
## Call of Duty: Black Ops,
## Call of Duty: World at War,
## Captain America: Super Soldier,
## Cars,
## Cars 2,
## Cars: Race-O-Rama,
## Cloudy With a Chance of Meatballs,
## Crash of the Titans,
## Crash: Mind Over Mutant,
## DiRT 2,
## DreamWorks Super Star Kartz,
## Fantastic Four: Rise of the Silver Surfer,
## FIFA Soccer 06,
## FIFA Soccer 07,
## FIFA Soccer 08,
## FIFA Soccer 09,
## FIFA Soccer 10,
## FIFA Soccer 11,
## FIFA Street 2,
## FIFA World Cup Germany 2006,
## G-Force,
## G.I. Joe: The Rise of Cobra,
## Generator Rex: Agent of Providence,
## Ghostbusters: The Video Game,
## Green Lantern: Rise of the Manhunters,
## Happy Feet Two,
## Harry Potter and the Deathly Hallows - Part 1,
## Harry Potter and the Deathly Hallows - Part 2,
## Harry Potter and the Goblet of Fire,
## Harry Potter and the Half-Blood Prince,
## Harry Potter and the Order of the Phoenix,
## Ice Age 2: The Meltdown,
## Ice Age: Dawn of the Dinosaurs,
## Iron Man,
## Iron Man 2,
## Jeopardy!,
## Juiced 2: Hot Import Nights,
## Kung Fu Panda,
## LEGO Batman 2: DC Super Heroes,
## LEGO Batman: The Videogame,
## LEGO Harry Potter: Years 1-4,
## LEGO Harry Potter: Years 5-7,
## LEGO Indiana Jones 2: The Adventure Continues,
## LEGO Indiana Jones: The Original Adventures,
## LEGO Marvel Super Heroes,
## LEGO Pirates of the Caribbean: The Video Game,
## LEGO Star Wars II: The Original Trilogy,
## LEGO Star Wars III: The Clone Wars,
## LEGO The Lord of the Rings,
## Madagascar,
## Madagascar: Escape 2 Africa,
## Madden NFL 06,
## Madden NFL 07,
## Madden NFL 08,
## Madden NFL 09,
## Madden NFL 2005,
## Major League Baseball 2K10,
## Major League Baseball 2K11,
## Major League Baseball 2K12,
## Marvel Nemesis: Rise of the Imperfects,
## Marvel Super Hero Squad: The Infinity Gauntlet,
## Marvel: Ultimate Alliance 2,
## Michael Jackson: The Experience,
## Mini Ninjas,
## Monopoly,
## Monster Jam,
## Monster Jam: Path of Destruction,
## Monsters vs. Aliens,
## MX vs. ATV Untamed,
## Myst,
## Need for Speed Underground 2,
## Need for Speed: Most Wanted,
## Need for Speed: ProStreet,
## Need For Speed: Undercover,
## Open Season,
## Over the Hedge,
## Pac-Man World 3,
## Peter Jackson's King Kong: The Official Game of the Movie,
## Pirates of the Caribbean: At World's End,
## Prince of Persia: The Forgotten Sands,
## Rapala Pro Bass Fishing 2010,
## Ratatouille,
## Scooby-Doo! Unmasked,
## SeaWorld Adventure Parks: Shamu's Deep Sea Adventure,
## Sega Superstars Tennis,
## Shaun White Snowboarding,
## Shrek SuperSlam,
## Shrek the Third,
## Spider-Man 2,
## Spider-Man 3,
## Spider-Man: Edge of Time,
## Spider-Man: Friend or Foe,
## Spider-Man: Web of Shadows,
## Star Wars The Clone Wars: Republic Heroes,
## Star Wars: The Force Unleashed,
## Star Wars: The Force Unleashed II,
## Surf's Up,
## The Amazing Spider-Man (Console Version),
## The BIGS 2,
## The Chronicles of Narnia: Prince Caspian,
## The Chronicles of Narnia: The Lion, The Witch and The Wardrobe,
## The Golden Compass,
## The Incredible Hulk,
## The Incredibles: Rise of the Underminer,
## The Legend of Spyro: Dawn of the Dragon,
## The Lord of the Rings: Aragorn's Quest,
## The Simpsons Game,
## The Sims 2,
## The Sims 2: Pets,
## The Sims 3,
## The Smurfs 2,
## Thor: God of Thunder,
## Thrillville: Off the Rails,
## Tiger Woods PGA Tour 08,
## Tom Clancy's EndWar,
## Tomb Raider: Legend,
## Tomb Raider: Underworld,
## Tony Hawk's Proving Ground,
## Toy Story 3: The Video Game,
## TRON: Evolution,
## Turbo: Super Stunt Squad,
## Ultimate Spider-Man,
## Up,
## Wall-E,
## Wheel of Fortune,
## Winning Eleven: Pro Evolution Soccer 2007,
## Wipeout 2,
## World Series of Poker 2008: Battle for the Bracelets,
## WWE SmackDown vs Raw 2008,
## WWE SmackDown vs. Raw 2009,
## WWE SmackDown vs. Raw 2010,
## X-Men: The Official Game,
## You Don't Know Jack} DS
## [3] {Harry Potter and the Sorcerer's Stone} GB
## [4] {Cars,
## FIFA Soccer 06,
## Harry Potter and the Chamber of Secrets,
## Harry Potter and the Goblet of Fire,
## Harry Potter and the Prisoner of Azkaban,
## Harry Potter and the Sorcerer's Stone,
## Ice Age 2: The Meltdown,
## LEGO Star Wars II: The Original Trilogy,
## LEGO Star Wars: The Video Game,
## Madagascar,
## Madden NFL 06,
## Madden NFL 07,
## Madden NFL 2002,
## Madden NFL 2005,
## MotoGP,
## Need for Speed Underground,
## Need for Speed Underground 2,
## Need for Speed: Most Wanted,
## Over the Hedge,
## Ratatouille,
## Scooby-Doo! Unmasked,
## SeaWorld Adventure Parks: Shamu's Deep Sea Adventure,
## Shrek SuperSlam,
## SimCity 2000,
## Spider-Man 2,
## Teenage Mutant Ninja Turtles,
## The Chronicles of Narnia: The Lion, The Witch and The Wardrobe,
## The Incredible Hulk,
## The Incredibles: Rise of the Underminer,
## The Sims 2,
## Tony Hawk's Pro Skater 3,
## Ultimate Spider-Man,
## X-Men: The Official Game} GBA
## [5] {Cars,
## FIFA Soccer 07,
## FIFA Street,
## FIFA Street 2,
## FIFA World Cup Germany 2006,
## Harry Potter and the Chamber of Secrets,
## Harry Potter and the Goblet of Fire,
## Harry Potter and the Prisoner of Azkaban,
## Harry Potter and the Sorcerer's Stone,
## Ice Age 2: The Meltdown,
## LEGO Star Wars II: The Original Trilogy,
## LEGO Star Wars: The Video Game,
## Madagascar,
## Madden NFL 06,
## Madden NFL 07,
## Madden NFL 08,
## Madden NFL 2002,
## Madden NFL 2005,
## Major League Baseball 2K6,
## Marvel Nemesis: Rise of the Imperfects,
## Need for Speed Carbon,
## Need for Speed Underground,
## Need for Speed Underground 2,
## Need for Speed: Most Wanted,
## Open Season,
## Over the Hedge,
## Pac-Man World 3,
## Peter Jackson's King Kong: The Official Game of the Movie,
## Pinball Hall of Fame: The Gottlieb Collection,
## Ratatouille,
## Scooby-Doo! Unmasked,
## SeaWorld Adventure Parks: Shamu's Deep Sea Adventure,
## Shrek SuperSlam,
## Spider-Man 2,
## Surf's Up,
## Teenage Mutant Ninja Turtles,
## The Chronicles of Narnia: The Lion, The Witch and The Wardrobe,
## The Incredibles: Rise of the Underminer,
## The Sims 2,
## The Sims 2: Pets,
## Tiger Woods PGA Tour 06,
## Tomb Raider: Legend,
## Tony Hawk's Pro Skater 3,
## Ultimate Spider-Man,
## X-Men: The Official Game} GC
## [6] {Mortal Kombat,
## NBA Jam} GEN
## [7] {Jeopardy!,
## Madden NFL 2002,
## Monopoly,
## Tony Hawk's Pro Skater 3,
## Wheel of Fortune} N64
## [8] {Teenage Mutant Ninja Turtles} NES
## [9] {007: Quantum of Solace,
## Alien: Isolation,
## Assassin's Creed IV: Black Flag,
## Avatar: The Game,
## Battlefield 4,
## Battlefield: Hardline,
## Blazing Angels: Squadrons of WWII,
## Call of Duty: Advanced Warfare,
## Call of Duty: Black Ops,
## Call of Duty: Black Ops 3,
## Call of Duty: Ghosts,
## Call of Duty: World at War,
## Dark Souls II,
## Darksiders II,
## Diablo III,
## DiRT 2,
## Dishonored,
## Dragon Age: Inquisition,
## F1 2011,
## Far Cry 4,
## Farming Simulator 2015,
## FIFA 12,
## FIFA 14,
## FIFA 15,
## FIFA 16,
## FIFA 17,
## FIFA Soccer 08,
## FIFA Soccer 09,
## FIFA Soccer 10,
## FIFA Soccer 11,
## FIFA Soccer 13,
## Grand Theft Auto V,
## Guitar Hero III: Legends of Rock,
## Guitar Hero: World Tour,
## Harry Potter and the Chamber of Secrets,
## Harry Potter and the Deathly Hallows - Part 1,
## Harry Potter and the Deathly Hallows - Part 2,
## Harry Potter and the Half-Blood Prince,
## Harry Potter and the Order of the Phoenix,
## Harry Potter and the Prisoner of Azkaban,
## Harry Potter and the Sorcerer's Stone,
## Ice Age: Dawn of the Dinosaurs,
## Juiced 2: Hot Import Nights,
## Kung Fu Panda,
## Lego Batman 3: Beyond Gotham,
## LEGO Batman: The Videogame,
## LEGO Harry Potter: Years 1-4,
## LEGO Harry Potter: Years 5-7,
## LEGO Indiana Jones 2: The Adventure Continues,
## LEGO Indiana Jones: The Original Adventures,
## LEGO Jurassic World,
## LEGO Marvel Super Heroes,
## LEGO Pirates of the Caribbean: The Video Game,
## LEGO Star Wars II: The Original Trilogy,
## LEGO Star Wars III: The Clone Wars,
## LEGO Star Wars: The Video Game,
## LEGO The Hobbit,
## LEGO The Lord of the Rings,
## Madagascar: Escape 2 Africa,
## Major League Baseball 2K11,
## Major League Baseball 2K12,
## Marvel: Ultimate Alliance,
## Metal Gear Solid V: The Phantom Pain,
## Metro: Last Light,
## Middle-Earth: Shadow of Mordor,
## Minecraft: Story Mode,
## Mini Ninjas,
## Monopoly,
## Monster Jam,
## Monsters vs. Aliens,
## Mortal Kombat,
## Murdered: Soul Suspect,
## Myst,
## NBA 2K11,
## NBA 2K12,
## NBA 2K13,
## NBA 2K16,
## Need for Speed Carbon,
## Need for Speed Rivals,
## Need for Speed Underground,
## Need for Speed Underground 2,
## Need for Speed: Most Wanted,
## Need for Speed: ProStreet,
## Need for Speed: The Run,
## Need For Speed: Undercover,
## Payday 2,
## Plants vs. Zombies: Garden Warfare,
## Prince of Persia: The Forgotten Sands,
## Pro Evolution Soccer 2008,
## Pro Evolution Soccer 2010,
## pro evolution soccer 2011,
## Pro Evolution Soccer 2012,
## Pro Evolution Soccer 2013,
## Pro Evolution Soccer 2014,
## Pro Evolution Soccer 2015,
## Pro Evolution Soccer 2016,
## Ratatouille,
## Rayman Origins,
## Resident Evil 6,
## Resident Evil: Revelations,
## Ride,
## Rocksmith 2014,
## Rugby World Cup 2015,
## Saints Row IV,
## Sherlock Holmes: Crimes & Punishments,
## SimCity 2000,
## Skylanders: Spyro's Adventure,
## Sleeping Dogs,
## Sonic & All-Stars Racing Transformed,
## Spider-Man 3,
## Spider-Man: Friend or Foe,
## Spider-Man: Web of Shadows,
## Star Wars The Clone Wars: Republic Heroes,
## Star Wars: The Force Unleashed II,
## Terraria,
## The Amazing Spider-Man 2 (2014),
## The Evil Within,
## The Incredibles: Rise of the Underminer,
## The LEGO Movie Videogame,
## The Sims 2,
## The Sims 2: Pets,
## The Sims 3,
## The Walking Dead: Season One,
## Thief (2014),
## Tom Clancy's EndWar,
## Tomb Raider (2013),
## Tomb Raider: Anniversary,
## Tomb Raider: Legend,
## Tomb Raider: Underworld,
## Transformers: Devastation,
## Transformers: Revenge of the Fallen (XBox 360, PS3, & PC Versions),
## TRON: Evolution,
## Wall-E,
## Watch Dogs,
## Winning Eleven: Pro Evolution Soccer 2007,
## Wolfenstein: The New Order,
## You Don't Know Jack} PC
## [10] {Harry Potter and the Chamber of Secrets,
## Harry Potter and the Sorcerer's Stone,
## Jeopardy!,
## Madden NFL 2002,
## Monopoly,
## Myst,
## SimCity 2000,
## Tony Hawk's Pro Skater 3,
## Wheel of Fortune,
## You Don't Know Jack} PS
summary(filtered_data)
## Rank Name Platform Year
## Min. : 17 Length:1614 Length:1614 Length:1614
## 1st Qu.: 2449 Class :character Class :character Class :character
## Median : 4840 Mode :character Mode :character Mode :character
## Mean : 5741
## 3rd Qu.: 8462
## Max. :16561
## Genre Publisher NA_Sales EU_Sales
## Length:1614 Length:1614 Min. :0.0000 Min. :0.0000
## Class :character Class :character 1st Qu.:0.0900 1st Qu.:0.0200
## Mode :character Mode :character Median :0.1900 Median :0.1000
## Mean :0.3936 Mean :0.2867
## 3rd Qu.:0.4200 3rd Qu.:0.2900
## Max. :9.6700 Max. :9.2700
## JP_Sales Other_Sales Global_Sales
## Min. :0.00000 Min. :0.0000 Min. : 0.0100
## 1st Qu.:0.00000 1st Qu.:0.0100 1st Qu.: 0.1625
## Median :0.00000 Median :0.0400 Median : 0.4000
## Mean :0.01586 Mean :0.1098 Mean : 0.8059
## 3rd Qu.:0.00000 3rd Qu.:0.1000 3rd Qu.: 0.8475
## Max. :1.05000 Max. :4.1400 Max. :21.4000
In the Eclat algorithm is employed to identify frequent itemsets and generate association rules. Key parameters are:
Now we will apply the Eclat algorithm. Instead of Apiori becuase it is too slow.
table(filtered_data$Name)
##
## 007: Quantum of Solace
## 6
## Adventure Time: Finn & Jake Investigations
## 6
## Alien: Isolation
## 5
## Angry Birds Star Wars
## 8
## Assassin's Creed IV: Black Flag
## 6
## Avatar: The Game
## 6
## Back to the Future: The Game
## 5
## Bakugan Battle Brawlers: Defenders of the Core
## 5
## Bakugan: Battle Brawlers
## 5
## Band Hero
## 5
## Battlefield 4
## 5
## Battlefield: Hardline
## 5
## Ben 10 Alien Force: Vilgax Attacks
## 5
## Ben 10 Galactic Racing
## 6
## Ben 10 Ultimate Alien: Cosmic Destruction
## 6
## Blazing Angels: Squadrons of WWII
## 5
## Bolt
## 5
## Brunswick Pro Bowling
## 6
## Cabela's North American Adventures
## 5
## Call of Duty: Advanced Warfare
## 5
## Call of Duty: Black Ops
## 5
## Call of Duty: Black Ops 3
## 5
## Call of Duty: Ghosts
## 6
## Call of Duty: World at War
## 5
## Captain America: Super Soldier
## 5
## Cars
## 8
## Cars 2
## 6
## Cars: Race-O-Rama
## 6
## Cloudy With a Chance of Meatballs
## 5
## Crash of the Titans
## 5
## Crash: Mind Over Mutant
## 5
## Dark Souls II
## 5
## Darksiders II
## 6
## Dead or Alive 5
## 5
## Diablo III
## 5
## DiRT 2
## 6
## Dishonored
## 5
## Disney Infinity
## 6
## Disney Infinity 2.0: Marvel Super Heroes
## 6
## Disney Infinity 3.0
## 5
## Dragon Age: Inquisition
## 5
## DreamWorks Super Star Kartz
## 5
## F1 2011
## 5
## Fantastic Four: Rise of the Silver Surfer
## 5
## Far Cry 4
## 5
## Farming Simulator 2015
## 5
## FIFA 12
## 7
## FIFA 14
## 9
## FIFA 15
## 8
## FIFA 16
## 5
## FIFA 17
## 5
## FIFA Soccer 06
## 5
## FIFA Soccer 07
## 6
## FIFA Soccer 08
## 7
## FIFA Soccer 09
## 6
## FIFA Soccer 10
## 7
## FIFA Soccer 11
## 7
## FIFA Soccer 13
## 8
## FIFA Street
## 5
## FIFA Street 2
## 5
## FIFA World Cup Germany 2006
## 6
## Fight Night Round 3
## 5
## G-Force
## 6
## G.I. Joe: The Rise of Cobra
## 6
## Generator Rex: Agent of Providence
## 5
## Ghostbusters: The Video Game
## 6
## Grand Theft Auto V
## 5
## Green Lantern: Rise of the Manhunters
## 5
## Guitar Hero III: Legends of Rock
## 5
## Guitar Hero Live
## 5
## Guitar Hero: World Tour
## 5
## Happy Feet Two
## 5
## Harry Potter and the Chamber of Secrets
## 6
## Harry Potter and the Deathly Hallows - Part 1
## 5
## Harry Potter and the Deathly Hallows - Part 2
## 5
## Harry Potter and the Goblet of Fire
## 6
## Harry Potter and the Half-Blood Prince
## 7
## Harry Potter and the Order of the Phoenix
## 7
## Harry Potter and the Prisoner of Azkaban
## 5
## Harry Potter and the Sorcerer's Stone
## 7
## How to Train Your Dragon 2
## 5
## Ice Age 2: The Meltdown
## 6
## Ice Age: Dawn of the Dinosaurs
## 6
## Injustice: Gods Among Us
## 5
## Iron Man
## 6
## Iron Man 2
## 5
## Jeopardy!
## 5
## Juiced 2: Hot Import Nights
## 6
## Just Dance 2014
## 6
## Just Dance 2015
## 6
## Just Dance 2016
## 6
## Karaoke Revolution
## 5
## Kung Fu Panda
## 6
## LEGO Batman 2: DC Super Heroes
## 7
## Lego Batman 3: Beyond Gotham
## 8
## LEGO Batman: The Videogame
## 7
## LEGO Dimensions
## 5
## LEGO Harry Potter: Years 1-4
## 6
## LEGO Harry Potter: Years 5-7
## 8
## LEGO Indiana Jones 2: The Adventure Continues
## 6
## LEGO Indiana Jones: The Original Adventures
## 7
## LEGO Jurassic World
## 8
## LEGO Marvel's Avengers
## 7
## LEGO Marvel Super Heroes
## 9
## LEGO Pirates of the Caribbean: The Video Game
## 7
## LEGO Star Wars II: The Original Trilogy
## 8
## LEGO Star Wars III: The Clone Wars
## 7
## Lego Star Wars: The Force Awakens
## 7
## LEGO Star Wars: The Video Game
## 5
## LEGO The Hobbit
## 8
## LEGO The Lord of the Rings
## 7
## Madagascar
## 5
## Madagascar: Escape 2 Africa
## 6
## Madden NFL 06
## 7
## Madden NFL 07
## 9
## Madden NFL 08
## 8
## Madden NFL 09
## 6
## Madden NFL 10
## 5
## Madden NFL 11
## 5
## Madden NFL 13
## 6
## Madden NFL 2002
## 6
## Madden NFL 2005
## 5
## Major League Baseball 2K10
## 6
## Major League Baseball 2K11
## 7
## Major League Baseball 2K12
## 6
## Major League Baseball 2K6
## 5
## Major League Baseball 2K8
## 5
## Major League Baseball 2K9
## 5
## Marvel Nemesis: Rise of the Imperfects
## 5
## Marvel Super Hero Squad: The Infinity Gauntlet
## 5
## Marvel: Ultimate Alliance
## 6
## Marvel: Ultimate Alliance 2
## 6
## Metal Gear Solid V: The Phantom Pain
## 5
## Metro: Last Light
## 5
## Michael Jackson: The Experience
## 6
## Middle-Earth: Shadow of Mordor
## 5
## Minecraft
## 6
## Minecraft: Story Mode
## 5
## Mini Ninjas
## 5
## Monopoly
## 8
## Monster Jam
## 5
## Monster Jam: Path of Destruction
## 5
## Monsters vs. Aliens
## 6
## Mortal Kombat
## 5
## MotoGP
## 5
## Murdered: Soul Suspect
## 5
## MX vs. ATV Untamed
## 6
## Myst
## 5
## NBA 2K10
## 5
## NBA 2K11
## 6
## NBA 2K12
## 5
## NBA 2K13
## 5
## NBA 2K16
## 5
## NBA Jam
## 7
## NBA Live 08
## 5
## Need for Speed Carbon
## 7
## Need for Speed Rivals
## 5
## Need for Speed Underground
## 5
## Need for Speed Underground 2
## 6
## Need for Speed: Most Wanted
## 12
## Need for Speed: ProStreet
## 7
## Need for Speed: The Run
## 5
## Need For Speed: Undercover
## 7
## Open Season
## 6
## Over the Hedge
## 5
## Pac-Man World 3
## 5
## Payday 2
## 5
## PES 2009: Pro Evolution Soccer
## 5
## Peter Jackson's King Kong: The Official Game of the Movie
## 6
## Pinball Hall of Fame: The Gottlieb Collection
## 5
## Pinball Hall of Fame: The Williams Collection
## 5
## Pirates of the Caribbean: At World's End
## 6
## Plants vs. Zombies: Garden Warfare
## 5
## Prince of Persia: The Forgotten Sands
## 6
## Pro Evolution Soccer 2008
## 6
## Pro Evolution Soccer 2010
## 6
## pro evolution soccer 2011
## 6
## Pro Evolution Soccer 2012
## 7
## Pro Evolution Soccer 2013
## 6
## Pro Evolution Soccer 2014
## 5
## Pro Evolution Soccer 2015
## 5
## Pro Evolution Soccer 2016
## 5
## Rapala Pro Bass Fishing 2010
## 6
## Ratatouille
## 9
## Rayman Legends
## 6
## Rayman Origins
## 6
## Resident Evil 6
## 5
## Resident Evil: Revelations
## 5
## Resident Evil: Revelations 2
## 5
## Ride
## 5
## Rocksmith 2014
## 5
## Rugby 15
## 5
## Rugby World Cup 2015
## 6
## Saints Row IV
## 5
## Scooby-Doo! Unmasked
## 5
## SeaWorld Adventure Parks: Shamu's Deep Sea Adventure
## 5
## Sega Superstars Tennis
## 5
## Shaun White Snowboarding
## 5
## Sherlock Holmes: Crimes & Punishments
## 5
## Shrek SuperSlam
## 5
## Shrek the Third
## 5
## SimCity 2000
## 5
## Skylanders Giants
## 5
## Skylanders SWAP Force
## 7
## Skylanders: Spyro's Adventure
## 5
## Skylanders: SuperChargers
## 7
## Skylanders: Trap Team
## 7
## Sleeping Dogs
## 5
## Sonic & All-Stars Racing Transformed
## 6
## Spider-Man 2
## 6
## Spider-Man 3
## 7
## Spider-Man: Edge of Time
## 5
## Spider-Man: Friend or Foe
## 6
## Spider-Man: Web of Shadows
## 6
## Star Wars The Clone Wars: Republic Heroes
## 7
## Star Wars: The Force Unleashed
## 6
## Star Wars: The Force Unleashed II
## 5
## Surf's Up
## 7
## Teenage Mutant Ninja Turtles
## 6
## Terraria
## 8
## The Amazing Spider-Man (Console Version)
## 6
## The Amazing Spider-Man 2 (2014)
## 7
## The BIGS
## 5
## The BIGS 2
## 6
## The Chronicles of Narnia: Prince Caspian
## 5
## The Chronicles of Narnia: The Lion, The Witch and The Wardrobe
## 5
## The Evil Within
## 5
## The Golden Compass
## 6
## The Incredible Hulk
## 6
## The Incredibles: Rise of the Underminer
## 6
## The Legend of Spyro: Dawn of the Dragon
## 5
## The LEGO Movie Videogame
## 8
## The Lord of the Rings: Aragorn's Quest
## 5
## The Simpsons Game
## 6
## The Sims 2
## 7
## The Sims 2: Pets
## 6
## The Sims 3
## 6
## The Smurfs 2
## 5
## The Walking Dead: Season One
## 6
## The Walking Dead: Season Two
## 5
## The Wolf Among Us
## 5
## Thief (2014)
## 5
## Thor: God of Thunder
## 5
## Thrillville: Off the Rails
## 5
## Tiger Woods PGA Tour 06
## 5
## Tiger Woods PGA Tour 07
## 6
## Tiger Woods PGA Tour 08
## 6
## Tiger Woods PGA Tour 10
## 5
## Tom Clancy's EndWar
## 5
## Tomb Raider (2013)
## 5
## Tomb Raider: Anniversary
## 5
## Tomb Raider: Legend
## 7
## Tomb Raider: Underworld
## 6
## Tony Hawk's Pro Skater 3
## 6
## Tony Hawk's Proving Ground
## 5
## Toy Story 3: The Video Game
## 5
## Transformer: Rise of the Dark Spark
## 5
## Transformers: Devastation
## 5
## Transformers: Revenge of the Fallen (XBox 360, PS3, & PC Versions)
## 6
## Transformers: The Game (XBox 360, PS2, PS3, Wii & PC Versions)
## 5
## TRON: Evolution
## 5
## Turbo: Super Stunt Squad
## 6
## Ultimate Spider-Man
## 5
## Up
## 6
## Wall-E
## 7
## Warriors Orochi 3
## 6
## Watch Dogs
## 6
## Wheel of Fortune
## 5
## Winning Eleven: Pro Evolution Soccer 2007
## 5
## Wipeout 2
## 5
## Wolfenstein: The New Order
## 5
## World Series of Poker 2008: Battle for the Bracelets
## 5
## WRC 5: FIA World Rally Championship
## 5
## WWE All Stars
## 6
## WWE SmackDown vs Raw 2008
## 6
## WWE SmackDown vs. Raw 2009
## 6
## WWE SmackDown vs. Raw 2010
## 6
## WWE SmackDown vs. Raw 2011
## 5
## X-Men: The Official Game
## 6
## You Don't Know Jack
## 6
rule <- eclat(datatransactions, parameter = list(supp = 0.001,maxlen=2))
## Eclat
##
## parameter specification:
## tidLists support minlen maxlen target ext
## FALSE 0.001 1 2 frequent itemsets TRUE
##
## algorithmic control:
## sparse sort verbose
## 7 -2 TRUE
##
## Absolute minimum support count: 0
##
## create itemset ...
## set transactions ...[280 item(s), 22 transaction(s)] done [0.00s].
## sorting and recoding items ... [280 item(s)] done [0.00s].
## creating bit matrix ... [280 row(s), 22 column(s)] done [0.00s].
## writing ... [36865 set(s)] done [0.00s].
## Creating S4 object ... done [0.00s].
inspect(head(rule,20))
## items support count
## [1] {Ratatouille,
## SimCity 2000} 0.09090909 2
## [2] {Harry Potter and the Order of the Phoenix,
## SimCity 2000} 0.04545455 1
## [3] {FIFA Soccer 08,
## SimCity 2000} 0.04545455 1
## [4] {Major League Baseball 2K11,
## SimCity 2000} 0.04545455 1
## [5] {SimCity 2000,
## Spider-Man 3} 0.04545455 1
## [6] {Harry Potter and the Half-Blood Prince,
## SimCity 2000} 0.04545455 1
## [7] {FIFA Soccer 10,
## SimCity 2000} 0.04545455 1
## [8] {FIFA Soccer 11,
## SimCity 2000} 0.04545455 1
## [9] {Need for Speed: ProStreet,
## SimCity 2000} 0.04545455 1
## [10] {LEGO Batman: The Videogame,
## SimCity 2000} 0.04545455 1
## [11] {SimCity 2000,
## Star Wars The Clone Wars: Republic Heroes} 0.04545455 1
## [12] {LEGO Indiana Jones: The Original Adventures,
## SimCity 2000} 0.04545455 1
## [13] {Need For Speed: Undercover,
## SimCity 2000} 0.04545455 1
## [14] {SimCity 2000,
## Wall-E} 0.04545455 1
## [15] {Madden NFL 07,
## SimCity 2000} 0.04545455 1
## [16] {FIFA 14,
## SimCity 2000} 0.04545455 1
## [17] {LEGO Harry Potter: Years 5-7,
## SimCity 2000} 0.04545455 1
## [18] {Need for Speed: Most Wanted,
## SimCity 2000} 0.09090909 2
## [19] {LEGO Pirates of the Caribbean: The Video Game,
## SimCity 2000} 0.04545455 1
## [20] {LEGO Star Wars III: The Clone Wars,
## SimCity 2000} 0.04545455 1
To identifying sets of the games which are frequently purchased together helps in understanding consumer preferences.
To finding more better illustrate, we will display some sample association rules:
length(rule)
## [1] 36865
length(rule)
## [1] 36865
rules <- ruleInduction(rule, datatransactions, confidence = 0.5)
plot(rules, method = "scatterplot", measure = c("support","confidence"),shading = "lift")
## To reduce overplotting, jitter is added! Use jitter = 0 to prevent jitter.
This article can inform:
-Bundling strategies: Creating game bundles on frequently purchased combinations. -Cross- promotions: Targeted marketing campaigns promoting related games. -Inventory management: Optimizing stock levels based on anticipated demand for game bundle combinations.
To finding how game sales trends evolve over time, we analyze the relationship between year of release and total global sales.
ggplot(data, aes(x = Year, y = Global_Sales))+geom_line()+theme_minimal()+ggtitle("Game sales in over time")+
theme(
axis.text.x = element_text(size = 4),
axis.text.y = element_text(size = 4),
plot.title = element_text(size = 9, face = "bold")
)
## Conclusion
The market basket analysis provides valuable insights into purchasing patterns in the video game sector. To understanding associations between game purchases, companies can develop marketing strategies, and improve customer satisfaction, and increases the sales. The key contributions of this study include:
1-Explotration of frequent game pairings and bundles. 2-Visualization of association rules and business applications. 3- Analysis of sales trends over time to inform marketing strategies.
Source: -Agrawal, R., & Srikant, R. (1994). “Fast Algorithms for Mining Association Rules.” Proceedings of the 20th VLDB Conference. -an, P., Steinbach, M., & Kumar, V. (2005). “Introduction to Data Mining.” -Dataset: https://www.kaggle.com/datasets/gregorut/videogamesales