Samuel Goon - Project One

Author

Samuel-Kei Goon

Source: https://www.ign.com/wikis/digimon-story-cyber-sleuth/Digimon/

Source: https://www.ign.com/wikis/digimon-story-cyber-sleuth/Digimon/

Loading Libraries and Dataset

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.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
setwd("C:/Users/samue/Desktop/School Apps/RStudio/RStudio Datasets/Digimon")
digimon_movelist <- readr::read_csv("DigiDB_movelist.csv")
Rows: 387 Columns: 7
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (5): Move, Type, Attribute, Inheritable, Description
dbl (2): SP Cost, Power

ℹ 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.

Digimon Cyber Sleuth

Digimon Cyber Sleuth is a monster collecting game that focuses on finding, creating, and evolving creatures called “Digimon” to fight against enemies you find along your journey. A core mechanic of the game is how the player can choose a list of moves a Digimon can use when leveling up or which moves to inherit from their previous evolutions. These moves have nine different attributes which determine the type of damage they deal. Each Digimon have an attribute that they are weak to, and an attribute that they resist when being attacked. Moves that deal damage determine that damage based on its power, physical and magic moves are the only types of moves that have a specified power. I plan to look at which type attribute has the most power on average to determine which attribute is the best at dealing damage, and the worst attribute for a Digimon to be. The source for this dataset is http://digidb.io/ created by Mark Korsak.

Cleaning up the data

Making all headers lowercase, fixing spelling mistakes in document, and removing any 0 values in power

names(digimon_movelist) <- tolower(names(digimon_movelist)) #Lowercasing the headers
digimon_movelist$attribute <- gsub("Thunder", "Electric",digimon_movelist$attribute) # Correctly Labeling "Thunder" attribute as "Electric" as there is no thunder damage type in the game
digimon_movelist <- filter(digimon_movelist, power > "0") #Removing any moves with 0 power, which includes fixed damage attacks, support moves, or moves that use a Digimon's attacking power instead of the move's power
head(digimon_movelist)
# A tibble: 6 × 7
  move            `sp cost` type     power attribute inheritable description    
  <chr>               <dbl> <chr>    <dbl> <chr>     <chr>       <chr>          
1 Wolkenapalm I           3 Physical    65 Fire      Yes         Physical attac…
2 Wolkenapalm II          6 Physical    85 Fire      Yes         Physical attac…
3 Wolkenapalm III         9 Physical   105 Fire      Yes         Physical attac…
4 Burst Flame I           3 Magic       55 Fire      Yes         Magic attack, …
5 Burst Flame II          6 Magic       75 Fire      Yes         Magic attack, …
6 Burst Flame III         9 Magic       95 Fire      Yes         Magic attack, …

Creating a box plot graph

ggplot(digimon_movelist) +
geom_boxplot(aes(x = power, fill = attribute)) + #Creating the base of the box plot 
  scale_fill_manual(values = c("black", "brown", "yellow", "red", "white", "gray", "green", "blue", "lightgreen" )) + #Game-accurate coloring each element 
  labs(fill = "Elemental Attribute",
       x = "Power",
       title = "Power of each Attribute",
       caption = "Source: http://digidb.io/") + #Adding labels like the title and legend
  theme(axis.text.y=element_blank()) # Remove the useless y-axis tick values.

Brief Essay Portion

The dataset needed some cleaning due to the nature of what I was plotting, including removing data points that were not applicable and renaming a variable. The “Thunder” variable in “attribute” was supposed to be “Electric” as there is no “Thunder” attribute in the source game. I did this by using the gsub command. I then removed any move that had a power less than 0, which was to remove any support moves, or moves that did damage in unconventional ways, using the command “filter.”

The visualization represents each attribute’s power and shows the average, lows, and highs of each of them. I noticed that electric had the single highest power move of every attribute, but was still second behind light and neutral damage averages. The take away is that light damage is the most damaging attribute on average, that also has type advantage, as neutral does not have any advantages or disadvantages. Electric is a clear standout for its trio, and fire is the best of their attribute trio.

One thing I could have improved with this dataset is to group both of the trios together to show them with more detail. I could have also organized the box plot to sort by the average power of each attribute instead of the first letter of each attribute determining where it is on the graph. I could have also looked at the SP costs and types of moves as an alternative to looking at their power.