bis_dl: Download data from the PRH open data API

Description Usage Arguments Value Examples

View source: R/bis_dl.R

Description

Download information related to the given Business ID from the Business Information System API. The language of the result can be set with the lang-parameter.

Usage

1
bis_dl(id, excl_langs = character(0), return_type = "tbl")

Arguments

id

The business ID of the company. Must be of the format 1111111-1, ie. seven digits followed by a dash and a checksum digit.

excl_langs

A character vector of the languages to be excluded from the results. By default, some of the fields return the same information in Finnish, Swedish and English. The value can therefore be for example c("SE", "EN") to only return the results in Finnish or "FI" to only return the results in English. Defaults to character(0), ie. the results are returned in all available languages.

return_type

The return type. Either "tbl" for returning a one row tibble with columns as the fields, or "list" for returning a a list. A list is probably simpler for accessing a single result while a tibble might be more convenient when combining multiple results. Defaults to "tbl".

Value

A tibble with one row where each column is a field returned by the API or a list with the elemnents corresponding to the fields. All NULLs are converted to NAs. For more information about the API, see http://avoindata.prh.fi/ytj_en.html. For information about the business line classification, see http://www.stat.fi/meta/luokitukset/toimiala/001-2008/index_en.html.

Examples

1
2
3
library(simpleprh)
# Download information related to Nokia Oyj
bis_dl("0112038-9")

paasim/simpleprh documentation built on Jan. 2, 2021, 10:24 p.m.