Skip to content

NED Baseline Scenario Generator

Greg Macfarlane edited this page Feb 17, 2017 · 4 revisions

Baseline Scenario Generator

The New Economic & Demographic (NED) module is a component in the ODOT Statewide Integration Model (SWIM2) that produces the model wide economic forecast each year that is allocated to zones and drives travel demand.
The NED Baseline Scenario Generator runs (via a Python script) outside of the SWIM2 modeling framework and produces the NED module multi-year input files that must exist before the SWIM2 model can be run. The Scenario Generator script uses data from the following sources:

  • several IMPLAN output files,
  • state economic forecast files from Office of Economic Analysis, DAS,
  • the Global Insight national long-run economic forecast files, and
  • files containing crosswalks and sector mappings.

The IMPLAN and forecast files are in their original format, so the Baseline Scenario can be updated by substituting newer copies of the forecast files and rerunning the Baseline Scenario Generator without modifying the new forecast files. Significant changes in the format of the forecast files by the entity that produces them would require either modifying the code or reformatting the input file. In anticipation of likely changes to forecast files (such as dropping historical years), the code uses named constants to make adjusting the code easy (e.g., a named constant to identify the column in which base-year data are found). The Baseline Scenario Generator starts by building internal data structures to hold input values and the results of intermediate calculations. It then reads from various input files and puts their data into the internal data structures. The input files and their associated destinations are:

Input File Data Structure
Oregon Industry Detail.xls implan_activity
Washington Industry Detail.xls implan_activity
Idaho Industry Detail.xls implan_activity
Nevada Industry Detail.xls implan_activity
California Industry Detail.xls implan_activity
OregonAndHalo1 Industry Detail.xls implan_activity
cge_IxI.csv implan_structure
employment_annual.xls state_forecasts
pop_forecast.xls Population
Baseline LR Growth Scenario 2015_09.xls national_forecast
implan_ned_activity.xls implan_ned_activity
implan_aa_commodity.xls implan_aa_commodity
IMPLAN_OEA.xls state_crosswalks
implan_gi_sectors.xls state_crosswalks

Base year results for the Baseline Scenario are calculated by aggregating IMPLAN data to the categories used in SWIM2. IMPLAN population for the model region is attributed to five-year age groups based on 2010 census data proportions. Each subsequent year is then forecast as follows:

Employment is forecast by applying the appropriate growth rate from each state’s forecast to the prior year’s employment within that state. If there is no forecast for that state, or if the model year is beyond the end of the state’s forecast, the appropriate growth rate from the national forecast is used. Employment is then aggregated over IMPLAN sectors to SWIM2 categories and over states to model region totals.

The states do not forecast output. To forecast output, the ratios of output per employee in each sector in the current year to that in the prior year from the national model is calculated and applied to the prior year’s output per employee for the region. The adjusted output per employee is then multiplied by forecasted employment to obtain a forecast of output.

Population is forecast by applying growth rates by five-year age group from the Oregon population forecast to the prior year’s model region population. We do not have population forecasts specific to the halo portions of neighboring states, and assumed that population growth in those counties would be more similar to that in Oregon than to the rest of their states or the nation.

For the trade forecast, industry imports and exports are forecasted separately from institution imports and exports. Industry exports are forecasted by taking the ratio of output for each industry in the model year and the base year and applying it to the exports of each commodity made by that industry in the base year. Industry imports are forecasted by taking the ratio of output for each industry in the model year and the base year and applying it to the imports of each commodity used by that industry in the base year. Imports and exports by institutions (e.g., households and governments) are calculated similarly, but use population ratios rather than output ratios.

The construction forecast used by ALD is constructed by aggregating output dollars from IMPLAN construction sectors. The government forecast uses estimated elasticities relating change in government revenues to change in employment, which are applied to the change in forecasted employment to get change in government revenue, which is then applied to the prior year’s government. The estimated elasticities used are stored as named constants near the top of the Python script. Currently they are:

  • FED_TAX_ELASTICITY = 1.214
  • SL_TAX_ELASTICITY = 1.234
  • CORP_TAX_ELASTICITY = 1.054

#Dependencies

The baseline scenario generator requires Python (version 2.7 recommended) and the xlrd Python library. xlrd allows Python to read data files that are in Excel’s .xls format. (It does not work with .xlsx files.) (Obtain your library by downloading a copy of xlrd from https://pypi.python.org/pypi/xlrd and after unzipping the distribution folder, run "python setup.py install" from a DOS command line. This can be tricky for ODOT machines if you do not have admin privileges. You may have to change the computer system properties under Environmental Variables – Path – to point to the version of Python you want to use as default. TPAU machines are currently set up to use 2.7 under ArcGIS (C:/Program Files (x86)/Python27/ArcGIS10.2 )

#Generating the Baseline Scenario

To generate the input files the NED module in SWIM2 needs to run, place all of the data files listed above into a folder with the python script (make_base_scenario.py) and, from the DOS command line, change directory (cd) to that folder, and run the script. The output files will be placed into the same folder.

For use in SWIM2, all but one of these multi-year files should be copied to the scenario_name/inputs/t0 folder prior to a SWIM2 full model run. The output files and their contents are below; note that “productivity_ratios.csv” does not need to be placed in this folder with the other input files.

Output File Contents
activity_forecast.csv Forecasts of output and employment
construction_forecast.csv Forecasts of residential and non-residential construction output
trade_forecast.csv Forecasts of imports and exports
government_forecast.csv Forecasts of government and non-government investment
population_forecast.csv Forecasts of population by five-year age groups
productivity_ratios.csv Intermediate output for diagnostics

#Updating the Baseline Scenario

Updating the Oregon employment in the baseline scenario requires substituting a newer version of the Oregon Economic and Revenue Forecast employment file (employment_annual.xls). This is accomplished by substituting a new version of the forecast spreadsheet (keeping its filename the same, file is located here: https://www.oregon.gov/das/OEA/Pages/forecastecorev.aspx ) and re-running the script. Unless the format of the forecast spreadsheet changes in the future, no additional steps are required. Before re-running the script, one must verify the employment data are contained in rows 5-64 of the spreadsheet and confirm the base year data (2009) are in column V. If not, the script or the data file will need to be adjusted. The named constant BASE_YEAR_COLUMN is defined in the get_state_forecasts() function and its value of 21 corresponds to column V. If the base year were to move to the left in a future version, say to column L, then the value of BASE_YEAR_COLUMN would need to be reduced by the number of columns it shifted (by 10 in this example, from 21 to 11).

To update the 2009 baseline scenario with a new national forecast, the new 2015 forecast file is substituted for “Baseline LR Growth Scenario 2015_09.xls” and the value of the named constant GI_FILENAME, defined near the top of the script, is changed to reflect the name of the new national forecast file. Verify that the tab containing output forecasts (Data-Ann) still has data for the base year (2009) in column L and that the tab containing employment forecasts (Emp1A) still has data for the base year in column J. If not, make appropriate adjustments to the following named constants before re-running the script:

GI_OUTPUT_BASE_YEAR_COLUMN

GI_EMPLOYMENT_BASE_YEAR_COLUMN

Note: GI may revise the data elements provided in their forecast. Be diligent in checking to see the correct data elements are inserted into each sheet. For example, two industry employment categories are no longer forecast by GI – Leather & Allied Products and Beverages & Tobacco Products, so the original forecast from 2009 was extended out to year 2045 manually. Note: If a newer version of either of these files is delivered in .xlsx format, it will need to be saved to .xls format from within Excel before it will work with the script.

Clone this wiki locally