leaflet.extras
leaflet.extras copied to clipboard
Appending values to colors.
I'm totally new to Leaflet Heatmap. All I want to know is, how the mapping of values i.e. datapoints are appended to colors in gradients? Can I set any kind of range to those datapoints? Like, datapoints having value 5 should fall in the range of 0 - 10 and so on for others to.
I am afraid you will have to read up the Leaflet.heat code to understand what exactly goes under the hood. I am fairly busy with work stuff otherwise I would've done it myself.
@im4yush if you want to map a continuous value variable to a "bucketed" range, and then use colors on the grouped/bucketed/binned column, you first need to transform the continuous numeric column, then map the transformed column to your color aesthetic. Take a peek at this: https://stackoverflow.com/questions/11963508/generate-bins-from-a-data-frame. And then this: https://rstudio.github.io/leaflet/colors.html
I guess this is solved..