Quantcast
Channel: maps for developers - Medium
Viewing all articles
Browse latest Browse all 2230

Chicago crime data with Turf

$
0
0

Turf can be used on massive datasets using Node.js streams. I was able to process three gigabytes of Chicago crime data from their Socrata portal - all crimes from 2001 to today - for this time-series visualization with just a bit of code.

Drag a horizontal section of the timeline below the map to loop over that period. Note the gradual decline of crime over the decade, as well as the seasonal ebbs and flows. Compelling interfaces like this can be built by combining Turf with Mapbox.js and D3.

In this example, Turf is used for preprocessing and compressing the raw data and for visualizing the crime trends on the fly. Because Turf is a JavaScript library, the same geo processing engine can be used everywhere, so you don’t need to worry about learning multiple APIs for different contexts. Crunch huge datasets on the server and visualize smaller ones in the browser blazing fast.

Interested in learning more? Let us know at @mapbox and read our introductory guide to Turf.


Viewing all articles
Browse latest Browse all 2230

Trending Articles