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

Helper method to aggregate hit rate calculations #244

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

copelco
Copy link
Member

@copelco copelco commented Nov 30, 2023

Example:

group_by = {"driver_race"}
df = query.contraband_query(agency_id=80, group_by=group_by)
chart = query.hit_rate_chart(df, group_by=group_by)
table = query.hit_rate_table(df, group_by=group_by)
chart

Returns:

{'Asian': [20.24],
 'Black': [27.66],
 'Hispanic': [17.13],
 'Native American': [23.33],
 'Other': [24.49],
 'White': [21.39]}

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

Successfully merging this pull request may close these issues.

1 participant