Skip to contents

Player locations

players by rank

location_dat <- 
  src_df %>% 
    select(player_name, location, rank) %>% 
    distinct() %>% 
    ungroup() %>% 
    mutate(location = if_else(
      location %in% c("missing", "NaN"),
      "*Missing*",
      location
    )) %>% 
    group_by(location) %>% 
    summarise(
      players = n(),
      highest_rank = min(rank),
      median_rank = median(rank) %>% round(),
      lowest_rank = max(rank)
    ) 
#> Error in UseMethod("select"): no applicable method for 'select' applied to an object of class "function"

location_dat %>% 
  arrange(highest_rank) %>% 
  gt() %>% 
  tab_header(title = "Best-ranked players ranks by location")
#> Error in eval(expr, envir, enclos): object 'location_dat' not found

For dashboard, would be good to see where most players are

location_dat %>% 
  arrange(desc(players)) %>% 
  gt() %>% 
  tab_header(title = "Where the most players are")
#> Error in eval(expr, envir, enclos): object 'location_dat' not found

Todo leaflet