# \donttest{
# Return all indicators for Kenya from 2000
am_data("KEN", from = 2000)
# Return all indicators for Kenya from 2000 in long format
am_data("KEN", from = 2000, wide = FALSE)
# Return with date expanded
am_data("KEN", from = 2000, expand.date = TRUE)
# Same thing in multiple steps (with additional customization options):
am_data("KEN", from = 2000, wide = FALSE) |> am_pivot_wider() |> am_expand_date()
# Getting only GDP growth
am_data("KEN", "NGDP_RPCH", from = 2000)
# Getting GDP growth for all countries
am_data(series = "NGDP_RPCH", from = 2000)
# Reshaping to wider format
am_data(series = "NGDP_RPCH", from = 2000) |>
am_pivot_wider(id_cols = "Date",
names_from = "ISO3",
values_from = "NGDP_RPCH")
# Getting growth and inflation for the EAC countries (all available years)
am_data(ctry = c("UGA", "KEN", "TZA", "RWA", "BDI", "SSD"),
series = c("NGDP_RPCH", "PCPIPCH"))
# }
Run the code above in your browser using DataLab