Skip to content

Miovision volumes_15min_* views do not properly filter leg-specific anomalies #1265

@Nate-Wessel

Description

@Nate-Wessel

The filter is by the approach leg only:

) AND (
ar.leg = v15.leg
OR ar.leg IS NULL
)

anomalous_ranges, as I understand them though are agnostic of entry/exit. They're just saying that a particular leg is messed up. We shouldn't rely on counts either entering or leaving that leg.

The problem is particularly apparent when you look at the ATR transformation, which is based on this view. Here a do-not-use anomaly applies to the E leg, but all the 0 counts come through for that leg anyway.

SELECT *
FROM miovision_api.anomalous_ranges
WHERE uid = 1426;

SELECT *
FROM miovision_api.volumes_15min_atr_filtered
WHERE
    intersection_uid = 63
    AND classification_uid = 2
    AND leg = 'E'
    AND datetime_bin >= '2024-09-23'
    AND datetime_bin < '2024-09-26'
ORDER BY datetime_bin;

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions