1 Star 1 Fork 4

连享会/wid-stata-tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
wid_example3.ado 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
Thomas Blanchet 提交于 2017-06-20 15:40 . Updated date in header
*! wid_example3 v1.0.2 Thomas Blanchet 20jun2017
// Plot the long run evolution of average net national income per adult
// in US, FR, DE and GB, in log scale
program wid_example3
version 13
quietly {
preserve
// Download and store the 2016 USD PPP exchange rate
wid, indicators(xlcusp) areas(FR US DE GB) year(2016) clear
rename value ppp
tempfile ppp
save "`ppp'"
// Download net national income in constant 2016 local currency
wid, indicators(anninc) areas(FR US DE GB) age(992) clear
merge n:1 country using "`ppp'", nogenerate
// Convert to 2016 USD PPP (thousands)
replace value = value/ppp/1000
// Reshape and plot
keep country year value
reshape wide value, i(year) j(country) string
label variable valueFR "France"
label variable valueUS "United States"
label variable valueDE "Germany"
label variable valueGB "United Kingdom"
graph twoway line value* year, yscale(log) ///
ytitle("2016 PPP USD (000')") ylabel(2 5 10 20 50 100) ///
title("Average net national income") subtitle("per adult") ///
note("Source: WID.world")
restore
}
end
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/arlionn/wid-stata-tool.git
git@gitee.com:arlionn/wid-stata-tool.git
arlionn
wid-stata-tool
wid-stata-tool
master

搜索帮助