-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
force-pushed
the
jk-jw-all-composite-charts
branch
from
August 28, 2017 20:34
9759a08
to
eb3ff38
Compare
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
approved these changes
Aug 29, 2017
There was a problem hiding this 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.