In this example, Turf is processing and visualizing the largest historical point dataset on Socrata and The interface below visualizes every 311 call in NYC since 2010 from a dataset that weighs in at nearly 8 GB.

The bottom slider is draggable, so you can loop over a specific time segment. It uses D3’s steamgraph feature to present 311 totals per borough across time. Lee Byron and Martin Wattenburg originally described this technique as it was used in the New York Times, saying of steamgraphs:

[…] the twin goals are to show many individual time series, while also conveying their sum. Since the heights of the individual layers add up to the height of the overall graph, it is possible to satisfy both goals at once.

The preprocessing step is very similar to our recent post on Chicago historical crime data. The code uses JSONStream to scale the aggregation algorithm beyond Node.js’s default RAM limits with piped data and incremental computation. Unlike a traditional GIS database, Turf’s flexibility allows for composable algorithms that scale well past what fits into memory or even on a single machine.

Want to see more examples like this one? Let us know @mapbox and check out our starter guide to Turf analysis.