plotly / plotly/plotly.R

Integration with geom_phylopic()

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

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

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

説明

Hello,

When developing a shiny app for a data visualisation dashboard, I encountered an issue that geom_phylopic() isn't integrated with plotly yet. I have pasted the error below. Is there any plans to have this integrated? I (think I) have created a reprex showing two plots that work and the one with plotly with the error.

Thanks,
Jo


geom_GeomPhylopic() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues

library(rphylopic)
library(ggplot2)
library(plotly)
# get image from phylopic and set up df
silhouette.img <- get_phylopic(uuid = get_uuid(name = "Sphyrnidae", n=1)) # hammerhead
silhouette.df <- data.frame(x=1,  y=9)

# make some fake data
df = data.frame(x=c(1:10), 
                y=c(1:10))

# this plot works
p = ggplot() + 
  geom_point(data = df, aes(x=x, y=y)) + 
  theme_bw() + 
  # geom_phylopic(data = silhouette.df, aes(x = x, y = y), 
  #               size = 1, col='purple',
  #               img = silhouette.img) + 
  xlim(0,10)

p %>% ggplotly(tooltip = c("x"))

# this plot works
p = ggplot() + 
  geom_point(data = df, aes(x=x, y=y)) + 
  theme_bw() + 
  geom_phylopic(data = silhouette.df, aes(x = x, y = y),
                size = 1, col='purple',
                img = silhouette.img) +
  xlim(0,10)

p 

# this plot does not work
p = ggplot() + 
  geom_point(data = df, aes(x=x, y=y)) + 
  theme_bw() + 
  geom_phylopic(data = silhouette.df, aes(x = x, y = y),
                size = 1, col='purple',
                img = silhouette.img) +
  xlim(0,10)

p %>% ggplotly(tooltip = c("x"))

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

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

はじめの一歩

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

調査の方向性

まず、提供された R reprex を geom_phylopic() および ggplotly() とともに実行し、サポートされていない geom のエラーを再現します。サポートされていない geom に対する既存の ggplotly() の処理を読み、この統合がどのようにテストされているかを確認します。ggplotly() を通じて実装エラーなしで例がレンダリングされ、プロットされた phylopic 画像と tooltip の動作が維持されれば完了です。

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

評価

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

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

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