Skip to contents

Watch on GitHub Star on GitHub Follow on Twitter

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.

Originally rOpenGov/sorvi was a fork of juusohaapanen/soRvi-dev but rOpenGov’s sorvi branch has since taken a life of its own. The fork was detached fron juusohaapanen’s branch in November 2021.


You can install the development version of sorvi from GitHub with:

# install.packages("devtools")

Development version can be also installed using the r-universe:

# Enable this universe
options(repos = c(
  ropengov = "",
  CRAN = ""

There is still a CRAN release version of sorvi and while it passes CRAN checks without problems it contains mostly outdated functions. It is therefore highly recommended to use development version of the package.

Using the package

Loading the package in R:

Get download statistics of eurostat-package, by year:

df <- cran_downloads(pkgs = "eurostat", sum = "by_year", use.cache = FALSE)
#> # A tibble: 5 × 3
#> # Groups:   year [5]
#>    year package      n
#>   <dbl> <fct>    <int>
#> 1  2017 eurostat 12482
#> 2  2018 eurostat 18932
#> 3  2019 eurostat 28454
#> 4  2020 eurostat 31298
#> 5  2021 eurostat 30307

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)

For more (partly outdated) examples, check the tutorial page.



Kindly cite this work as follows: Leo Lahti, Juuso Parkkinen, Joona Lehtomäki, Pyry Kantanen. sorvi - Finnish Open Data Toolkit. URL:

We are grateful to Jussi Paananen, Einari Happonen, Juuso Haapanen, and all other contributors! This project is part of rOpenGov.