Closed sharmapn closed 2 years ago
Yes, that's essentially what that function is doing. How you manage aggregation (count, sum of some property, etc) is entirely up to you, and depends on what your input data looks like. For example, if your input data is an array of [lng, lat]
points, you might construct a map of {[h3Index]: count}
and then use that map to construct the GeoJSON - that's essentially what the function above is doing. This is one approach to a standard GROUP BY operation - see e.g. _.groupBy
from lodash.
Hello, In addition to the h3Resolution, I was hoping to integrate Buffer Radius in this calculation. I am fully using this example. Thus, the user can choose values for both: h3Resolution and Buffer Radius. https://observablehq.com/@nrabinowitz/h3-tutorial-using-point-layers?collection=@nrabinowitz/h3-tutorial
I would appreciate any guidance on this small question.
I mean at the end we need a geojson which has the features, together with the h3 cells, buffer radius and the number of points contained within.
Hello,
I am focussing on the H3-JS example from https://observablehq.com/@nrabinowitz/h3-tutorial-using-point-layers?collection=@nrabinowitz/h3-tutorial
Is there a way to we can call a function that counts the number of points in each of the hexagons after the binning and embeds these as attributes within the geoJSON? I found this function on the above page and was wondering if it does exactly that?