not_cran <- identical(Sys.getenv("NOT_CRAN"), "true") online <- !is.null(curl::nslookup("r-project.org", error = FALSE)) eval_param <- not_cran & online knitr::opts_chunk$set( eval = eval_param, message = FALSE, warning = FALSE, collapse = TRUE, comment = "#>" ) library(fitzRoy) library(dplyr) dat <- fitzRoy:::stats_fryzigg_2019
We have included a function to interface with the Fryzigg API. This data set includes advanced AFL stats that are typically not available on existing open data sites such as footywire.com and afltables.com. Many thanks to Fryzigg on providing this API interface.
The primary way to access the data is via the fetch_fryzigg_stats()
function. This function provides an easy interface to the Fryzigg API. It takes one arguments - season
which can be a single year or multiple years.
dat <- fitzRoy::fetch_player_stats_fryzigg(2019)
We can get a quick view the the fields returned from the fryzigg
API.
dplyr::glimpse(dat)
You can see the data includes both player and team data, where each row is a game by a player.
head(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.