R Leaflet. Group point data into cells to summarise many data points
问题 Morning, afternoon or evening. I have the following positional data (adjusted from 'Count of sampling points within a grid cell') # Demo data set.seed(123) # lat <- runif(1000, 46.5, 48.5) lon <- runif(1000, 13,16) # pos <- data.frame(lon, lat) Using the following: ggplot(pos, aes(x = lon, y=lat)) + geom_bin2d(bins = 25) + stat_bin_2d(aes(label=stat(count)), bins = 25, position="identity") + scale_fill_gradient(low = "white", high = "red")+ theme_void() gives: Awesome, but, I want to do the