getWDItoSYB: Access to World Bank WDI API

View source: R/getWDItoSYB.R

getWDItoSYBR Documentation

Access to World Bank WDI API

Description

The function downloads data from the World Bank API.

Usage

getWDItoSYB(
  indicator = "SP.POP.0014.TO.ZS",
  name = NULL,
  startDate = 1960,
  endDate = format(Sys.Date(), "%Y"),
  printURL = FALSE,
  getMetaData = TRUE,
  printMetaData = FALSE,
  saveMetaData = FALSE,
  outputFormat = c("wide", "long")
)

Arguments

indicator

The World Bank official indicator name.

name

The new name to be used in the column.

startDate

The start date for the data to begin

endDate

The end date.

printURL

Whether the url link for the data should be printed

getMetaData

Whether the data definition and the meta data should be downloaded as well.

printMetaData

logical, print out the meta data information

saveMetaData

logical, whether meta data should be saved as a local csv file

outputFormat

The format of the data, can be 'long' or 'wide'.

Value

A list containing the following elements

data

The country level data

aggregates

The aggregates provided by the World Bank

metaData

The metaData associated with the data

results

The status of the download, whether success/failed

See Also

getWDI, getFAO

Examples

## pop.df = getWDItoSYB(name = "total_population",
##                      indicator = "SP.POP.TOTL")



FAOSTAT documentation built on March 31, 2023, 8:31 p.m.