alpha-beta-soup / national-crash-statistics

An interactive web map of the New Zealand Transport Agency's Crash Analysis System (CAS) data.
MIT License
12 stars 6 forks source link

Regional clustering at national/regional level scale #4

Open parnelandr opened 9 years ago

parnelandr commented 9 years ago

At zoom levels where more than one region can be seen, cluster current view of dots by TA.

  1. Decide zoom levels
  2. Incorporate TA information/representative geographic centre
  3. Count current dots in region
alpha-beta-soup commented 9 years ago

To begin with I can add a property to the GeoJSON that expresses the regions we can use for the clustering.

alpha-beta-soup commented 9 years ago

Regions or TA? I think clustering is most useful at higher levels of zoom, if we do indeed opt for it, so I'm going to work on a method to give each crash its regional council (the raw data already has TA; it's trivial to add that to the GeoJSON).

Thinking critically about this, is this a good idea? Zoomed out, are we going to be hiding interesting patterns? Like which State Highways (and sections thereof) have lots of accidents? Given I'm generally not a fan of clustering, I'm possibly just being pessimistic. It might be worth trying TA quickly to see what it looks like. I think it would be great for comparing different cities, but we'll lose rural patterns.

alpha-beta-soup commented 9 years ago

This is probably useful: http://blog.thematicmapping.org/2012/10/mapping-new-zealand-clustering-doc-huts.html

alpha-beta-soup commented 9 years ago

Also useful: https://github.com/Leaflet/Leaflet.markercluster

This one is nice because it "spiderfies" at the lowest level, so that solves the problem of multiple crashes occurring at the same intersection being separated.

alpha-beta-soup commented 9 years ago

BTW, this example has a sweet loading bar.

alpha-beta-soup commented 9 years ago

http://bl.ocks.org/gisminister/10001728 This is relevant to #3 as well.