AKR1989
AKR1989

Reputation: 117

Partition a map into uniform regions

I'm trying to build a web site for visualization of some statistical information using Google Maps. Effectively, what I'm trying to do is to divide the map into adjacent cells(for example the honeycomb pattern) and for each data point, identify which cell this belongs to and aggregate all points that belong to one cell so that I can display some statistic about that cell on the map. Is there a simple way to get this done using Google maps and d3.js?

Please note that the map we're talking about includes just one city and all my data points are within this city. Also an important step here is to identify which cell on the map a lat/long coordinate belongs to and this is where I'm facing challenges right now.

Thanks in advance.

Upvotes: 2

Views: 1139

Answers (1)

seliopou
seliopou

Reputation: 2916

There is a D3 plugin called hexbin that seems to be exactly what you're looking for. You can see examples of its use here, here, and here. You should be able adapt these for use on any scale map: city, country, or otherwise.

Upvotes: 4

Related Questions