Getting Started: WiNDC Build Stream
Utilities and Dataset Description
The WiNDC build routine is a collection of GAMS programs that generate subnational economic accounts for input-output or computable general equilibrium models of the United States economy. All code and data necessary for producing subnational accounts are provided in this repository. Currently, the routine can produce state level accounts with one representative agent per region and with disaggregated consumer accounts.
We begin with the national input-output table of the Bureau of Economic Analysis (BEA) and downscale to the regional level using publicly available economic statistics from government agencies. We use additional data from the BEA on regional gross product and consumer expenditures and data from the Census Bureau on foreign trade and state government expenditures. We show how to combine publicly avialable data from these sources and other government agencies to compile a database that serves as input data for the core WiNDC buildstream. The core WiNDC buildstream generates the core WiNDC database. The database contains multisectoral subnational economic datasets for the years 1997 to 2017.
The WiNDC household buildstream is an extension to the core WiNDC buildstream. The core WiNDC database features a state level dataset with a single represenatative agent per region. This dataset provides a means for a spatially denominated distributional analysis, but not for an analysis within consumer types. There are various methods that may be used to disaggregate consumer accounts. We approach this problem from the income side and generate two version of the household dataset: one is based on the Current Population Survey (CPS) from the Census Bureau and the other is based on the Statistics of Income (SOI) from the IRS. Both versions of the dataset use some information from the other data source and delineate five household types per region. The household datasets cover the years 2015 to 2017.
The third part of the WiNDC buildstream is the Bluenote buildstream. The Bluenote buildstream incorporates energy-environment satellite data from the State Energy Data System (SEDS) to the household datasets.
Download
The WiNDC build stream package (13.8 MB).
The WiNDC buildstream package includes a GDX file with all data sources and the code that generates the core WiNDC database, the WiNDC household datasets and the datasets of the energy-environment module (Bluenote).
Links
Note
The GAMS code is platform-independent.
The files for generating the core WiNDC database and the datasets of the economy-environment module (Bluenote) are described in the WiNDC paper.
The Core WiNDC Buildstream: Core Database and Template Models
If you are interested only in the core WiNDC database, you can download it in GDX format (45.4 MB). If you are interested in details of the build and the template models, please follow the steps outlined below.
- Download the WiNDC buildstream package: windc_build_3_0.zip (13.8 MB).
-
Unzipping the file will create a directory called
windc_build_3_0
with the subdirectoriescore
,household
andbluenote
. Go to the subdirectorycore
. This directory contains the input data in GDX format, all GAMS routines needed to generate the core WiNDC database and the GAMS code for the template models. If you are interested in details of the input data, see Getting Started: WiNDC Data System. -
If you have a local version of GAMS and have access to the relevant licenses,
navigate in your command line or terminal to the directory
windc_build_3_0
, subdirectorycore
and run the GAMS filebuild.gms
by simply typing the following command:gams build.gms
-
Two versions of the core WiNDC database will be generated and saved in the directory
core
:WiNDCdatabase.gdx
andWiNDCdatabase_huber
. The first version is based on the least squares matrix balancing routine and the second version is based on the Huber method. Both databases contain data for all US states and 69 (summary) sectors from 1997 to 2017. -
If you don't have access to a GAMS license including needed solver licenses,
you can generate the databases locally using
NEOS.
To run the routines on NEOS, type the following command:
gams build.gms --neos=yes
-
Once the core WiNDC database is generated, it can be loaded into a general equilibrium
model in GAMS. The file
windc_coredata.gms
demonstrates how to read data from the database and extract data for a specific year. The filereplicate.gms
includes a simple general equilibrium model in MCP and MPSGE format, verifies benchmark consistency, solves a counterfactual (tariff shock) and verifies consistency at that point as well.
WiNDC Household Buildstream: Household Datasets
As noted above, the WiNDC household buildstream is an extension to the core WiNDC buildstream. The household buildstream generates disaggregated consumer accounts based on the core WiNDC database, CPS and SOI data. The key challenges were denominating reasonable transfer income and understanding income tax liabilities, savings, capital ownership versus demands, salaries and wages. We provide a static and a dynamic calibration and use income elasticities to separate household level commodity expenditures. The presentation on the household build at the WiNDC Annual Meeting 2021 offers a detailed description of the calibration routine.
If you haven't alreday done so, download the WiNDC buildstream package
windc_build_3_0.zip (13.8 MB). Unzipping the file will create a directory
called windc_build_3_0
with the subdirectories core
,
household
and bluenote
. Go to the subdirectory household
.
This directory contains the necessary input data (subdirectory data_sources
)
and all GAMS code needed to generate the WiNDC household datasets for the years 2015 to 2017.
In addition to the data in the subdirectory data_sources
, the WiNDC household
buildstream takes as input the core WiNDC database, so make sure that the GDX file
WiNDCdatabase.gdx
is in the directory core
.
If you have a local version of GAMS and access to the relevant licenses,
navigate in your command line to the directory household
and run the GAMS file build.gms
by typing the following command:
gams build.gms
The code creates the directory datasets
, generates the household datasets
and saves all household datasets in this directory. The code in the file build.gms
runs the following routines for the years 2015, 2016 and 2017.
-
cps_data.gms
Reads Current Population Survey (CPS) data from the directorydata_sources
, subdirectorycps
, processes it and saves the processed data in a GDX file in the directorygdx
. -
soi_data.gms
Reads Statistics of Income (SOI) data from the directorydata_sources
, subdirectorysoi
, processes it and saves the processed data in a GDX file in the directorygdx
. The routine also computes and saves data on capital gains that will be used to construct the CPS dataset. -
hhcalib.gms
Reads a household dataset (CPS or SOI) and recalibrates it to match the core WiNDC database. There are two calibration options:static
anddynamic
. The dynamic option forces investment to line up with reported capital demands for a balanced growth path. This impacts the calibration of the household accounts since total savings need to equal total investment. The calibration routine uses income elasticities (estimated on the national level) based on the Consumer Expenditure Survey (CEX) from the Bureau of Labor Statistic (BLS). The resulting parameters are saved in a GDX file in the directorygdx
. The capital tax rate is saved in its own file and is used in the next routine. -
dynamic_calib.gms
Reads the dynamic datasets and recalibrates the rest of the commodity accounts to satisfy balanced growth requirements; saves the recalibrated parameters in a GDX file in the directorygdx
. -
consolidate.gms
Merges the household data of each type to one GDX file and saves the resulting files to the directorydatasets
. There are four files:static dynamic CPS WiNDC_cps_static.gdx
WiNDC_cps_dynamic.gdx
SOI WiNDC_soi_static.gdx
WiNDC_soi_dynamic.gdx
-
aggr.gms
This aggregation routine is optional.
Aggregates the four household datasets to given economic sectors and regions. The environment variablesmap
denotes the sectoral aggregation andrmap
denotes the regional aggregation. The options forsmap
arewindc
(the 69 WiNDC sectors),bluenote
(the sectors of the WiNDC energy-environment module),gtap
(GTAP sectors) andmacro
(6 sectors). The options forrmap
arestate
(US states) andcensus
( 9 Census regions). The routine reads the relevant mapping from the subdirectorymaps
; users can easily create their own maps for customized sectoral and regional aggregations. The aggregated datasets are saved in the directorydatasets
.
Bluenote Buildstream: Energy-Environment Datasets and Template Models
The Bluenote buildstream incorporates energy-environment satellite data from the State Energy Data System (SEDS) to the WiNDC household datasets.
If you haven't alreday done so, download the WiNDC buildstream package
windc_build_3_0.zip (13.8 MB). Unzipping the file will create a directory
called windc_build_3_0
with the subdirectories core
,
household
and bluenote
. Go to the subdirectory bluenote
.
This directory contains the GAMS code needed to generate datasets with disaggreagted consumer
accounts that include energy-environment satellite data. The buildstream is based on the
source data for the core WiNDC buildstream (the GDX file windc_base.gdx
in the
directory core
) that includes data from SEDS and the WiNDC household datasets
WiNDC_cps_static.gdx
and WiNDC_soi_static.gdx
in the
directory household
, subdirectory datasets
. Please make
sure that you run the WiNDC household build
first in order to generate the necessary household datasets.
If you have a local version of GAMS and access to the relevant licenses,
navigate in your command line to the directory bluenote
and run the GAMS file build.gms
by typing the following command:
gams build.gms
The code creates the directory datasets
, generates the Bluenote datasets
for the years 2015 to 2017 and saves the datasets in this directory. The GAMS routines
that generate the Bluenote datasets are described in the WiNDC paper. The following datasets are generated:
state | census | |||
---|---|---|---|---|
CPS | WiNDC_bluenote_cps_state_%year%.gdx |
WiNDC_bluenote_cps_census_%year%.gdx |
||
SOI | WiNDC_bluenote_cps_state_%year%.gdx |
WiNDC_bluenote_cps_census_%year%.gdx |
The values for the variable %year%
are 2015
, 2016
and 2017
. The datasets in the first column are on the US state level and
the datasets in the secod column are aggreggated to the
9 Census regions. The datasets in the first row are based on household data from
the
Current Population Survey (CPS) and the datasets in the second row are based on
household data from the Statistics of Income (SOI).
In addition to the routines to generate the datasets, the directory bluenote
has two models that demonstrate how the Bluenote datasets may be used in a
modeling application. The energy tax model in the file bluenote_model.gms
includes disaggregated households, while the energy tax model in the file
bluenote_model_v2_1.gm
demonstrates how the Bluenote datasets on the
US state level may be read and used in a model with just a single representative
household per region. This model mimics the Bluenote model from
WINDC version 2.1.