dat <- read_csv("vgsales.csv")
## Rows: 16598 Columns: 11
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (5): Name, Platform, Year, Genre, Publisher
## dbl (6): Rank, NA_Sales, EU_Sales, JP_Sales, Other_Sales, Global_Sales
## 
## ℹ 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.
head(dat)
## # A tibble: 6 × 11
##    Rank Name           Platform Year  Genre Publisher NA_Sales EU_Sales JP_Sales
##   <dbl> <chr>          <chr>    <chr> <chr> <chr>        <dbl>    <dbl>    <dbl>
## 1     1 Wii Sports     Wii      2006  Spor… Nintendo      41.5    29.0      3.77
## 2     2 Super Mario B… NES      1985  Plat… Nintendo      29.1     3.58     6.81
## 3     3 Mario Kart Wii Wii      2008  Raci… Nintendo      15.8    12.9      3.79
## 4     4 Wii Sports Re… Wii      2009  Spor… Nintendo      15.8    11.0      3.28
## 5     5 Pokemon Red/P… GB       1996  Role… Nintendo      11.3     8.89    10.2 
## 6     6 Tetris         GB       1989  Puzz… Nintendo      23.2     2.26     4.22
## # ℹ 2 more variables: Other_Sales <dbl>, Global_Sales <dbl>

Introduction

The Video Game Sales dataset contains information about video game titles, genres, platforms, publishers, and regional sales figures. The purpose of this analysis is to explore trends in the global gaming industry and identify factors associated with successful game sales. Through a series of visualizations, this report examines relationships between regional and global sales, compares genre performance, investigates sales distributions, and evaluates sales trends across years and platforms.

Figure 1: Scatter Plot – North American Sales vs Global Sales

Explanation:

This scatter plot examines the relationship between North American sales and global sales. A positive relationship would indicate that games performing well in North America also tend to achieve strong worldwide sales.

ggplot(dat,aes(x=NA_Sales,y=Global_Sales))+
  geom_point(color="steelblue", alpha=0.6, size=2)+
  labs(
    title="Relataionship Between North American and Global Sales",
    x="North American Sales(Millions)",
    y="Global Sales( Millions)"
    )+
  theme_minimal()

Interpretation

The chart shows a strong positive relationship between North American and Global sales. Games with higher North American sales generally achieve higher worldwide sales.

Figure-2: Box Plot

Explanation

This box plot compares the distribution of global sales across different genres.

ggplot(dat,aes(x=Genre, y=Global_Sales, fill=Genre))+
         geom_boxplot()+
         theme_minimal()+
         theme(axis.text.x=element_text(angle = 45, hjust=1))+
         labs(
           title = "Global Sales Distributn by Genre",
           x="Genre",
           y="Global Sales"
         )

Interpretation

Some genres have higher median sales and wider ranges, indicating greater variability and the presence of blockbuster titles.

Figure 3: Bar Chart

Explanation:

This chart compares total sales acroos genres.

genre_sales<-dat%>%
  group_by(Genre)%>%
  summarise(TotalSales=sum(Global_Sales, na.rm = TRUE))
ggplot(genre_sales,
       aes(x=reorder(Genre, TotalSales),
           y=TotalSales,
           fill=Genre))+
  geom_col()+
  coord_flip()+
  theme_minimal()+
  labs(
    title="Total Global Sales by Genre",
    x="Genre",
    y="Total Sales"
  )

Interpretation

Action, Sports and Shooter games contribute the largest share fo the total global sales.

Figure 4: Histogram

Explanation:

This histogram shows the frequency distributation of global sales.

ggplot(dat, aes(Global_Sales))+
  geom_histogram(
    bins=30,
    fill="darkorange",
    color="White"
  )+
  theme_minimal()+
  labs(
    title="Distribution of Global Sales",
    x="Global Sales",
    y="Frequecny"
  )

Interpretation

Most games generate relatively low sales, while only few achieve very high sales.

Figure 5: Density Plot

Explanation

This density plot focuses on Action games and their slaes distribution

action_games<-dat%>%
  filter(Genre=="Action")
ggplot(action_games,
       aes(Global_Sales))+
  geom_density(
    fill="purple",
    alpha=0.5
  )+
  theme_minimal()+
  labs(
    title="Density Distribution of Action Game Sales",
    x="Global Sales",
    y="Denisty"
  )

Interpretation

The majority of Action games ahve moderate sales, while a small number become highly successful.

Figure 6: Line Chart

Explanation

This chart shows the trend of video game sales over time

year_sales <- dat %>%
  group_by(Year) %>%
  summarise(TotalSales = sum(Global_Sales, na.rm = TRUE))

ggplot(year_sales,
       aes(x = Year,
           y = TotalSales, group = 1)) +
  geom_line(
    color = "darkgreen",
    linewidth = 2
  ) +
  geom_point(
    color = "red",
    size = 2
  ) +
  theme_minimal() +
  labs(
    title = "Global Video Game Sales Over Time",
    x = "Year",
    y = "Total Sales"
  )

Interpretation

The line chart periods of rapid growth and decline in the gaming market.

Figure 7: Heatmap

Explanation

This heatmap visualizes sales performance genres and platforms.

heat_data <-dat %>%
  group_by(Genre, Platform) %>%
  summarise(
    Sales=sum(Global_Sales), .groups = "drop"
  )
  
ggplot(heat_data, 
       aes(
         x=Platform,
         y=Genre,
         fill= Sales
       ))+
  
  geom_tile()+
  scale_fill_gradient(
    low="lightyellow",
    high="red"
  )+
  theme_minimal()+
  labs(
    title = "Genre and Platform Sales Heatmap",
    x="Platform", y="Genre"
  )

Interpretation

Darker color indicate stronger sales performance. Some plat forms dominate particular genres.

Figure 8: Interactive Plotly Chart

Explanation

This Interactive visulization allows users to explore individual game sales by hovering over data points.

library(plotly)
## Warning: package 'plotly' was built under R version 4.5.3
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
p <- ggplot(dat,
            aes(
              x = NA_Sales,
              y = Global_Sales,
              color = Genre,
              text = Name
            )) +
  geom_point(size = 2) +
  theme_minimal() +
  labs(
    title = "Interactive Video Game Sales Analysis",
    x = "North American Sales",
    y = "Global Sales"
  )

ggplotly(
  p,
  tooltip = c("text", "x", "y")
)

Interpretation

Users cand interact with the chart to indentify specific games and compare their sales performance across genres.

Key Findings

  1. North American sales strongly influence global sales.
  2. Action and Sports genres generate the highest total sales.
  3. Most games achieve relatively low sales, while a few blockbuster titles dominate the market.
  4. Sales trends vary significantly across years and platforms.
  5. Interactive visualizations provide deeper insights into individual game performance.