在R中使用WDIAPI:数据问题 库(WDI) 库(校准) WDIsearch(“预期寿命”) #SP.DYN.LE00.IN WDIsearch(“总人口”) #总合 WDIsearch(“人均GDP”) #NY.GDP.PCAP.PP.CD gapmind
这似乎是在R中使用WDIAPI:数据问题 库(WDI) 库(校准) WDIsearch(“预期寿命”) #SP.DYN.LE00.IN WDIsearch(“总人口”) #总合 WDIsearch(“人均GDP”) #NY.GDP.PCAP.PP.CD gapmind,r,R,这似乎是WDI用来获取数据的URL,而且缺少2015年的数据,至少是阿富汗的数据(在其他任何地方都没有尝试过)。请注意空标记: library(WDI) library(calibrate) WDIsearch("life expectancy") #SP.DYN.LE00.IN WDIsearch("population, total") #SP.POP.TOTL WDIsearch("GDP per capita") #NY.GDP.PCAP.PP.CD gapmind <-
WDI
用来获取数据的URL,而且缺少2015年的数据,至少是阿富汗的数据(在其他任何地方都没有尝试过)。请注意空标记:
library(WDI)
library(calibrate)
WDIsearch("life expectancy")
#SP.DYN.LE00.IN
WDIsearch("population, total")
#SP.POP.TOTL
WDIsearch("GDP per capita")
#NY.GDP.PCAP.PP.CD
gapmind <- WDI(country="all", indicator = c("SP.DYN.LE00.IN", "SP.POP.TOTL", "NY.GDP.PCAP.PP.CD"), start=2015, end=2015, extra=TRUE)
我当时有点困惑,因为我班上的其他人似乎都有。
http://api.worldbank.org/countries/AFG/indicators/SP.DYN.LE00.IN?date=2015:2015
<wb:data page="1" pages="1" per_page="50" total="1">
<wb:data>
<wb:indicator id="SP.DYN.LE00.IN">Life expectancy at birth, total (years)</wb:indicator>
<wb:country id="AF">Afghanistan</wb:country>
<wb:date>2015</wb:date>
<wb:value/>
<wb:decimal>0</wb:decimal>
</wb:data>
</wb:data>
http://data.worldbank.org/indicator/SP.DYN.LE00.IN?view=map