Skip to content

Download and store US Distributional National Accounts Data (http://gabriel-zucman.eu/usdina/) using DataDeps.jl

License

Notifications You must be signed in to change notification settings

greimel/DINA.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DINA

Stable Dev Build Status

This package uses DataDeps.jl to download the US distributional national accounts (DINA) dataset from Gabriel Zucman's website. The data are downloaded in bulk (>1GB) and stored in .julia/datadeps/dina/.

The dataset is described in Piketty, T, E. Saez and G. Zucman: Distributional National Accounts: Methods and Estimates for the United States, Quarterly Journal of Economics, 2018, 133 (2): 553-609.

The variables are described in the codebook at Gabriel Zucman's website.

Usage

Load the DINA micro-data by year

using DINA, DataFrames

tbl = get_dina(1980)
df80 = DataFrame(tbl)

or load a quantile-year panel (takes about 1-2 minutes for 1962--2019).

using DINA

inc = :peinc
wgt = :dweght

dbt_var = [:ownermort, :rentalmort, :nonmort, :hwdeb]
var = [[:fiinc, :fninc, :ptinc, inc, :poinc, :ownerhome, :rentalhome]; dbt_var]
byvar = inc # compute deciles of `:peinc`

df = dina_quantile_panel(var, byvar, 10)

This is a picture you can produce using df. Have a look at the documentation for the full code.

About

Download and store US Distributional National Accounts Data (http://gabriel-zucman.eu/usdina/) using DataDeps.jl

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages