THL Open API R package

The openthl R package provides tools to work with THL Open API.

Installation

Install the current devel version in R:

devtools::install_github("ropengov/openthl")

Test the installation by loading the library:

library(openthl)

We also recommend setting the UTF-8 encoding:

Sys.setlocale(locale="UTF-8") 

Examples

library(openthl)

x <- thlSubject("epirapo") # S3 class "thlSubject" 
datasets <- thlDatasets(x) # S3 class "thlDatasets"

Licensing and Citations

This work can be freely used, modified and distributed under the open license specified in the DESCRIPTION file.

Kindly cite the work as follows

citation("openthl")
## Kindly cite the hetu R package as follows:
## 
##   (C) Tuomo Nieminen, Leo Lahti (2020).  R package for THL Open API
##   (openthl).  URL: http://github.com/rOpenGov/openthl
## 
## A BibTeX entry for LaTeX users is
## 
##   @Misc{,
##     title = {R package for THL Open API (openthl)},
##     author = {Tuomo Nieminen and Leo Lahti},
##     year = {2020},
##   }
## 
## Many thanks for all contributors!

Session info

This vignette was created with

sessionInfo()
## R version 4.6.0 (2026-04-24)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.4 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: Etc/UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] openthl_0.1.1  rmarkdown_2.31
## 
## loaded via a namespace (and not attached):
##  [1] vctrs_0.7.3      httr_1.4.8       cli_3.6.6        knitr_1.51      
##  [5] rlang_1.2.0      xfun_0.58        generics_0.1.4   jsonlite_2.0.0  
##  [9] glue_1.8.1       buildtools_1.0.0 htmltools_0.5.9  maketools_1.3.2 
## [13] sys_3.4.3        sass_0.4.10      evaluate_1.0.5   jquerylib_0.1.4 
## [17] tibble_3.3.1     fastmap_1.2.0    yaml_2.3.12      lifecycle_1.0.5 
## [21] compiler_4.6.0   dplyr_1.2.1      pkgconfig_2.0.3  digest_0.6.39   
## [25] R6_2.6.1         tidyselect_1.2.1 utf8_1.2.6       pillar_1.11.1   
## [29] curl_7.1.0       magrittr_2.0.5   bslib_0.11.0     tools_4.6.0     
## [33] cachem_1.1.0