Downloads Traveline's National Operator Codes register and returns one row per NOC, with the operator, management division and group it belongs to.
Usage
get_noc(
url = "https://www.travelinedata.org.uk/noc/api/1.0/nocrecords.xml",
include_ceased = FALSE
)Value
a data frame of
- noc
National Operator Code, as written in TransXChange
- public_name
the trading name the operator is known by
- licence_name
the name on its PSV operator's licence
- operator_id
Traveline's id for the legal operator. Two NOCs with the same `operator_id` are one company
- operator_name
that operator's name
- division_id, division
the management division, one level up
- group_id, group
the corporate group, one level up again
Details
The register is a four level hierarchy: code, operator, management division, group. Only the operator level means "the same company" - `First Leeds` and `First Bradford` share an operator, `Stagecoach London` and `Stagecoach Yorkshire` share only a group, and treating a group as one operator would merge companies that happen to have the same owner.
The register is a national reference dataset like NaPTAN, and is used the same way: download it once and pass it to the functions that need it, rather than re-downloading per call.
