Retrieves the official title of one or more Finnish statutes from the Finlex Open Data API, given each statute's year and number.

flx_get_title(year, number)

Arguments

year

Integer vector. Year(s) of the statute(s).

number

Integer vector. Number(s) of the statute(s) within that year. Recycled against year if shorter.

Value

A tibble::tibble() with one row per (year, number) pair and the columns:

year

As supplied.

number

As supplied.

status

One of "ok", "not_found", or "error".

title

The statute's official title, or NA if unavailable.

Details

Not every statute in Finnish legal history is available through the Finlex Open Data API (very old statutes in particular are not covered). When a statute cannot be found, status is set to "not_found" rather than raising an error, so that vectorized calls complete even when some statutes are missing.

Examples

# \donttest{
flx_get_title(year = 1992, number = 1535) # Tuloverolaki
#> # A tibble: 1 × 4
#>    year number status title       
#>   <int>  <int> <chr>  <chr>       
#> 1  1992   1535 ok     Tuloverolaki
flx_get_title(year = c(1992, 1993), number = c(1535, 1501))
#> # A tibble: 2 × 4
#>    year number status title            
#>   <int>  <int> <chr>  <chr>            
#> 1  1992   1535 ok     Tuloverolaki     
#> 2  1993   1501 ok     Arvonlisäverolaki
# }