pedpy.methods.profile_calculator module#

Module containing functions to compute profiles.

class pedpy.methods.profile_calculator.VelocityMethod(value=<no_arg>, names=None, module=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

Identifier for the method used to compute the mean velocity.

ARITHMETIC = 0#
VORONOI = 1#
pedpy.methods.profile_calculator.compute_profiles(*, individual_voronoi_velocity_data: DataFrame, walkable_area: Polygon, grid_size: float, velocity_method: VelocityMethod) Tuple[List[ndarray[Any, dtype[float64]]], List[ndarray[Any, dtype[float64]]]][source]#

Computes the density and velocity profiles.

Note: As this is a quite compute heavy operation, it is suggested to reduce the geometry to the important areas.

Parameters
  • individual_voronoi_velocity_data (pd.DataFrame) – individual voronoi and velocity data, needs to contain a column ‘individual voronoi’ which holds shapely.Polygon information and a column ‘speed’ which holds a floating point value

  • walkable_area (shapely.Polygon) – geometry for which the profiles are computed

  • grid_size (float) – resolution of the grid used for computing the profiles

  • velocity_method (VelocityMethod) – velocity method used to compute the velocity

Returns

(List of density profiles, List of velocity profiles)

Return type

Tuple[List[ndarray[Any, dtype[float64]]], List[ndarray[Any, dtype[float64]]]]