EMFAC - SANDAG/ABM-Reporting GitHub Wiki
EMFAC
The EMFAC project contains SQL objects and a Python project used to create the input Excel workbook to the EMFAC program from the EMFAC and Activity-Based Travel Model databases in SANDAGs MSSQL environment. The Python project takes command-line inputs of the EMFAC version, the ABM database scenario_id of interest, the EMFAC Season to use, and an indicator of whether the EMFAC run will be for SB375. The project outputs two Excel Workbook files to use as the input to the EMFAC program.
To run the project
- Pull the ABM-Reporting repository from GitHub into your local environment
- Update the sql_con parameter (line 48) in the emfac_xlsx.py file located in the python\emfac folder to point at the correct SQL Server instance and database containing the EMFAC SQL objects created by the emfac.sql file in the sql\emfacfolder
- Use the environment.yml file located in the python\emfac folder to create the emfac Python virtual environment and set as the project interpreter
- Run python\emfac\emfac_xlsx.py inputting the EMFAC version (2014, 2017), ABM database scenario id, EMFAC season (Annual, Summer, Winter), SB375 indicator (On, Off), and final output folder to write the EMFAC input files out to
Python
File | Description |
---|---|
enviornment.yml |
conda environment used to run EMFAC python files |
emfac_xlsx.py |
file used to create EMFAC program input Excel Workbook |
SQL Objects
Object | Name | Category | Description |
---|---|---|---|
table - SQL | [emfac].[emfac_vehicle_class] | intermediary object | EMFAC vehicle classes used in EMFAC program by EMFAC versions |
table - SQL | [emfac].[sandag_vehicle_class] | intermediary object | assignment SANDAG vehicle classes used in EMFAC program |
table - SQL | [emfac].[emfac_default_vmt] | intermediary object | default EMFAC run VMT |
table - SQL | [emfac].[emfac_vehicle_map] | intermediary object | mapping of EMFAC vehicle classes to SANDAG vehicle classes |
table valued function - SQL | [emfac].[fn_emfac_2014_vmt_map] | intermediary object | EMFAC 2014 function mapping SANDAG vehicle classes to EMFAC vehicle classes using the EMFAC vehicle class default VMT for a given year |
table valued function - SQL | [emfac].[fn_emfac_2017_vmt_map] | intermediary object | EMFAC 2017 function mapping SANDAG vehicle classes to EMFAC vehicle classes using the EMFAC vehicle class default VMT for a given year |
table valued function - SQL | [emfac].[fn_get_unassigned_vmt] | intermediary object | EMFAC function returning default VMT of unmapped EMFAC vehicle classes for a given EMFAC version and a given year |
stored procedure - SQL | [emfac].[sp_emfac_2014_vmt] | VMT | network-based EMFAC 2014 VMT |
stored procedure - SQL | [emfac].[sp_emfac_2017_vmt] | VMT | network-based EMFAC 2017 VMT |
stored procedure - SQL | [emfac].[sp_emfac_2014_vmt_speed] | VMT | network-based EMFAC 2014 VMT by speed bin |
stored procedure - SQL | [emfac].[sp_emfac_2017_vmt_speed] | VMT | network-based EMFAC 2017 VMT by speed bin |
Go To Top