agude / SWITRS-to-SQLite

Python script for converting California's Statewide Integrated Traffic Records System (SWITRS) reports to SQLite.
https://alexgude.com/blog/switrs-to-sqlite/
Other
9 stars 3 forks source link

What is `party_drug_physical` "G" #10

Open agude opened 2 years ago

agude commented 2 years ago
SELECT party_drug_physical, count(1) as total
FROM parties
GROUP BY 1
ORDER BY 2 DESC
LIMIT 500;

What is the value G? It's not mentioned in the code book: https://tims.berkeley.edu/help/SWITRS.php

Screenshot from 2021-08-22 21-24-55

jw997 commented 2 years ago

pretty sure G is borrowed from party_sobriety G
which means G - Impairment Unknown according to https://iswitrs.chp.ca.gov/Reports/jsp/samples/RawData_template.pdf

they have a lot of agreement in the party records.

select count(*) as N, party_sobriety, party_drug_physical from old.party where party_sobriety = 'G' or party_drug_physical = 'G' group by party_sobriety, party_drug_physical

"6" "A" "G" "3" "D" "G" "740" "G" "8919" "G" "G"

agude commented 2 years ago

I think you've solved it! I'll have to add this to the next update, thanks!