MatrixReport.trip_length_distribution#
- MatrixReport.trip_length_distribution(cost_matrix, bins, *, sector_zone_lookup=None, zone_column='zone_id', sector_column='sector_id')[source]#
Calculate a distribution from the matrix passed on initialisation.
Distribution is stored within the object which can be accessed using the MatrixReport.distribution property.
- Parameters:
cost_matrix (pd.DataFrame) – Cost matrix corresponding with the inputted matrix.
sector_zone_lookup (pd.DataFrame | None = None,) – lookup table to translate zones to sectors to create a sectorised distribution
zone_column (str = "zone_id",) – column in sector_zone_lookup that contains the zone ids
sector_column (str = "sector_id",) – column in sector_zone_lookup that contains the sector ids
- Return type:
None