Access Open Data from the Finnish 'Finlex' Legislative Database

Provides functions to retrieve and structure Finnish legislative data made available through the 'Finlex' Open Data API (< https://www.finlex.fi/en/open-data>). Functions cover retrieval of statute catalogues, statute titles, structured statute metadata, and cross-references between amending and amended statutes, returned as tidy tibbles for further analysis.


finlex

Documentation site

R-CMD-check CRAN status

finlex provides R functions to retrieve and structure Finnish legislative data from the Finlex Open Data API. finlex logo

Installation

# install.packages("pak")
pak::pak("KristianVepsalainen/finlex")

Usage

library(finlex)

# All new statutes issued in 2023
statutes <- flx_download_statutes(
  start_year = 2023, end_year = 2023,
  categories = "new-statute"
)

# Title of a single statute
flx_get_title(year = 1992, number = 1535) # Tuloverolaki (Income Tax Act)

# Structured metadata: date issued, title, number of sections
flx_get_metadata(year = 1992, number = 1535)

# What statutes does a given amending statute affect?
flx_get_affected(year = 2023, number = 2)

Status

The package is at a very early stage of development (0.0.0.9000). The first goal is to reach a CRAN-ready baseline of functionality.

Using finlex commercially?

finlex is released under the MIT license, so you're free to use it in commercial products and services with no obligation to ask permission. That said, if you do use it commercially or in research, I'd genuinely love to hear about it — drop a line at [email protected]. It's not required, just appreciated.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("finlex")

0.2.1 by Kristian Vepsäläinen, 2 months ago


https://github.com/KristianVepsalainen/finlex, http://kristianvepsalainen.com/finlex/


Report a bug at https://github.com/KristianVepsalainen/finlex/issues


Browse source code at https://github.com/cran/finlex


Authors: Kristian Vepsäläinen [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports dplyr, httr2, tibble, xml2

Suggests knitr, rmarkdown, spelling, testthat, pkgdown


See at CRAN