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

Convert cleaning script to Python #32

Open
newswim opened this issue Mar 9, 2023 · 4 comments
Open

Convert cleaning script to Python #32

newswim opened this issue Mar 9, 2023 · 4 comments
Assignees
Labels

Comments

@newswim
Copy link
Contributor

newswim commented Mar 9, 2023

We have all of the inputs and outputs from the previous correspondence with the Uni of Michigan, so we should be able to build a dictionary which can be used in a function as part of the cleaning process.

This function's type signature would look something like:

normalizeStatute :: dirtyStatute -> cleanStatute

This workflow includes:

  1. Normalizing statute information
  2. Other things (@normaljosh can you describe the other parts here?)
@newswim newswim transferred this issue from open-austin/indigent-defense-stats May 25, 2023
@newswim newswim changed the title Create an azure function for normalizing statute data Convert cleaning script to Python Jun 25, 2023
@normaljosh
Copy link
Contributor

@normaljosh
Copy link
Contributor

Currently this:

  • converts the datetimes to use hyphens instead of slash
  • gets the earliest charge date
  • maps charge names to the generalized umichigan decsriptions
  • labels the primary charge

Still need to:

  • Put the motions in there
  • Define has_evidence_of_representation
  • Other misc cleaning stuff emily's script does

@normaljosh
Copy link
Contributor

re: motions, it seems like we iterate through all the events and if one of them contains one of these "good motions":
('Motion To Suppress', 'Motion to Reduce Bond', 'Motion to Reduce Bond Hearing',
'Motion for Production', 'Motion For Speedy Trial', 'Motion for Discovery', 'Motion In Limine')

then they get added to the motions field, and has_evidence_of_representation becomes 'true'

@tpadmanabhan
Copy link
Collaborator

Follow up with Josh L

@normaljosh normaljosh assigned nicolassaw and unassigned normaljosh May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🔖 To-do
Development

No branches or pull requests

4 participants