Data110-Project 1

Author

Chloe Lin

Introduction

This project analyzes the dataset “Video Games CSV File”. The data includes the information of sales, playtime, and other basic information of games released between 2004 and 2010.

This dataset was collected by Dr. Joe Cox from the CORGIS Dataset Project. It was originally collected to estimate the effect of various factors on the chance of a videog ame becoming a blockbuster title.

Source:

<Cox, Joe. “What makes a blockbuster video game? An empirical analysis of US sales data.” Managerial and Decision Economics 35.3 (2014): 189-198.>

Variables:

Metadata.Publishers : The list of publishers who created this game. Metrics.Review.Score : a typical review score for this game, out of 100. Metrics.Used.Price : A typical “used” price for this game (i.e. previously returned and sold), measured in dollars. It is unclear where this number originally came from. Release.Year : The year that this game was released.

Research Question:

What is the relationship between video game review score and used price solely for games published by Nintendo? Can review score predict the resale price of video games?

Loading Datasets and Libraries

#load libraries
library(readr)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.2.1     ✔ purrr     1.2.2
✔ forcats   1.0.1     ✔ stringr   1.6.0
✔ ggplot2   4.0.3     ✔ tibble    3.3.1
✔ lubridate 1.9.5     ✔ tidyr     1.3.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
#load dataset
videogame_data <- read_csv("/Users/chloelin/Documents/Montgomery College /FALL 2026/DATA 110/project 1/video_games.csv")
Rows: 1212 Columns: 36
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr  (5): Title, Metadata.Genres, Metadata.Publishers, Release.Console, Rele...
dbl (25): Features.Max Players, Metrics.Review Score, Metrics.Sales, Metrics...
lgl  (6): Features.Handheld?, Features.Multiplatform?, Features.Online?, Met...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#look at dataset
head(videogame_data)
# A tibble: 6 × 36
  Title       `Features.Handheld?` `Features.Max Players` Features.Multiplatfo…¹
  <chr>       <lgl>                                 <dbl> <lgl>                 
1 Super Mari… TRUE                                      1 TRUE                  
2 Lumines: P… TRUE                                      1 TRUE                  
3 WarioWare … TRUE                                      2 TRUE                  
4 Hot Shots … TRUE                                      1 TRUE                  
5 Spider-Man… TRUE                                      1 TRUE                  
6 The Urbz: … TRUE                                      1 TRUE                  
# ℹ abbreviated name: ¹​`Features.Multiplatform?`
# ℹ 32 more variables: `Features.Online?` <lgl>, Metadata.Genres <chr>,
#   `Metadata.Licensed?` <lgl>, Metadata.Publishers <chr>,
#   `Metadata.Sequel?` <lgl>, `Metrics.Review Score` <dbl>,
#   Metrics.Sales <dbl>, `Metrics.Used Price` <dbl>, Release.Console <chr>,
#   Release.Rating <chr>, `Release.Re-release?` <lgl>, Release.Year <dbl>,
#   `Length.All PlayStyles.Average` <dbl>, …

Cleaning the Dataset

#substitute spaces for periods
names(videogame_data) <- gsub(" ",".",names(videogame_data))
#keep only review score, used price, release year,and publishers
#filter out only games published by Nintendo
nintendo_data <- videogame_data |>
  select(Metrics.Review.Score, Metrics.Used.Price, Release.Year, Metadata.Publishers) |>
  filter(Metadata.Publishers == "Nintendo")

head(nintendo_data)
# A tibble: 6 × 4
  Metrics.Review.Score Metrics.Used.Price Release.Year Metadata.Publishers
                 <dbl>              <dbl>        <dbl> <chr>              
1                   85              25.0          2004 Nintendo           
2                   81              23.0          2004 Nintendo           
3                   46              25.0          2004 Nintendo           
4                   73               8.95         2004 Nintendo           
5                   91              30.0          2005 Nintendo           
6                   83              27.0          2005 Nintendo           

Diagnostic Plot

#create scatterplot
p1 <- ggplot(nintendo_data, aes(x = Metrics.Review.Score, y = Metrics.Used.Price)) +
  geom_point()
p1

#fix axis to start at zero
p2 <- p1 +xlim(0,100)+ ylim(0,50)
p2

#add a smoother
p3 <- p2 + geom_smooth()
p3
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'

#add a linear regression
p4 <- p3 + geom_smooth(method='lm',formula=y~x)
p4
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'

Regression Analysis

#create a linear model
linear_nintendo <- lm( Metrics.Review.Score ~ Metrics.Used.Price, data = nintendo_data)
summary(linear_nintendo)

Call:
lm(formula = Metrics.Review.Score ~ Metrics.Used.Price, data = nintendo_data)

Residuals:
    Min      1Q  Median      3Q     Max 
-36.163  -5.358   1.773   7.642  15.869 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)         68.3390     3.9670  17.227   <2e-16 ***
Metrics.Used.Price   0.3227     0.1651   1.954    0.054 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 11.05 on 83 degrees of freedom
Multiple R-squared:  0.04399,   Adjusted R-squared:  0.03247 
F-statistic: 3.819 on 1 and 83 DF,  p-value: 0.05403
#the p-value is insignificant by a value of 0.004(above 0.05 by 0.004)
#the adjusted R-squared is 0.03247, which means that there is a 3.2% correlation
#Equation: Review Score = 68.3390 + 0.3227(Used Price)

Visualization

#create visualization
ggplot(nintendo_data, aes(x = Metrics.Review.Score, y = Metrics.Used.Price, color = factor(Release.Year))) +
  geom_jitter(width = 0.5, height = 0.5, size = 2, alpha = 0.5) +  #jittered points
  geom_smooth(method = "lm", se = TRUE, color = "black", linetype = 2, linewidth = 0.8) + #single regression line
  labs(
    title = "Review Score vs Used Price Across All Videogame Genres",
    x = "Review Score (out of 100)",
    y = "Used Price (dollars)",
    color = "Release Year",
    caption = "Source: CORGIS Dataset Project"
  ) +
  theme_minimal(base_size = 10, base_family = "serif")
`geom_smooth()` using formula = 'y ~ x'

Conclusion

  1. How you cleaned the dataset up (be detailed and specific, using proper terminology where appropriate). 

    I cleaned the data up by using gsub to replace the spaces in the headers with periods to make variable names more cohesive. I also selected the review score, used price, release year, and publishers to use in my data using select. I then filtered out only the games published by Nintendo using filter.

  1. What the visualization represents, any interesting patterns or surprises that arise within the visualization. 

    The visualization uses a scatterplot to show the relationship between the review score of the game and the used game price for games published by Nintendo. The rating of the games, surprisingly, do not impact the resell value of the game later on. I believed that the resell price of a game would be somewhat determined by the deemed quality of said game. Across various release years and game genres, the resale price of the game remains largely random.

  1. Anything that you might have shown that you could not get to work or that you wished you could have included. 

    I wished that I could have also explored how other factors of a game would influence the used price of a game, as the retro game reselling market, upon first glance, is seemingly random. Perhaps the average length of the game would influence resell price, or even the units sold of the game.