1 Star 1 Fork 4

连享会/wid-stata-tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
wid_example2.ado 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
Thomas Blanchet 提交于 2017-06-20 15:40 . Updated date in header
*! wid_example1 v1.0.2 Thomas Blanchet 20jun2017
// Plot the evolution of the pre-tax national income of the bottom 50% of the
// population in China, France and the United States since 1978 (in log scale)
program wid_example2
version 13
quietly {
preserve
// Download and store the 2016 USD PPP exchange rate
wid, indicators(xlcusp) areas(FR US CN) year(2016) clear
rename value ppp
tempfile ppp
save "`ppp'"
wid, indicators(aptinc) areas(FR US CN) perc(p0p50) year(1978/2016) ages(992) pop(j) 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 valueCN "China"
graph twoway line value* year, yscale(log) ylabel(1 2 5 10 20) ///
ytitle("2016 PPP USD (000')") ///
title("Average pre-tax national income of the bottom 50%") subtitle("equal-split adults") ///
note("Source: WID.world") legend(rows(1))
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

搜索帮助