Skip to content

Matching Process

Gregor Schroeder edited this page Nov 29, 2020 · 1 revision

Description of matching process

The matching process is implemented as a loop. For each PeMs station in a given year, all highway network links from a given highway coverage e00 file are considered. Highway network links that share the same freeway name (5, 125, 805, etc...) and direction (N, S, E, W) that are less than a pre-determined maximum allowable distance from the PeMs station are considered as initial potential matches. Within the initial matches, if a PeMs station's closest highway network link match is also the highway link's closest PeMs station match that station-highway link pair is considered a final one-to-one match. The pair is removed from all initial matches and the process is repeated until no initial potential matches are left. This results in a one-to-one match of PeMs stations to highway network links.

Running the matching process

Create the Python interpreter from the provided environment.yml file located in the matching folder of the project. Set the interpreter as the default Python interpreter associated with this project. Edit the Python file matchStations.py in the project matching folder setting the target SQL server instance and database to the location containing PeMs objects created by the pemsObjects.sql file in the project sql folder. Run the Python file matchStations.py in the project matching folder and when prompted input the PeMs station dataset year and the path to the highway coverage e00 file of interest. When finished, the process writes a file match.csv to the working directory containing the one-to-one match of PeMs stations to highway network links.