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

## R version 3.6.1 (2019-07-05)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Catalina 10.15.6
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] openthl_0.1.1
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.2       rstudioapi_0.10  knitr_1.25       magrittr_1.5    
##  [5] R6_2.4.0         rlang_0.4.1      stringr_1.4.0    httr_1.4.2      
##  [9] tools_3.6.1      xfun_0.9         htmltools_0.3.6  yaml_2.2.0      
## [13] assertthat_0.2.1 digest_0.6.21    rprojroot_1.3-2  tibble_2.1.3    
## [17] pkgdown_1.6.1    crayon_1.3.4     fs_1.3.1         curl_4.2        
## [21] memoise_1.1.0    evaluate_0.14    rmarkdown_1.15   stringi_1.4.3   
## [25] compiler_3.6.1   pillar_1.4.2     desc_1.2.0       backports_1.1.4 
## [29] jsonlite_1.6     pkgconfig_2.0.3