Usage of Pokemon by tier of players. What are the most popular Pokemon used of all tiers.

The data is from Smogon. I manually compiled the text files from Smogon’s data published in October. The 4 files are named, gen9vgc2026reggmc along with its tiers 0,1500,1630,1760. Each file shows the weight by usage of Pokemon by players in each tier. Note: the data is derived from Pokemon Showdown hosted by Smogon and popular site where multitude of Pokemon aficionados can test their team prior to attempting to build them for competitions or just for fun. At the 0 rank cutoff all players’ usage of Pokemon are included. While higher ranks show the usage for those ranks. I kept Pokemon that have above 1% use in any tier, even if the use in other tiers is below 1% when manually compiling. I am a Pokemon fan and played the game avidly as a kid, though never at a competitive level. Now as adult if I wanted to compete I’d have to pour a lot of time I do not have. So with this Trelliscope I wanted to see how a Pokemon usage changes as you move further up the ranks, not just how popular each Pokemon is at each rank. The ranks were used categorically to avoid the graphs from squeezing together between 0 - 1500, which was a bit of challenge coming to this fix. I used the line plot to see the trend of whether or not use is going up or down as a visual with the line graph.

Each Pokemon was faceted to answer my question about how does the use of certain Pokemon change as you move through the ranks. The data has 91 Pokemon in the list, and showing all of them at once make the Trelliscope unreadable. The Trelliscope solves this crowding problem by letting the user go through pages and you can adjust the rows and columns for how many Pokemon facets are being viewed. Being able to sort through the list from beginner to skilled players is valuable information. I also have a skill_shift and Relative_shift. Skill Shift helps determine if a Pokemon is used at 30% rate by top players but only at 18% by all players the difference is 12 percentage points which means that the particular Pokemon sees more used at higher ranks. Relative shift show the shift a percent increase/decrease of usage to help determine if the Pokemon is being used more than that a Pokemon that already has high use. For example a Pokemon with 5% use goes to 10%, that is a 100% increase in use where 25% to 30% is a 20% increase from its usage through the ranks.

With both the skill_shift and Relative_shift I am able to sort the trellisope and see Pokemon like Kingambit, Basculegion, & Sneasler, among others, are gaining usage at the top ranks. This information is good because if I am about to enter those ranks I can adjust my team to counter or match the Pokemon being used at the top ranks. Other than the challenges above I ran into several issues, such as not being able to install trelliscopejs on my Ubuntu OS(Linux) laptop because R studio has some dependencies needed to being about to complete the installation. When knitting the HMTL file R studio would halt and not knit. After a long arduous fight, contemplating life decisions and wondering why on earth I am doing this. I searched for the halted error of not being able to knit with trelliscopejs and found the answer from Google.

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.1     ✔ readr     2.2.0
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ ggplot2   4.0.4     ✔ tibble    3.3.1
## ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
## ✔ purrr     1.2.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
library(trelliscopejs)
## This package is no longer maintained. Please use the 'trelliscope' package instead (see https://github.com/trelliscope/).
by_pokemon <- read_csv("PokemonVGC.csv", show_col_types = FALSE) %>%
  mutate(cutoff_lab = factor(cutoff_lab, 
                             levels = c("0 (All)", "1500","1630","1760 (top)")))%>%
  group_by(pokemon, mega) %>%
  nest() %>%
  ungroup() %>%
  mutate(
    #panel per pokemon
    panel = map_plot(data, ~ ggplot(.x,aes(x = cutoff_lab, y = usage_pct, group = 1))+
                       geom_line(color = "red", linewidth = 1) +
                       geom_point(color = "red", size = 2) +
                       expand_limits(y=0)+
                       labs(x = "Rating Cutoff", y = "Usage (%)")+
                       theme_dark()
                    ),
    
    cogs = map_cog(data, ~ {
      u0    <- .x$usage_pct[.x$cutoff == 0]
      u1760 <- .x$usage_pct[.x$cutoff == 1760]
      tibble(
        skill_shift = cog(u1760 - u0,
            desc = "Usage at 1760 minus usage from the 0 cutoff to the 1760 cutoff"),
        relative_shift = cog(ifelse(u0 > 0,(u1760 - u0)/u0*100, NA),
            desc = "Percent change in usage from the 0 cutoff to the 1760 cutoff"),
        usage_all = cog(u0, desc = "Usage % with all players weighted equally (0 cutoff)"),
        usage_top = cog(u1760, desc = "Usage % among the top players weighted equally (1760 cutoff)"),
        rank_top = cog(.x$rank[.x$cutoff == 1760], desc = "Usage rank at the 1760 cutoff")
        )
    })
  )
by_pokemon %>%
  trelliscope(
    name = "VGC_Use_by_skill",
    desc = "Pokemon Showdown VGC Oct, 2026; Usage % at each cutoff",
    panel_col = "panel",
    nrow = 2,
    ncol = 4,
    path = "vgc_trelliscope",
    self_contained = TRUE
  
  )
## Removing the following cognostics that are all NA: mega