Skip to contents

Return auxiliary data tables

Usage

pip_aux(
  table = NULL,
  release_version = NULL,
  ppp_version = NULL,
  version = NULL
)

Arguments

table

character(1) table to be returned. Default NULL.

release_version

character(1) version of the data release in YYYYMMDD format. Default NULL.

ppp_version

character(1) | numeric(1) version of the data. Default NULL.

version

character(1) version of the data. Default NULL.

Value

A character() with the available tables or a data.frame() containing the table data.

See also

Other poverty and inequality statistics: pip_citation(), pip_data(), pip_group(), pip_health_check(), pip_info(), pip_valid_params(), pip_versions()

Examples

# \donttest{
# get a list of available tables
pip_aux()
#>  [1] "aux_versions"           "countries"              "country_coverage"      
#>  [4] "country_list"           "cpi"                    "decomposition"         
#>  [7] "dictionary"             "framework"              "gdp"                   
#> [10] "incgrp_coverage"        "indicators"             "interpolated_means"    
#> [13] "metaregion"             "missing_data"           "national_poverty_lines"
#> [16] "pce"                    "pg_lnp"                 "pg_svy"                
#> [19] "pop"                    "pop_region"             "poverty_lines"         
#> [22] "ppp"                    "region_coverage"        "regions"               
#> [25] "spr_lnp"                "spr_svy"                "survey_means"          

# get countries
pip_aux("countries")
#> # A tibble: 170 × 8
#>    country_code country_name   africa_split africa_split_code region region_code
#>    <chr>        <chr>          <chr>        <chr>             <chr>  <chr>      
#>  1 AGO          Angola         Eastern and… AFE               Sub-S… SSA        
#>  2 ALB          Albania        NA           NA                Europ… ECA        
#>  3 ARE          United Arab E… NA           NA                Other… OHI        
#>  4 ARG          Argentina      NA           NA                Latin… LAC        
#>  5 ARM          Armenia        NA           NA                Europ… ECA        
#>  6 AUS          Australia      NA           NA                Other… OHI        
#>  7 AUT          Austria        NA           NA                Other… OHI        
#>  8 AZE          Azerbaijan     NA           NA                Europ… ECA        
#>  9 BDI          Burundi        Eastern and… AFE               Sub-S… SSA        
#> 10 BEL          Belgium        NA           NA                Other… OHI        
#> # ℹ 160 more rows
#> # ℹ 2 more variables: world <chr>, world_code <chr>

# get GDP
pip_aux("gdp")
#> # A tibble: 10,560 × 4
#>    country_code data_level  year  value
#>    <chr>        <chr>      <int>  <dbl>
#>  1 ABW          national    1977    NA 
#>  2 ABW          national    1978    NA 
#>  3 ABW          national    1979    NA 
#>  4 ABW          national    1980    NA 
#>  5 ABW          national    1981    NA 
#>  6 ABW          national    1982    NA 
#>  7 ABW          national    1983    NA 
#>  8 ABW          national    1984    NA 
#>  9 ABW          national    1985    NA 
#> 10 ABW          national    1986 16112.
#> # ℹ 10,550 more rows

# get CPI
pip_aux("cpi")
#> # A tibble: 8,084 × 4
#>    country_code data_level  year value
#>    <chr>        <chr>      <int> <dbl>
#>  1 AGO          national    1977    NA
#>  2 AGO          national    1978    NA
#>  3 AGO          national    1979    NA
#>  4 AGO          national    1980    NA
#>  5 AGO          national    1981    NA
#>  6 AGO          national    1982    NA
#>  7 AGO          national    1983    NA
#>  8 AGO          national    1984    NA
#>  9 AGO          national    1985    NA
#> 10 AGO          national    1986    NA
#> # ℹ 8,074 more rows
# }