Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] ~824 crashes have $0 comprehensive cost #6875

Closed
frankhereford opened this issue Aug 5, 2021 · 4 comments · Fixed by cityofaustin/vision-zero#1030
Closed

[Bug] ~824 crashes have $0 comprehensive cost #6875

frankhereford opened this issue Aug 5, 2021 · 4 comments · Fixed by cityofaustin/vision-zero#1030
Assignees
Labels
Impact: 3-Minor Deteriorates TPW service delivery Need: 2-Should Have May be painful to leave out, but the solution is still viable Product: Vision Zero Crash Data System Centralize the management of ATD's Vision Zero data Service: Dev Infrastructure and engineering Type: Bug Report Something is not right Type: Enhancement Request for an improvement to existing functionality in an application Workgroup: VZ Vision Zero Program

Comments

@frankhereford
Copy link
Member

The comprehensive cost for a crash should never be $0; a crash with no injuries should get the minimum cost amount of $50,000 for a CR3 crash.

@frankhereford frankhereford added Type: Bug Report Something is not right Impact: 3-Minor Deteriorates TPW service delivery Need: 2-Should Have May be painful to leave out, but the solution is still viable Workgroup: VZ Vision Zero Program Type: Enhancement Request for an improvement to existing functionality in an application Product: Vision Zero Crash Data System Centralize the management of ATD's Vision Zero data labels Aug 5, 2021
@frankhereford
Copy link
Member Author

Looking at https://github.com/cityofaustin/atd-vz-data/blob/master/atd-vzd/triggers/atd_txdot_crashes_updates_audit_log.sql#L114-L121, it's clear that the fall through case here isn't the best choice, but it also shouldn't ever be possible to achieve, as line 118 is the case of no injuries.

I believe that the root cause may be related to crash summations coming from CRIS being set at the time of INSERT on their database and possibly not being recalculated when they UPDATE. If a crash initially doesn't have any records in the persons/primarypersons table, all types of injuries (including the non-injury state) are set to zero and may not be updated if a person is added later in a CR3 revision. This observation is based on conversations with @xavierapostol, and I seek to verify and expand my understanding of this by some row-by-row inspections of raw CRIS data which @sergiogcx has pointed me to on S3.

Further findings will be reported - thanks!

@patrickm02L patrickm02L changed the title ~680 crashes have $0 comprehensive cost [Bug] ~680 crashes have $0 comprehensive cost Aug 5, 2021
@frankhereford frankhereford changed the title [Bug] ~680 crashes have $0 comprehensive cost [Bug] ~824 crashes have $0 comprehensive cost Aug 5, 2021
@amenity amenity added the Service: Dev Infrastructure and engineering label Sep 8, 2021
@frankhereford
Copy link
Member Author

The crashes in question are almost entirely those without entries in the persons and primarypersons tables. They lack entries because the persons sections of the CR3 itself are blank. The database reflects the CR3 data correctly, in my opinion.

A handful of the crashes in question concern fatalities which occurred after the 30 day window post-crash, which is not an injury outcome that has a defined comprehensive cost value.

I propose we ask the VZ stakeholders to define a default, ground-state value for the comprehensive cost of a crash which is not $0 as it is currently. My first suggestion would be the non-injury comprehensive cost, and that's what's used in the PR, but that could be easily and quickly amended.

@frankhereford
Copy link
Member Author

The update to the audit_log function has been deployed to production and crashes which do not have persons associated to them have had the est_comp_cost_crash_based field set to the new ground-state of $50,000.

@patrickm02L
Copy link
Member

patrickm02L commented Oct 5, 2021

Asked about in the Oct SR - What is the preferred route on the non-ATD fatalities. We don't have a comprehensive cost for that injury outcome.

Lewis L. will take a look at what @frankhereford has sent over and give him feedback in the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: 3-Minor Deteriorates TPW service delivery Need: 2-Should Have May be painful to leave out, but the solution is still viable Product: Vision Zero Crash Data System Centralize the management of ATD's Vision Zero data Service: Dev Infrastructure and engineering Type: Bug Report Something is not right Type: Enhancement Request for an improvement to existing functionality in an application Workgroup: VZ Vision Zero Program
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants