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

Use data filtered by year before making total NIBRS incident count #731

Merged
merged 1 commit into from
May 5, 2017

Conversation

jeremiak
Copy link
Contributor

@jeremiak jeremiak commented May 5, 2017

Fix an issue where NIBRS incidents counts (in the initial NIBRS paragraph) can be significantly higher than the other numbers in the interface. For example, using rape offenses in Alabama (/explorer/state/alabama/rape) it showed that there were over 3K incidents for the time period between 2004 and 2014. In fact, we weren't respecting the since or until dates and the numbers for the early 1990s in Alabama are really high. Now the number in the paragraph is much closer to the other numbers in the NIBRS cards.

API response:

    {
      "count": 661,
      "year": "1991",
      "offense_name": "rape",
      "race_code": "B"
    },
    {
      "count": 659,
      "year": "1991",
      "offense_name": "rape",
      "race_code": "U"
    },
    {
      "count": 296,
      "year": "1991",
      "offense_name": "rape",
      "race_code": "W"
    }

Before:

After:

@brendansudol
Copy link
Contributor

yikes - good fix

@brendansudol brendansudol merged commit 21ae6ed into master May 5, 2017
@brendansudol brendansudol deleted the jk-do-proper-nibrs-counts branch May 5, 2017 18:51
@jeremiak
Copy link
Contributor Author

jeremiak commented May 5, 2017

Addressed part of #732

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.

2 participants