pam.report.benchmarks
BenchmarkDict
#
benchmarks(population)
#
Yield benchmarks.
PARAMETER | DESCRIPTION |
---|---|
population |
TYPE:
|
YIELDS | DESCRIPTION |
---|---|
str
|
Iterator[tuple[str, pd.DataFrame]]: (filename, benchmark). |
Source code in src/pam/report/benchmarks.py
create_benchmark(data, dimensions=None, data_fields=None, aggfunc=[len], normalise_by=None, colnames=None)
#
Extract user-specified benchmarks from the population
PARAMETER | DESCRIPTION |
---|---|
data |
dataframe of trip or leg logs with required fields.
TYPE:
|
dimensions |
Dimensions to group by. If None, return the disaggregate dataset. Defaults to None. |
data_fields |
The data to summarise. If None, simply count the instances of each group. Defaults to None. |
aggfunc |
A set of functions to apply to each data field in |
normalise_by |
If given, convert calculated values to percentages across the dimension(s) specified here. Defaults to None. |
colnames |
If given, rename the columns of the returned dataset. Defaults to None. |
RETURNS | DESCRIPTION |
---|---|
DataFrame
|
pd.DataFrame: |
Source code in src/pam/report/benchmarks.py
departure_time_counts(population)
#
number of trips by hour of departure.
Source code in src/pam/report/benchmarks.py
distance_counts(population)
#
number of trips by (euclidean) distance category.
Source code in src/pam/report/benchmarks.py
duration_counts(population)
#
number of trips by duration.
Source code in src/pam/report/benchmarks.py
mode_counts(population)
#
number of trips by (euclidean) distance category.
mode_distance_counts(population)
#
number of trips by (euclidean) distance category and mode.
Source code in src/pam/report/benchmarks.py
mode_duration_counts(population)
#
number of trips by duration and mode.
Source code in src/pam/report/benchmarks.py
mode_purpose_counts(population)
#
purpose split for each mode.