produce_personal_matrix#

caf.van.lgv_model.produce_personal_matrix(folder, purposes, year, zone_translation, factor, output_folder)[source]#

Produces LGV personal matrix by factoring NorMITs car other demand.

Takes NoRMITS car other matrices for home based and non home bound, makes a dictionary of these values, concatenates them together, groups by origin, stacks the matrices to just 3 columns, then converts into NTEM zoning system using the lookup, finally a factor is applied to the output to account for just van personal trips.

Parameters:
  • folder (Path) – Location of car other matrices used for calculations.

  • purposes (int) – Integer values defined in inputs which classifies the purpose.

  • year (int) – Year of the model.

  • normits_to_msoa_lookup (Path) – Path to normits to msoa(NTEM) lookup.

  • factor (float) – Factor applied to end matrices so only van personal trips are contained.

  • output_folder (Path) – Folder location where PA and OD matrices are saved

  • zone_translation (Path)

Returns:

Annual LGV personal trip matrices in NTEM zoning with 3 columns: origin, destination, and values

Return type:

pd.DataFrame