我感觉好像不是那么好用,也许只是部分数据能够正确引用。他这个例子没问题,其它的数据可能就有问题了。更正一下,我可能之前没把app.s下全,所以有些功能没实现:
(现在发现确实挺好用的:-),比起自己从WBdata里export出去数据,再折腾回来reshape调结构种种方便多了)
总结一下使用步骤:
1、先到world bank data bank上找到想要的变量们
http://databank.worldbank.org/ddp/home.do
2、然后看RePEc上下的那个indicator.txt里有没有那个变量
http://ideas.repec.org/c/boc/bocode/s457234.html
如果有继续下面:
3、ssc install 各种(wbopendata spmap alorenz)
就是那wbopendata help-file里Examples运行出错的时候,大多是因为这些个ado-files没装
4、做例子:(上面的都过了,基本就没什么问题了)
【把那个做手机签约情况矢量地图的例子改了下】
换成欧债课题 (Debt to GDP ratio),矢量地图可以通过限定region来控制绘制范围
【比如俄罗斯面积太大,又过宽过长,影响视觉效果,所以剔除掉】
world-d.dta里面的region变量可以用作此条件,
global debt="gc.dod.totl.gd.zs"
global gdppc="ny.gdp.pcap.pp.cd"
tempfile tmp
wbopendata, language(en - English) ///
indicator($debt) long clear ///
latest
sort countrycode
save `tmp', replace
sysuse world-d, clear
merge countrycode using `tmp'
sum year
local avg = string(`r(mean)',"%16.1f")
spmap gc_dod_totl_gd_zs ///
if region=="Europe & Central Asia (all income levels)" ///
& countrycode!="RUS" ///
using "world-c.dta", id(_ID) ///
clnumber(20) fcolor(Greens2) ocolor(none ..) ///
title("Central government debt, total (% of GDP)", size(*1.2)) ///
legstyle(3) legend(ring(1) position(3)) ///
note(latest available year: `avg',size(*0.7))