openlayers / openlayers/openlayers

Addition of Option for Weight Average Calculation in Heatmap

Open
#16,047 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
12.6k
Forks
3.2k
Avg merge
2d 17h
Merged PRs (30d)
21

Description

Hello OpenLayers team,

I hope this message finds you well!

I am using the Heatmap component of OpenLayers in my project and I have observed that the current functionality, which includes options for blur, radius, and weight, works very well for summable data such as population or accident counts. However, I am dealing with a specific case where summing weights is not appropriate, such as when visualizing prices by region (e.g., fuel prices by neighborhood).

For data like prices, calculating the average of the values is crucial for accurate visualization. Currently, the heatmap sums the weights when coordinates are close to each other, but in my case, having an option to calculate the average of these weights would be far more useful.

I would like to suggest considering the addition of an option to compute the average of weights in the heatmap. This would provide a more accurate and meaningful representation of price data and similar metrics.

I also wanted to point out that this topic has been previously raised in issue #11819 (Heatmap layer intersection between points), but it was closed due to inactivity. I believe this enhancement would greatly benefit the community, and I hope it can be revisited.

Thank you very much for the excellent work on OpenLayers, which has been instrumental not only for my project but for many others around the world. 😃

I look forward to your response and am available for any additional information if needed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the OpenLayers Heatmap component and its existing blur, radius, and weight options, then read the related discussion in issue #11819. The work is complete when the heatmap supports an option for averaging nearby weights and the behavior is suitable for data such as regional prices.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.