
fastRhockey: Access Hockey Play-by-Play Data and Statistics
Source:R/fastRhockey-package.R
fastRhockey-package.RdScrape and load hockey play-by-play data and statistics. Sources include the National Hockey League (NHL) https://www.nhl.com/ web, stats, 'NHL Edge' tracking and records application programming interfaces (APIs), the Professional Women's Hockey League https://www.thepwhl.com/, and the American Hockey League, Ontario Hockey League, Western Hockey League and Quebec Maritimes Junior Hockey League through their 'HockeyTech' feeds. It also reads NHL data from 'ESPN' and 'Fox Sports', National Collegiate Athletic Association (NCAA) men's and women's hockey from 'ESPN', and 13 European leagues: Germany's Deutsche Eishockey Liga (DEL), Austria's International Central European (ICE) Hockey League, the United Kingdom's Elite Ice Hockey League (EIHL), Denmark's Metal Ligaen, the Kontinental Hockey League (KHL), Russia's Supreme Hockey League (VHL), the Swedish Hockey League (SHL) and HockeyAllsvenskan, Finland's Liiga, Switzerland's National League and Swiss Ice Hockey Federation competitions, Czechia's Extraliga and France's Ligue Magnus. Loaders read pre-scraped play-by-play, box score, schedule and expected-goals datasets from the 'SportsDataverse' data releases.
Proxy support
All HTTP requests flow through an internal httr2 helper that resolves a proxy in this order:
an explicit
proxy =argument (only on wrappers that pass...);getOption("fastRhockey.proxy")– set once per session withoptions(fastRhockey.proxy = "http://host:port")and every call picks it up;the
http_proxy/https_proxy/no_proxyenvironment variables, read by libcurl when no explicit proxy is supplied.
The proxy value may be a URL string ("http://host:port") or a named list
spread into httr2::req_proxy() for authenticated proxies, e.g.
list(url = "http://host", port = 8080, username = "u", password = "p", auth = "basic"). The session-options() form is recommended when one proxy
covers many calls.
Author
Maintainer: Saiem Gilani saiem.gilani@gmail.com (ORCID)
Authors:
Saiem Gilani saiem.gilani@gmail.com (ORCID)
Ben Howell benhowell71@gmail.com
Other contributors:
Alyssa Longmuir aklongmuir@gmail.com [contributor]
fastRhockey authors [copyright holder]