igebase: Download data from the IGE API

Description Usage Arguments Value Examples

Description

This function downloads the requested information using the IGE API.

Usage

1
2
3
igebase(igebase_ID, code_region = NA, region = NA, POSIXct = FALSE,
  label = FALSE, startdate, enddate, freq, show_metadata = FALSE,
  cache)

Arguments

igebase_ID

A character string or numeric value. The ID code of the requested table. This ID corresponds to the ID column from cache.

code_region

Character string or regular expression to be matched. It is used to find a region using the province or municipality code is provided by INE. This parameter can not be use with region.

region

Character string or regular expression to be matched. It is used to find a region by its name. This parameter can not be used with code_region.

POSIXct

if TRUE, two new columns, periodo and periodicidade are added. Useful for freq filter, if FALSE, these fields are not added.

label

if TRUE, the label of te requested dataframe is returned, if FALSE it is not returned.

startdate

Character string. Must be in "yyyy-mm-dd" form.

enddate

Character string. Must be in "yyyy-mm-dd" form.

freq

Character string. For fetching yearly ("anual"), quaterly ("trimestral"), monthly ("mensual") values.

show_metadata

if FALSE, only get the data frame if TRUE, show information of metadata, used in igebase_get.

cache

Data frame with tables from IGE API.

Value

Data frame with all available requested data.

Examples

1
2
3
4
5
6
7
8
# Información climatolóxica por meses e estacións meteorolóxicas.
df <- igebase(1651, POSIXct = TRUE, label = TRUE, freq = "anual", show_metadata = TRUE)

# Autosuficiencia en emprego using 'code_region'.
df <- igebase(7405, code_region ="15|12", label = TRUE)

# Autosuficiencia en emprego using 'region'.
df <- igebase(7405, region ="Galicia|Vigo")

jmcartiles/igebaser documentation built on May 10, 2019, 2:44 p.m.