hoverinfo not working - unable to reproduce franconia plotly map with correct hover information
オープン
まだ誰も着手していません。
- 主要言語
- R
- スター
- 2.7k
- フォーク
- 641
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I am building a map using plot_ly and am unable to correctly display information using text and hoverinfo. To debug, I tried to recreate this map found on this website:
https://blog.cpsievert.me/2018/03/30/visualizing-geo-spatial-data-with-sf-and-plotly/
plot_ly(
franconia,
split = ~NUTS_ID,
color = ~district,
stroke = I("black"),
text = ~paste(NAME_ASCI, "\n is in", district),
hoverinfo = "text",
hoveron = "fill"
)
however only the nuts_id information is showing.
Thus, when I run this code:
plot_ly(data = full_pov_census_data,
split =~NAME,
color =~NumbImpoverished,
showlegend = FALSE,
alpha = 1,
type = 'scatter',
mode = 'lines')
only the NAME variable shows up when I hover.
Do you mind helping me solve this problem?
Thank you in advance
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供されている2つの plot_ly の例から始め、split、text、hoverinfo、hoveron、mode の設定を、リンク先の Franconia の例と比較します。入力 franconia と full_pov_census_data を使って動作を再現します。ホバー時に name や NUTS_ID だけでなく、意図したテキストと地区または貧困に関する情報が表示されれば、issue は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- r
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100