Share.

    7 Kommentare

    1. haydendking on

      Source: NHL API accessed in R

      library(httr)
      library(jsonlite)
      library(dplyr)

      url <- „https://search.d3.nhle.com/api/v1/search/player?culture=en-us&limit=50000&q=*&active=true“

      players <- GET(url) |>
      content(„text“, encoding = „UTF-8“) |>
      fromJSON(flatten = TRUE) |>
      as_tibble()

      players <- players |>
      transmute(
      player_id = playerId,
      name = name,
      birth_city = birthCity,
      birth_state = birthStateProvince,
      birth_country = birthCountry
      )

      Tools: R (packages: dplyr, ggplot2, sf, usmap, tools, ggfx, grid, cowplot, scales, cowplot, showtext, sysfonts, colorspace)

    2. RedFiveIron on

      North American players, I guess. There’s a lot of Europeans in the league that aren’t represented here.

    3. Looks like a lot of the American metro areas are being undercounted because suburbs are treated as individual cities. The Twin Cities, for instance, has a large group of overlapping counts whereas it looks like Toronto’s metro is considered as a unit. Any clarity you can provide?

    4. oedipus_wr3x on

      Wow, that bump over St. Louis is an outlier. I assumed part of it was the Tkachuks, but they were born in Scottsdale and raised in StL.

    5. I feel like you can see the influence of the Solar Bears and the RDV Sportsplex in the large Orlando dot where there isn’t even an NHL team

    Leave A Reply