Skip to content

[FEATURE] Aggregate Metrics API #493

@DMalone87

Description

@DMalone87

Is your feature request related to a problem? Please describe.
As a user, I'd like to be able to see the aggregate metrics related to a specific node. For example, I may want to know the total number of allegations made against an officer. I might also want to know the breakdown of what types of allegations have been reported.

Enabling this will require an API request that returns this sort of data for a given officer, agency, or unit.

Describe the solution you'd like
An API endpoint for officers, agencies, and units that provides aggregate data about these nodes.

Endpoints:

  • officers/{officer_uid}/metrics
  • agencies/{agency_uid}/metrics
  • units/{unit_uid}/metrics

Metrics desired:
Officers

Complaints received over time
For example: 15 in 2020, 50 in 2021, 30 in 2022, etc.

Allegations final statuses as a percentage
For example: 200 total allegations. 20% Sustained, 20% Unfounded, 60% Pending

Complainant Demographics
Example: 30% White, 30% African Ameraican, 20% Asian, etc.

Additional context
Officer Allegations Design

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions