plotly / plotly/plotly.js

[FEATURE]: Please allow for the sizes of clusters within scattermaps to be based on their underlying values

オープン
#7,741 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

feature
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

I am currently working on a scattermap that has thousands of individual circles. The sizes of these circles are based on their underlying population, rather than a fixed value.

When the map is zoomed out quite a bit, these circles end up overlapping--thus making it harder to identify areas with particularly large populations. Therefore, I tried using the cluster feature to group circles together. However, it appears that the sizes of all circles within a given cluster can only be based on the numbers of circles in each cluster.

What I would love to see is the ability to set cluster sizes on an underlying variable (e.g. population). That way, a 5-region cluster with a population of 2 million would be twice as large as that of another 5-region cluster of 1 million. Since it's already possible to base single-marker sizes on a specified variable, I like to think that this wouldn't be too challenging to implement (though I could be wrong).

Here's a Codepen that shows a simplified version of my actual code. (It's based on Plotly's US-city dataset.) Note that all green circles (clusters) are the same size, whereas blue circles (markers) are based on cities' populations. I'd like for the green clusters' sizes to be based on the sum of the populations of all cities in their cluster.

(Note that, in this case, basing cluster sizes on the number of cities that they contain would not be ideal, since city sizes can vary widely.)

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンクされたCodePenと、そこで示されているscattermapのクラスタリング動作から始めます。現在、markerのサイズとclusterのサイズがどのように決定されているかを追跡し、そのうえで各clusterについて基礎となる変数をどのように集計すべきかを定義します。完了の条件は、その集計値に基づいてclusterのサイズを変更でき、既存のmarkerおよびクラスタリングの動作が引き続き機能することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
data-visualization
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。