openPolandData: Loads a full or filtered data from a selected dataset via...

Description Usage Arguments Value See Also Examples

Description

openPolandData returns a data frame with data from a dataset with given ID. The data could be filtered by year or NTS id.

Usage

1
2
openPolandData(id = NULL, token = NULL, nts = NULL, year = NULL,
  dimLabels = TRUE, remove_duplicated = TRUE)

Arguments

id

A character string.

token

A characters string.

nts

A character string.

year

A character string.

dimLabels

Logical value. if TRUE (default) the function automatically merges meta data (dimensions names and labels) with raw data.

remove_duplicated

A logical value. If TRUE (default) removes all duplicated records from the datasets.

Value

A data table object. The first column is a NTS id of territorial unit. The second column is a common name of territorial unit. Then there are from 1 to 5 columns with dimensions labels. All dimensions in a given dataset can be previewed by the openPolandMeta function. Last four columns of the data table are: year, measure unit, value and data attribute.

See Also

openPolandMeta for getting meta information about datasets, openPolandSearch for searching database with a given query and openPolandFilter for filtering dataset with given criterias.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

openPolandSearch("akad")
#     id                                     title
# 1 1836 Nauczyciele akademiccy (NTS-2, 1999-2012)

# token for API authorization
token = "[alpha-numeric-string-you-get-after-registration-on-https://openpoland.net]"

# a fltered dataset with data for 1999 year in Central Region (NTS = 1000000000)
openPolandData(id = 1836, token = token,nts = '1000000000', year='1999')

# a whole, unfiltered dataset
openPolandData(id = 1836, token = token)

## End(Not run)

kalimu/openPoland documentation built on May 20, 2019, 6:32 a.m.