caf.van.lgv_inputs#
Module containing functionality for reading and pre-processing the LGV inputs which are used for multiple segments.
Module Attributes
Column names (and data types) for input CSV to household_projections function. |
|
Name of the sheet containing the main LGV parameters. |
|
Column names in the LGV_PARAMETERS_SHEET. |
|
Names of the parameters (values) expected and their internal code name (keys). |
|
Name of the Excel Worksheet containing the time period factors. |
|
Name and dtype of the expected columns in the time period table. |
|
Name of the Excel Worksheet containing the gravity model parameters. |
|
Name and dtype of the expected columns in the gravity model parameters table. |
|
Names of the LGV segments. |
|
Name of the example config file to write. |
|
Default personal purposes to include in the LGV model. |
Functions
|
Read and aggregated the TfN employment land-use DVector. |
|
Reads and aggregates the household DVectors and converts to model zone system. |
|
Read the LGV Parameters sheet from the Excel workbook. |
|
Load warehouse floorspace data and convert to model zone system. |
|
Reads model study area CSV. |
|
Read time period factors from Excel Worksheet. |
Classes
|
Paths to LSOA warehouse data for the commute segment. |
|
Paths to the TfN dwelling CSVs and zone correspondence. |
|
Path to the TfN employment land-use data and zone correspondence. |
|
Defines the input paths and parameters for the gravity model. |
|
Options for filling in NaN values in warehouse data. |
|
Dataclass storing paths to all the input files for the LGV model. |
|
Input arguments for the personal matrix calculation. |
|
Class for rezoning a matrix when given a lookup with splitting factors. |
|
Contains the path and column names of the zone translation. |
Attributes Documentation
- caf.van.lgv_inputs.HH_PROJECTIONS_HEADER = {'Area Description': <class 'str'>, 'HHs': <class 'float'>}#
Column names (and data types) for input CSV to household_projections function.
- caf.van.lgv_inputs.LGV_PARAMETERS_SHEET = 'Parameters'#
Name of the sheet containing the main LGV parameters.
- caf.van.lgv_inputs.LGV_PARAMETERS_COLUMNS = {'Parameter': <class 'str'>, 'Value': <class 'float'>}#
Column names in the LGV_PARAMETERS_SHEET.
- caf.van.lgv_inputs.LGV_PARAMETERS = {'avg_new_house_size': 'Average new house size', 'lgv_growth': 'LGV growth', 'scotland_soc82_ratio': 'Scotland SOC821/SOC82', 'year': 'Model Year'}#
Names of the parameters (values) expected and their internal code name (keys).
- caf.van.lgv_inputs.TIME_PERIOD_SHEET = 'Time Period Factors'#
Name of the Excel Worksheet containing the time period factors.
- caf.van.lgv_inputs.TIME_PERIOD_COLUMNS = {'commuting_drivers': ('Commuting Drivers', <class 'float'>), 'commuting_skilled_trades': ('Commuting Skilled Trades', <class 'float'>), 'delivery_grocery': ('Delivery Grocery', <class 'float'>), 'delivery_parcel_bush': ('Delivery Parcel Bush', <class 'float'>), 'delivery_parcel_stem': ('Delivery Parcel Stem', <class 'float'>), 'personal': ('Personal', <class 'float'>), 'service': ('Service', <class 'float'>), 'time_period': ('Time Period', <class 'str'>)}#
Name and dtype of the expected columns in the time period table.
- caf.van.lgv_inputs.GM_PARAMS_SHEET = 'Gravity Model Parameters'#
Name of the Excel Worksheet containing the gravity model parameters.
- caf.van.lgv_inputs.GM_PARAMS_COLUMNS = {'calibrate': ('Run Calibration', <class 'str'>), 'function': ('Cost Function', <class 'str'>), 'furness_type': ('Furness Constraint Type', <class 'str'>), 'param1': ('Cost Function Parameter 1', <class 'float'>), 'param2': ('Cost Function Parameter 2', <class 'float'>), 'segment': ('Segment', <class 'str'>)}#
Name and dtype of the expected columns in the gravity model parameters table.
- caf.van.lgv_inputs.LGV_SEGMENTS = ['service', 'delivery_parcel_stem', 'delivery_parcel_bush', 'delivery_grocery', 'commuting_drivers', 'commuting_skilled_trades']#
Names of the LGV segments.
- caf.van.lgv_inputs.EXAMPLE_CONFIG_NAME = 'LGV_config_example.yml'#
Name of the example config file to write.
- caf.van.lgv_inputs.DEFAULT_PERSONAL_PURPOSES = (3, 4, 5, 6, 7, 8, 13, 14, 15, 16, 18)#
Default personal purposes to include in the LGV model.