TripEndByDirectionQuery#

class caf.ntem.TripEndByDirectionQuery(*year, scenario, version=Versions.EIGHT, label=None, output_zoning=ZoningSystems.NTEM_ZONE, filter_zoning_system=None, filter_zone_names=None, trip_type=TripType.OD, purpose_filter=None, aggregate_purpose=True, mode_filter=None, aggregate_mode=True, time_period_filter=None, output_names=True)[source]#

Bases: QueryParams

Define and perform Trip End by Direction queries on the NTEM database.

Parameters:
  • years (int) – Years to provide data / interpolate.

  • scenario (ntem_constants.Scenarios) – Scenario to provide data.

  • output_zoning (ntem_constants.ZoningSystems, optional) – Zoning system to output data in, NTEM zoning is default.

  • version (ntem_constants.Versions, optional) – Version of NTEM data to use, version 8.0 by default.

  • filter_zoning_system (ntem_constants.ZoningSystems | None, optional) – Zoning system to filter by, if None no spatial filter is performed.

  • filter_zone_names (list[str] | None, optional) – Zones to filter for, if None no spatial filter is performed.

  • trip_type (ntem_constants.TripType, optional) – The trip type to retrieve.

  • purpose_filter (list[ntem_constants.Purpose] | None, optional) – The purposes to filter the data by if None, no filter is performed.

  • aggregate_purpose (bool) – Whether to aggregate purpose when retrieving data.

  • mode_filter (list[ntem_constants.Mode] | None = None,) – The modes to filter the data by if None, no filter is performed.

  • aggregate_mode (bool = True,) – Whether to aggregate mode when retrieving data.

  • time_period_filter (list[ntem_constants.TimePeriod] | None = None,) – The time periods to filter the data by if None, no filter is performed.

  • output_names (bool = True,) – Whether to convert the segmentation IDs to names after outputting.

  • year (int)

  • label (str | None)

Attributes

name

Name of the query.

Methods

__init__(*year, scenario[, version, label, ...])

Initialise QueryParams.

query(conn[, include_zone_name])

Query NTEM database for Trip End by Direction data using parameters defined on initialisation.

query_to_dvec(conn)

Produce Dvectors containing trip end by direction data.

Attributes Documentation

name#