Open vkentner opened 2 years ago
I will look into it. Sounds very reasonable!
This would have to be handled in the upstream plugin library. Unfortunately, there's not much i can do on the R-side.
I am working on clusterCharts
https://github.com/trafficonese/leaflet.extras2/pull/69 that make it possible to cluster and aggregate values from point markers using d3 functions, like sum/min/max/mean/median.
I thought that could be interesting for you @vkentner.
After installing the PR you can check out this Shiny-App:
runApp(system.file("examples/clustercharts_sum.R", package = "leaflet.extras2"))
Using "addHexbin" in leaflet.extras2 only counts the number of records in each hexbin but there are many use cases for the mean, sum or other calculations within the hexbin. For example a dataset that is a list of species and the abundance of each species. Instead of a count of the number of times a species appears in each hexbin it would be useful to have the total or average abundance in a hexbin. In the example below there is no way to account for or access the abun column when using addHexbin.