getData: Get Data

Description Usage Arguments Value Author(s) See Also Examples

Description

Get data by indicator, year, country, region.

Usage

1
getData(indicator, year = NULL, country = NULL, region = NULL)

Arguments

indicator

ID (character) of the desired indicators; one or more IDs are allowed.

year

year (numeric or character) for which data are desired; one or more years allowed. The default value, NULL, leads to the use of all available years.

country

ID (character) of the desired countries; one or more IDs are allowed. The default value, NULL, leads to the use of all available countries.

region

ID (numeric or character) of the desired region; only one ID is allowed.

Value

Dataframe with five columns: Yr, IndID, RegID, CntrID, and val.

Author(s)

brechtdv@gmail.com

See Also

getIndicatorGroups to extract the set of available indicator groups
getIndicators to extract the set of available indicators
findIndicators to find indicators based on a text string
getDefinitions to extract the definitions of the indicators
getYears to extract the set of available years
getCountries to extract the set of available countries
getRegions to extract the set of available regions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## Not run: 

## connect to EURO HFA-DB
## this is the default database and is loaded at startup
setHFADB("http://sic.hi.lt/DPS/ws/dps_ws.php")

## show available languages, regions, indicator groups
getLanguages()
getRegions()
getIndicatorGroups()

## show available countries for 'EUR' region
getCountries("EUR")

## show indicators belonging to group 4
getIndicators(4)

## find indicators related to 'food'
findIndicators("food")

## show definition of indicator '4010' and '4021'
getDefinitions(c("4010", "4021"))

## extract data for indicator '4010' and '4021' for Belgium
## by not specifying 'year', we extract data for all years
getData(c("4010", "4021"), country = "BEL")


## End(Not run)

brechtdv/HFA documentation built on May 13, 2019, 5:06 a.m.