plotly / plotly/plotly.R

Scattermapbox cluster do not work

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

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

主要言語
R
スター
2.7k
フォーク
641
PR マージ指標
30日以内にマージされた PR はありません

説明

Clustering of scatter points on a map do not form even though the documentation indicates this should work:
https://plotly.com/r/reference/scattermapbox/#scattermapbox-cluster

It seems to work in Plotly for Python:
https://plotly.com/python/scattermapbox/

Below is a reproducible example. Please use your own mapbox token.

Sys.setenv("MAPBOX_TOKEN" = mapboxtoken)
df = read.csv('https://raw.githubusercontent.com/bcdunbar/datasets/master/meteorites_subset.csv')
fig <- df %>% plot_mapbox(lat = ~reclat, lon = ~reclong,
                          size=2, type = 'scattermapbox',
                          mode = 'scattermapbox', hoverinfo='name',
                          cluster = list(enabled = TRUE, step = -2, color = 'red')) 
fig <- fig %>% layout(title = 'Meteorites',
                      font = list(color='white'),
                      plot_bgcolor = '#191A1A', paper_bgcolor = '#191A1A',
                      mapbox = list(style = 'dark'),
                      legend = list(orientation = 'h',
                                    font = list(size = 8)),
                      margin = list(l = 25, r = 25,
                                    b = 25, t = 25,
                                    pad = 2)) 
fig <- fig %>% config(mapboxAccessToken = Sys.getenv("MAPBOX_TOKEN"))
fig

Warning message:
'scattermapbox' objects don't have these attributes: 'cluster'

No cluster

Cluster formation using Plotly for Python
Screenshot 2024-01-03 at 12 55 53 pm

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

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

はじめの一歩

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

調査の方向性

リンクされた scattermapbox クラスターリファレンスを使って、まず再現可能な R の例を実行し、cluster 属性がサポートされていないという警告を確認します。R の結果をリンクされた Plotly Python の例と比較します。完了の条件は、R の scattermapbox trace が文書化された cluster 設定を受け入れ、クラスターを形成することです。

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

評価

技術スタック
r
領域
data-visualization
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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