SegPub is a webapp that aims to visualize public security incidents, answering questions such as:
- Where there were more injuries during the last week?
- What have been the most frequent incident this month?
- In which slice of the day there was more threats?
The idea is to build these three interactive histograms that cross filter each other and the map:
- Distribution of incidents per category.
- Distribution of incidents through the current month.
- Distribution of incidents through the hours of the day.
After select one category, the map and the other two histograms are refreshed showing the spatial, daily and hourly distribution of the selected category incidents. Similarly, after select a slice of the month or of the day, the whole visualization is refreshed.
- For while, there are only two histograms (category and daily distribution) and they are only filtering the map.
- There are some
undefined
values at some incidents details.
The first step is install nodejs.
After that, install node modules, download csv and start the app:
$ npm install
$ npm run get-data
$ npm start
Similarly, to run tests:
$ npm test
If you want to run frontend tasks manually, install grunt
globally:
$ sudo npm install -g grunt
$ sudo npm install -g grunt-cli