Exploring Nintendo 64 Genres with Tidyverse

Author

Dillon Leeper

What are we exploring?

Which genres have the most Nintendo 64 games in this dataset? I chose the N64 because I wanted to explore video games while practicing Tidyverse functions. This example shows how to use three dplyr functions: filter() to select rows, count() to count them, and arrange() to order the results.

The data

The Video Games Sales dataset contains game-platform records for many consoles. It includes each game’s name, platform, genre, publisher, and estimated sales. The dataset creator describes it as a historical scrape of VGChartz. The source description says it covers games with sales above 100,000 copies, but the CSV also contains entries with lower reported sales, so that threshold is not a reliable rule for every row. The dataset is not a complete list of all video games or N64 releases, so the results below describe only games in this dataset.

The code reads the CSV from its public source. An internet connection is needed to run the document.

library(tidyverse)
Warning: package 'tidyverse' was built under R version 4.5.3
Warning: package 'readr' was built under R version 4.5.3
games <- read_csv(
  "https://zenodo.org/records/5898311/files/vgsales.csv?download=1",
  show_col_types = FALSE
)

Let’s look at a few rows and the columns we will use. Platform identifies the console and Genre describes the type of game. The pipe (%>%) passes the data on its left to the next function. select() chooses columns, while head(8) displays the first eight rows.

games %>%
  select(Name, Platform, Genre) %>%
  head(8)
# A tibble: 8 × 3
  Name                     Platform Genre       
  <chr>                    <chr>    <chr>       
1 Wii Sports               Wii      Sports      
2 Super Mario Bros.        NES      Platform    
3 Mario Kart Wii           Wii      Racing      
4 Wii Sports Resort        Wii      Sports      
5 Pokemon Red/Pokemon Blue GB       Role-Playing
6 Tetris                   GB       Puzzle      
7 New Super Mario Bros.    DS       Platform    
8 Wii Play                 Wii      Misc        

1. Keep only Nintendo 64 games with filter()

The original dataset includes several platforms. filter() keeps the rows that meet a condition. Here, Platform == "N64" asks R to keep rows whose platform is N64. The two equals signs test whether the values match.

n64_games <- games %>%
  filter(Platform == "N64")

n64_games %>%
  select(Name, Platform, Genre) %>%
  head(8)
# A tibble: 8 × 3
  Name                                 Platform Genre   
  <chr>                                <chr>    <chr>   
1 Super Mario 64                       N64      Platform
2 Mario Kart 64                        N64      Racing  
3 GoldenEye 007                        N64      Shooter 
4 The Legend of Zelda: Ocarina of Time N64      Action  
5 Super Smash Bros.                    N64      Fighting
6 Pokemon Stadium                      N64      Strategy
7 Donkey Kong 64                       N64      Platform
8 Diddy Kong Racing                    N64      Racing  

We saved the result as n64_games. The original games dataset still contains the other platforms. We can use nrow() to see how filtering changed the number of records.

data.frame(
  dataset = c("All platforms", "Nintendo 64"),
  number_of_rows = c(nrow(games), nrow(n64_games))
)
        dataset number_of_rows
1 All platforms          16598
2   Nintendo 64            319

Each row represents a game on a particular platform. The filtered table keeps only records labeled N64.

2. Count games in each genre with count()

count(Genre) groups the N64 rows by genre and counts the rows in each group. The name argument gives the count column a descriptive name.

genre_counts <- n64_games %>%
  count(Genre, name = "number_of_games")

genre_counts
# A tibble: 12 × 2
   Genre        number_of_games
   <chr>                  <int>
 1 Action                    38
 2 Adventure                  4
 3 Fighting                  29
 4 Misc                      18
 5 Platform                  30
 6 Puzzle                    12
 7 Racing                    57
 8 Role-Playing               8
 9 Shooter                   24
10 Simulation                10
11 Sports                    80
12 Strategy                   9

Each number is a count of records in this dataset, not a count of games sold. For example, 10 in the Racing row would mean 10 racing game records, not 10 copies sold.

3. Sort the results with arrange()

arrange() orders rows. Wrapping the count in desc() puts the largest counts first.

genre_counts <- genre_counts %>%
  arrange(desc(number_of_games))

genre_counts
# A tibble: 12 × 2
   Genre        number_of_games
   <chr>                  <int>
 1 Sports                    80
 2 Racing                    57
 3 Action                    38
 4 Platform                  30
 5 Fighting                  29
 6 Shooter                   24
 7 Misc                      18
 8 Puzzle                    12
 9 Simulation                10
10 Strategy                   9
11 Role-Playing               8
12 Adventure                  4

The first row now shows the genre with the most N64 records in this dataset. In the source version examined for this tutorial, Sports is first with 80 records, followed by Racing with 57. These are counts of records, not units sold or a complete count of all games released. If two genres have the same count, their order does not mean one has more games than the other.

Optional: visualize the counts

A bar chart can make the counts easier to compare. geom_col() uses the counts we already calculated, and coord_flip() turns the chart sideways so genre names have room. We use reorder() inside the plot to order genres by count; sorting a table with arrange() alone does not change the order of categories on a ggplot axis.

ggplot(genre_counts, aes(x = reorder(Genre, number_of_games), y = number_of_games)) +
  geom_col(fill = "steelblue") +
  coord_flip() +
  labs(
    title = "Nintendo 64 Games by Genre",
    subtitle = "Counts of records in the historical video game sales dataset",
    x = "Genre",
    y = "Number of game records"
  )

Takeaway

filter() selected N64 records, count() counted those records by genre, and arrange() put the largest counts first. The results are limited to the games included in this historical sales dataset; they should not be interpreted as a complete count of the N64 library.

Data source: Smith, Gregory. Video Games Sales (2022), Zenodo. https://doi.org/10.5281/zenodo.5898311.

AI assistance: OpenAI Codex (GPT-6), accessed November 14, 2026, assisted with drafting and reviewing this tutorial.