title: How to create a weighted heatmap using R Leaflet?
body: <p>I am attempting to create a heatmap using a data set that has only one value per coordinate, with that value being a continuous variable.  All of the examples I have found using <code>leaflet.extras::addHeatmap()</code> use data that can have multiple values per coordinate, and create the heatmap based on the density of counts in an area. There doesn't seem to be a way to pass a weight instead.</p>
  <p>My ultimate goal is to have something that looks like a raster based on these values:</p>
  <p><a href="https://i.stack.imgur.com/EvRnW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EvRnW.png" alt="enter image description here" /></a></p>
  <p>However I don't want to use a raster due to the pixelation along the coasts.</p>
  <p>When I pass the data to <code>addHeatmap()</code> and include the argument <code>intensity = ~my_weighted_value</code>, I get something like this:</p>
  <p><a href="https://i.stack.imgur.com/hD1t9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hD1t9.png" alt="enter image description here" /></a></p>
  <p>And at increased zoom levels, it just ends up being a bunch of circles:</p>
  <p><a href="https://i.stack.imgur.com/BfaVK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BfaVK.png" alt="enter image description here" /></a></p>
  <p>What is the proper way to take weighted spatial data and add a heatmap that looks like the raster?</p>