# \donttest{
# Download single indicator for multiple entities
wdi_get(c("USA", "CAN", "GBR"), "NY.GDP.PCAP.KD")
# Download single indicator for a specific time frame
wdi_get(c("USA", "CAN", "GBR"), "DPANUSSPB",
start_year = 2012, end_year = 2013)
# Download single indicator for monthly frequency
wdi_get("AUT", "DPANUSSPB",
start_year = 2012, end_year = 2015, frequency = "month")
# Download single indicator for quarterly frequency
wdi_get("NGA", "DT.DOD.DECT.CD.TL.US",
start_year = 2012, end_year = 2015, frequency = "quarter")
# Download single indicator for all entities and disable progress bar
wdi_get("all", "NY.GDP.PCAP.KD", progress = FALSE)
# Download multiple indicators for multiple entities
wdi_get(c("USA", "CAN", "GBR"), c("NY.GDP.PCAP.KD", "SP.POP.TOTL"))
# Download indicators for different sources
wdi_get("DEU", "SG.LAW.INDX", source = 2)
wdi_get("DEU", "SG.LAW.INDX", source = 14)
# Download indicators in wide format
wdi_get(c("USA", "CAN", "GBR"), c("NY.GDP.PCAP.KD"),
format = "wide")
wdi_get(c("USA", "CAN", "GBR"), c("NY.GDP.PCAP.KD", "SP.POP.TOTL"),
format = "wide")
# Download most recent value only
wdi_get("USA", "SP.POP.TOTL", most_recent_only = TRUE)
# }
Run the code above in your browser using DataLab