get_aux() Get an auxiliary dataset. If no table is specified a vector with possible inputs will be returned.

get_countries() Returns a table countries with their full names, ISO codes, and associated region code

get_aux(
  table = NULL,
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  simplify = TRUE,
  server = NULL,
  assign_tb = FALSE,
  replace = FALSE
)

get_countries(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_regions(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_cpi(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_dictionary(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_gdp(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_incgrp_coverage(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_interpolated_means(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_hfce(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_pop(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_pop_region(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_ppp(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_region_coverage(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

get_survey_means(
  version = NULL,
  ppp_version = NULL,
  release_version = NULL,
  api_version = "v1",
  format = c("rds", "json", "csv"),
  server = NULL
)

Arguments

table

Aux table

version

character: Data version. See get_versions()

ppp_version

ppp year to be used

release_version

date when the data was published in YYYYMMDD format

api_version

character: API version

format

character: Response format either of c("rds", "json", "csv")

simplify

logical: If TRUE (the default) the response is returned as a tibble

server

character: Server. For WB internal use only

assign_tb

assigns table to specified name to the .pip environment. If FALSE no assignment will performed. If TRUE, the table will be assigned to exactly the same name as the one of the desired table. If character, the table will be assigned to that name.

replace

logical: force replacement of aux files in .pip env. Default is FALSE.

Value

If simplify = FALSE, it returns a list of class "pip_api". If simplify = TRUE, it returns a tibble with the requested data. This is the default. Only for get_aux(), If assign_tb = TRUE or character, it returns TRUE when data was assign properly to .pip env. FALSE, if it was not assigned.

Functions

  • get_countries(): Returns a table countries with their full names, ISO codes, and associated region code

  • get_regions(): Returns a table regional grouping used for computing aggregate poverty statistics.

  • get_cpi(): Returns a table of Consumer Price Index (CPI) values used for poverty and inequality computations. statistics

  • get_dictionary(): Returns a data dictionary with a description of all variables available through the PIP API.

  • get_gdp(): Returns a table of Growth Domestic Product (GDP) values used for poverty and inequality statistics.

  • get_incgrp_coverage(): Returns a table of survey coverage for low and lower-middle income countries. If this coverage is less than 50%, World level aggregate statistics will not be computed.

  • get_interpolated_means(): Returns a table of key information and statistics for all years for which poverty and inequality statistics are either available (household survey exists) or extra- / interpolated. Please see get_dictionary for more information about each variable available in this table.

  • get_hfce(): Returns a table of Household Final Consumption Expenditure (HFCE) values used for poverty and inequality computations.

  • get_pop(): Returns a table of population values used for poverty and inequality computations.

  • get_pop_region(): Returns a table of total population by region-year. These values are used for the computation of regional aggregate poverty statistics.

  • get_ppp(): Returns a table of Purchasing Power Parity (PPP) values used for poverty and inequality computations.

  • get_region_coverage(): Return a table of regional survey coverage: Percentage of available surveys for a specific region-year.

  • get_survey_means(): Returns a table of all available surveys and associated key statistics. Please see get_dictionary for more information about each variable available in this table.

Examples

if (FALSE) { # \dontrun{
# Get list of tables
x <- get_aux()

# Get GDP data
df <- get_aux("gdp")

# Get countries
df <- get_aux("countries")

# Display auxiliary tables
get_aux()

# Display and assign to .pip env the selected auxiliary table
get_aux(assign_tb = TRUE)

# Bind gdp table to "gdp" in .pip env
get_aux("gdp", assign_tb = TRUE)

# Bind gdp table to "new_name" in .pip env
get_aux("gdp", assign_tb = "new_name")

} # }
if (FALSE) { # \dontrun{
# Short hand to get countries
get_countries()
} # }
if (FALSE) { # \dontrun{
# Short hand to get regions
get_regions()
} # }
if (FALSE) { # \dontrun{
# Short hand to get cpi
get_cpi()
} # }
if (FALSE) { # \dontrun{
# Short hand to get dictionary
get_dictionary()
} # }
if (FALSE) { # \dontrun{
# Short hand to get gdp
get_gdp()
} # }
if (FALSE) { # \dontrun{
# Short hand to get incgrp_coverage
get_incgrp_coverage()
} # }
if (FALSE) { # \dontrun{
# Short hand to get interpolated_means
get_interpolated_means()
} # }
if (FALSE) { # \dontrun{
# Short hand to get hfce
get_hfce()
} # }
if (FALSE) { # \dontrun{
# Short hand to get pop
get_pop()
} # }
if (FALSE) { # \dontrun{
# Short hand to get pop_region
get_pop_region()
} # }
if (FALSE) { # \dontrun{
# Short hand to get ppp
get_ppp()
} # }
if (FALSE) { # \dontrun{
# Short hand to get region_coverage
get_region_coverage()
} # }
if (FALSE) { # \dontrun{
# Short hand to get survey_means
get_survey_means()
} # }