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

Create front-end to query psql db #5

Open
crypdick opened this issue Oct 26, 2017 · 7 comments
Open

Create front-end to query psql db #5

crypdick opened this issue Oct 26, 2017 · 7 comments
Assignees

Comments

@crypdick
Copy link
Member

Once we have #3 #4 figured out we need to create a front-end with predefined fields that we can use to make queries of the PSQL db. We then hand off the results to some viz module.

@crypdick
Copy link
Member Author

crypdick commented Nov 1, 2017

@duffrind here are the keys to put in the where clause dictionary, defaulting to None.

stop_date_MIN
stop_date_MAX
driver_gender_TUPLE
driver_age_MIN
driver_age_MAX
driver_race char_TUPLE
violation_TUPLE
search_conducted upper(BOOL)
search_type TUPLE
stop_outcome_TUPLE
officer_gender_TUPLE
officer_age_MIN
officer_age_MAX
officer_race_TUPLE
officer_rank_TUPLE
out_of_state upper(BOOL)

@duffrind
Copy link
Collaborator

duffrind commented Nov 2, 2017

Thanks, currently creating a header with these options.

I post a screenshot in a few

@duffrind
Copy link
Collaborator

duffrind commented Nov 2, 2017

driver_gender_TUPLE
driver_race char_TUPLE

I am confused what is meant by TUPLE. I can make this a string or something that matches the data, but I cannot think of a way that a (var1, var2, ..., varN) would help with the select statement.

Could someone post a header of the table so that I can make sure that everything is standardized?

@crypdick
Copy link
Member Author

crypdick commented Nov 2, 2017 via email

@duffrind
Copy link
Collaborator

duffrind commented Nov 2, 2017

There are a LOT of violations. Will we use regex for something like:

UI:
DUI
License
Equipment
Speeding
Paperwork
Other

Backend:
WHERE violation ~ '.*' + UI_violation + '.*'

@duffrind
Copy link
Collaborator

duffrind commented Nov 2, 2017

Also, there are 133 different ranks in the table... I think that I will skip this for now and add in the future if I have time.

@crypdick
Copy link
Member Author

crypdick commented Nov 2, 2017

hmm. maybe we can figure out a way to show the top 5 violations per county. but first, let's an app working that shows counts and means and then we can implement fancier queries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants