This application is a rapid prototype designed to show some ideas around data visualization and interactivity for the FBI's UCR RFI. We've used the sample NIBRS data to show interesting graphs of incidents that can be filtered by type, time, and other attributes.
Note that this application was forked from a previous prototype we did for Boston's HubHacks hackathon, the Mayor's Hotline Explorer. That prototype originally took a couple days of developer time to create, and this added a couple more for data adaptation and updates.
- NIBRS 2014 UCR sample dataset, provided by the FBI in conjunction with the RFI release (solicitation number 11420164073).
In order to help the prototype load quickly in the absence of any backend services, we processed the sample dataset in the following ways:
- Removed some unused data columns
- Culled displayed time period to 30 days of data (June 2014), representing approximately 116,000 records instead of the full 600k+
- Mapped location names and offense type names to a code to reduce text within the data.
- Formatted as CSV for optimal compactness, versus XML or JSON
- Bootstrap for layout
- dc.js for interactive graphs
- d3.js for graphs engine (used by DC)
- crossfilter for multi-dimentional indexing (used by DC)
- lodash.js for utilities
- Tableau Desktop for initial data exploration
It should be sufficient to start from a clean checkout and issue:
npm install
bower install
gulp
Serve the content locally out of the 'dist' directory.
When it comes time to publish to GitHub Pages, set the environment variable GA_TRACKING_ID
to inject the correct info for the production instance and issue:
gulp --env production deploy