R/get_metadata.R
flx_get_metadata.RdRetrieves core bibliographic metadata for one or more Finnish statutes from the Finlex Open Data API: the date of issue, the official title, and the number of sections (Finnish: pykälät) in the statute text.
flx_get_metadata(year, number)A tibble::tibble() with one row per (year, number) pair and
the columns:
As supplied.
As supplied.
One of "ok", "not_found", or "error".
Date the statute was issued, as a Date.
The statute's official title.
Integer. Number of section elements found in the
Akoma Ntoso document — a rough, purely structural proxy for
statute length.
This function intentionally returns only raw, directly observed fields. Any derived classification (for example, grouping statutes into categories such as "Act", "Decree", or "Decision" based on title patterns) is left to a separate function, since that involves methodological choices rather than data retrieval.
# \donttest{
flx_get_metadata(year = 1992, number = 1535) # Tuloverolaki
#> # A tibble: 1 × 6
#> year number status date_issued title n_sections
#> <int> <int> <chr> <date> <chr> <int>
#> 1 1992 1535 ok 1992-12-30 Tuloverolaki 155
# }