Skip to content

SoundCast to PierceCast

Aditya Gore edited this page Jul 8, 2023 · 1 revision

The folder soundcast_to_piercecast_scripts provides Python scripts that are used to convert SoundCast data to the PierceCast model's format. These scripts are not run part of a model run; instead, these scripts are used to convert data in the SoundCast model's format to the PierceCast model's zone system. if required. The folder soundcast_to_piercecast_scripts\data contains the crosswalk files, traffic count data, and enlisted personnel file necessary to run some of these python scripts.

A script is run by opening a command window in the scripts folder (soundcast_to_piercecast_scripts) and running the following:

[python_executable] [script_name]

where; python_executable=Anaconda python executable path. Ex. C:\Progra~1\Anaconda3\python.exe; script_name=one of the scripts in the list below Before running the script it is necessary to update all the file paths in the script to point to correct directories

Here is a list of the scripts available in the folder:

Name Description
psrc2pc_trucksens.py Updates zones in truck inputs
psrc2pc_parcel.py Updates zones in primary parcel filetion summary input files
psrc2pc_hhs.py Updates household zone in synthetic population
psrc2pc_intrazonal.py Updates from/to zones for intrazonal inputs
psrc2pc_fares.py Updates transit fare zones in network file
psrc2pc_db_inputs.py Update zones in model inputs and traffic counts in validation data found in the database file

psrc2pc_trucksens.py

Objective: This script updates truck inputs located under inputs/model/trucks: truck_districts.ens

Settings: Update the following settings before running the script:

Setting Value Description
wd r"E:\projects\clients\PierceCounty\GitHub\PierceCast\inputs\model\trucks" Working directory containing truck input files; this should be directory with SoundCast data files
pc_psrc_taz r'data\psrctaz_pctaz.csv' SoundCast to PierceCast zones correspondence in the data folder of the script

Outputs: The converted data files are produced in the working directory (wd) with "_pc" appended to input file names.

psrc2pc_parcel.py

Objective: This script updates zones in primary parcel file: inputs/scenario/landuse/parcels_urbansim.txt

Settings: The user needs to update the following settings before running the script:

Setting Value Description
wd r"E:/projects/clients/PierceCounty/GitHub/PierceCastScenarioInputs/inputs/landuse/2018/land_use_2018" Working directory containing the primary parcel file; this should be directory with SoundCast data file
parcel_file 'parcels_urbansim.txt' Primary parcel file name
parcel_pc_taz_file r"data/psrcprcl_pctaz.csv" SoundCast parcel to PierceCast zones correspondence in the data folder of the script

Outputs: The converted data file is produced in the working directory (wd) with "_pc" appended to file name.

psrc2pc_hhs.py

Objective: This script updates household zone in synthetic population: inputs/scenario/landuse/hh_and_person.h5.

Settings: Update the following settings before running the script:

Setting Value Description
wd r"E:/projects/clients/PierceCounty/GitHub/PierceCastScenarioInputs/inputs/landuse/2018/land_use_2018" Working directory that contains PopSyn input files
popsynFileName "hh_and_persons.h5" Synthetic population file name
xwalkFile r"data/psrcprcl_pctaz.csv" SoundCast parcel to PierceCast zones correspondence in the data folder of the script

Outputs: The converted data file is produced in the working directory (wd) with "_pc" appended to file name.

psrc2pc_intrazonal.py

Objective: This script updates from/to zones for intrazonal inputs located under inputs/model/intrazonals: origin_tt.in, destination_tt.in, taz_acres.in.

Settings: Update the following settings before running the script:

Setting Value Description
wd r"E:\projects\clients\PierceCounty\GitHub\PierceCast\inputs\model\intrazonals" Working directory that contains intrazonal files
files_list ["origin_tt.in", "destination_tt.in", "taz_acres.in"] Intrazonal time and area files
pc_psrc_taz r'data\psrctaz_pctaz.csv' SoundCast to PierceCast zones correspondence in the data folder of the script
taz_shapefile r'E:\projects\clients\PierceCounty\Data\FromClient\Zones\TAZ_Export.gdb' Path to a shapefile that can be used to calculate area in acres for PierceCast zones

Outputs: The converted data files are produced in the working directory (wd) with "_pc" appended to file names. The destination_tt_pc.in file may write quotes around values in the first column. To correct this, open the file in a text editor and replace " all" with all (space should be present before the text).

psrc2pc_fares.py

Objective: This script updates the zones for which transit fares are listed: inputs/scenario/networks/fares: transit_fare_zones.ens

Settings: Update the following settings before running the script:

Setting Value Description
wd r'E:\projects\clients\PierceCounty\GitHub\PierceCastScenarioInputs\inputs\networks\2018\networks_2018\fares' Working directory that contains transit fares files
fares_file r'transit_fare_zones.ens' Name of the SoundCast transit fare file
pc_psrc_taz r'data/psrctaz_pctaz.csv' SoundCast to PierceCast zones correspondence in the data folder of the script

Outputs: The converted data files are produced in the working directory (wd) with "_pc" appended to file names.

psrc2pc_db_inputs.py

Objective: This script updates the SoundCast zones to PierceCast zones in model inputs and optionally validation dataset (traffic counts and screenline counts): inputs/db/soundcast_inputs.db

Dataset: Following is a list of model inputs dataset in the soundcast_inputs.db database where the zone information is updated

  • enlisted_personnel
  • external_nonwork
  • external_trip_distribution
  • group_quarters
  • heavy_trucks
  • jblm_trips
  • parking_zones
  • psrc_zones
  • seatac
  • special_generators
  • taz_geography

Optionally:

  • daily_counts
  • hourly_counts
  • observed_screenline_volumes

Settings: Update the following settings before running the script:

Setting Value Description
wd r'E:/projects/clients/PierceCounty/GitHub/PierceCastScenarioInputs/inputs/db' Working directory that contains soundcast_inputs.db file
db_input_file r'soundcast_inputs.db' Name of the SoundCast inputs database
pc_psrc_taz r'data/psrctaz_pctaz.csv' SoundCast to PierceCast zones correspondence in the data folder of the script
pc_psrc_prcl r'data/psrcprcl_pctaz.csv' SoundCast parcels to PierceCast zones correspondence in the data folder of the script
enlisted_personnel r'data/enlisted_personnel_pc.csv' The enlisted personnel file in PierceCast zone system

Outputs: The converted data files are produced in the working directory (wd) with "_pc" appended to file names.

The wiki describes the basic theory and process to use PierceCast for travel modeling applications.

Calibration and Testing

  • 2014 Estimation
  • Current Calibration
  • Older Calibration

Utilities

Release Notes

  • Notes on Latest Code and Inputs

Project Management

Clone this wiki locally