upsert with a unique identifier makes sure the code is idempotent (useful because the next step is going to cost money, and you don't want to lose data)
General advice: do as little parsing as possible at data collection time. Much easier to munge the raw data locally later on than needing to re-scrape everything.
2. Geolocation
Geocoding converts addresses like "1600 Ampitheater Parkway, Mountain View, CA" into geographic coordinates like (37.423021,-122.083739).
var geocoder = require('node-geocoder')('google','https',{apiKey:secrets.google_apikey});
var geocoderBottleneck =new bottleneck(0,200);
async.eachLimit(incidents,5,function(incident,cb){// keep under the rate limit...
geocoder.geocode(
incident.address+" Charlottesville, VA",
function(err, location){
incidentsCollection.update({_id:incident._id},
{"$set":{location:location}},
geocoderBottleneck.submit(cb,null,null));
});
});
https://github.com/nchaulet/node-geocoder
2. Geocoder
I'm pretty sure there are free services out there. Not sure why I went with Google API...
3. outputData
For smaller datasets it makes sense to just load everything into memory and create visualizations dynamically using JS on the client-side
As your dataset gets bigger, long load times and long processing times makes this less attractive
This dataset is somewhere in-between... room for improvement
4. visualize!
leaflet.js
open-source JS library for interactive maps
Handles base-layers
Support for tiled raster layers (Anything > 100k elements)
Plays nice with d3.js for interactive SVG elements
Everything is up on Github under the "cville" group.
Interested in other angles to explore this dataset.
(without being super creepy)
ACFR has mentioned that they actually don't have very good ways of looking at their own data. Tried to find out what would be useful for them, but didn't get any concrete ideas.
Thanks!
Arqball (computer vision kung-fu):
http://arqspin.com
Learnstream (link curation and sharing):
http://learnstream.com
Scenethink (simple event calendars):
http://scenethink.com
Michael Holroyd
http://meekohi.com
Data Visualization of C'ville+Albemarle EMS Data CVJS Meetup - Nov 2015 Michael Holroyd, Ph.D.