Skip to contents

Finnish open (government) data toolkit for R

Introduction

sorvi package was originally intended for hosting various algorithms for Finnish open goverment data in R. After being superseded by later rOpenGov packages that are more specialized in scope (such as geofi, hetu and pxweb), sorvi has now found a new life in hosting various functions that are helpful in rOpenGov package maintenance, authoring and preparing presentations.

Installation

Install the stable release version from CRAN in R:

Alternatively, use remotes package to install the latest development version from GitHub:

library(remotes)
remotes::install_github("ropengov/sorvi")

Loading the package in R command line:

Using the package

The number of functions in this package has been reduced compared to older versions.

Get download statistics of eurostat-package, by year:

df <- cran_downloads(pkgs = "eurostat", sum = "by_year", use.cache = FALSE)
df

Get download statistics of various rOpenGov packages over time and draw a chart:

packages <- c("eurostat", "giscoR", "sotkanet", "geofi", "sweidnumbr")
plot <- cran_downloads(pkgs = packages, sum = "total", output = "plot", use.cache = FALSE)
plot

Further data sets

Possible new data sets to include are listed in the wiki.

Licensing and Citations

This work can be freely used, modified and distributed under the Two-clause BSD license.

citation("sorvi")
#> 
#> Kindly cite the sorvi R package as follows:
#> 
#>   Leo Lahti, Juuso Parkkinen, Joona Lehtomaki, Juuso Haapanen, Einari
#>   Happonen, Jussi Paananen and Pyry Kantanen (2022). sorvi: Finnish
#>   open data toolkit for R. R package version 0.8.20 URL:
#>   https://github.com/rOpenGov/sorvi
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Misc{,
#>     title = {sorvi: Finnish open government data toolkit for R},
#>     author = {Leo Lahti and Juuso Parkkinen and Joona Lehtomaki and Juuso Haapanen and Einari Happonen and Jussi Paananen and Pyry Kantanen},
#>     doi = {10.5281/zenodo.10280},
#>     url = {https://github.com/rOpenGov/sorvi},
#>     year = {2022},
#>     note = {R package version 0.8.20},
#>   }
#> 
#> Many thanks for all contributors!

Session info

This vignette was created with

sessionInfo()
#> R version 4.2.0 (2022-04-22)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 20.04.4 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
#> 
#> locale:
#>  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
#>  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
#>  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
#> [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] sorvi_0.8.20
#> 
#> loaded via a namespace (and not attached):
#>  [1] pillar_1.7.0       bslib_0.3.1        compiler_4.2.0     RColorBrewer_1.1-3
#>  [5] jquerylib_0.1.4    tools_4.2.0        digest_0.6.29      lubridate_1.8.0   
#>  [9] tibble_3.1.7       jsonlite_1.8.0     evaluate_0.15      memoise_2.0.1     
#> [13] lifecycle_1.0.1    checkmate_2.1.0    gtable_0.3.0       pkgconfig_2.0.3   
#> [17] rlang_1.0.2        cli_3.3.0          yaml_2.3.5         pkgdown_2.0.3     
#> [21] xfun_0.31          fastmap_1.1.0      xml2_1.3.3         httr_1.4.3        
#> [25] dplyr_1.0.9        stringr_1.4.0      knitr_1.39         generics_0.1.2    
#> [29] vctrs_0.4.1        desc_1.4.1         fs_1.5.2           sass_0.4.1        
#> [33] systemfonts_1.0.4  dlstats_0.1.5      tidyselect_1.1.2   rprojroot_2.0.3   
#> [37] grid_4.2.0         glue_1.6.2         R6_2.5.1           textshaping_0.3.6 
#> [41] gh_1.3.0           fansi_1.0.3        rmarkdown_2.14     tidyr_1.2.0       
#> [45] purrr_0.3.4        ggplot2_3.3.6      magrittr_2.0.3     ellipsis_0.3.2    
#> [49] backports_1.4.1    scales_1.2.0       htmltools_0.5.2    rvest_1.0.2       
#> [53] colorspace_2.0-3   ragg_1.2.2         utf8_1.2.2         stringi_1.7.6     
#> [57] munsell_0.5.0      cachem_1.0.6       crayon_1.5.1

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher