plotly / plotly/plotly.js

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

Đang mở
#7,741 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

feature
Ngôn ngữ chính
JavaScript
Star
18.3k
Fork
2k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
28

Mô tả

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.)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với CodePen được liên kết và hành vi clustering của scattermap mà nó minh họa. Truy tìm cách kích thước marker và kích thước cluster hiện được xác định, sau đó định nghĩa cách một biến underlying cần được tổng hợp cho từng cluster; công việc được xem là hoàn tất khi các cluster có thể được scale dựa trên giá trị tổng hợp đó và hành vi hiện có của marker và clustering vẫn tiếp tục hoạt động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
data-visualization
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.