Description Usage Arguments Value See Also Examples
View source: R/depr_get_metadata.R
This functions stores and returns metadata on each competition.
1 2 3 4 5 | get_metadata(
competition_ids = NA,
latest_european_season = "2020_2021",
output_format = "list"
)
|
competition_ids |
Each competition has a unique competition_id to identify it. If left as NA, the default, all competitions will be returned. From here you can inspect all competition_ids for future use. |
latest_european_season |
e.g. "2019_2020", stick to that format |
output_format |
"list" or "tibble" default is a list |
A list containing the metadata on that competition.
Each element of the output list will be named with the competition_id so you can easily access the required part. Each sub-element is structured as follows:
competition_id
, as described above
competition_region
, typically the country the competition is
played in or the region e.g. Europe, World, etc
competition_name
, full name of the competition
competition_alias
, some competitions change names and are
still refered to as their old name
competition_type
, one of league, cup, friendly
competition_confederation
, uefa, concaf, etc
competition_tier
, if a league type system then this is the
position of the league within the structure
competition_promoted_into
, if a league type system then this
is the competition_id of the league that teams are promoted into
competition_relegated_into
, if a league type system then this
is the competition_id of the league that teams are relegated into
There are some other special sub-elements
football_data
, contains metadata for download results and odds
data from www.football-data.co.uk
Within football_data
there are several sub2-elements:
url_suffix
, each league on the website has a unique code which
is used to construct its url
start_season, end_season
, see sequence_seasons
for season format details
data_type
, either main_league or extra_league. The website had
a set of main leagues for years which are stored as individual csv files.
Extra leagues were added at some point in time but are stored in a single
file per sheet.
More element details will be added to metadata as data sources and coverage expands.
sequence_seasons
1 2 | metadata <- get_metadata()
metadata_subset <- get_metadata(c("eng_pl", "eng_champ"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.