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

Add charts for all related offenses for property and violent crime view #1207

Merged
merged 26 commits into from
Aug 29, 2017

Conversation

jeremiak
Copy link
Contributor

Related to github.com/18F/crime-data-explorer/issues/1 - this is a far reaching feature so we might merge it to master before the entire feature is done and do remaining work in another PR.

Jacob Wentz and others added 16 commits August 17, 2017 13:08
The createSeries function was generating an object that had dates,
rates and series along with `segments` and `gaps`. The latter two were
used when we were plotting trends of actual counts to handle the cases
where there were missing years in the data. However, now that the trend
charts use estimated data, there are no holes so we can remove all of
that logic.
Extract logic from render function into class methods to make the
render function smaller and easier to understand. Update TrendContainer
to use offense types to create trend cards if appropriate
Refactored into the components we already had
@jeremiak jeremiak force-pushed the jk-jw-all-composite-charts branch from 9759a08 to eb3ff38 Compare August 28, 2017 20:34
The mungeSummary data function was doing quite a bit all in one call
which made it require a lot of parameters and was harder to follow. It
has been refactored into a series of smaller helper functions that are
used at different points in the app. This way the data is reduced into
a more usable form that requires no further calculation, just shape
manipulation and filtering.

Added tests for all new functions in summary util
@jpwentz jpwentz self-requested a review August 29, 2017 12:52
Copy link
Contributor

@jpwentz jpwentz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving -- It looks good to me. Will test once merged to Master before Release. Great refactor.

@jpwentz jpwentz merged commit b492b6a into master Aug 29, 2017
@jeremiak jeremiak deleted the jk-jw-all-composite-charts branch December 5, 2017 18:03
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