Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
plotlyで動くグラフを作る
Search
takuma koshiishi
January 21, 2023
Technology
0
1.2k
plotlyで動くグラフを作る
takuma koshiishi
January 21, 2023
Tweet
Share
More Decks by takuma koshiishi
See All by takuma koshiishi
R package for a team
kosshi
2
2.4k
Other Decks in Technology
See All in Technology
CRE Camp #1 エンジニアリングを民主化するCREチームでありたい話
mntsq
1
120
PO初心者が考えた ”POらしさ”
nb_rady
0
210
Delta airlines®️ USA Contact Numbers: Complete 2025 Support Guide
airtravelguide
0
340
american airlines®️ USA Contact Numbers: Complete 2025 Support Guide
supportflight
1
110
FOSS4G 2025 KANSAI QGISで点群データをいろいろしてみた
kou_kita
0
400
OSSのSNSツール「Misskey」をさわってみよう(右下ワイプで私のOSCの20年を振り返ります) / 20250705-osc2025-do
akkiesoft
0
160
開発生産性を組織全体の「生産性」へ! 部門間連携の壁を越える実践的ステップ
sudo5in5k
2
7.1k
KubeCon + CloudNativeCon Japan 2025 Recap Opening & Choose Your Own Adventureシリーズまとめ
mmmatsuda
0
270
「クラウドコスト絶対削減」を支える技術—FinOpsを超えた徹底的なクラウドコスト削減の実践論
delta_tech
4
170
Beyond Kaniko: Navigating Unprivileged Container Image Creation
f30
0
130
マネジメントって難しい、けどおもしろい / Management is tough, but fun! #em_findy
ar_tama
7
1.1k
無意味な開発生産性の議論から抜け出すための予兆検知とお金とAI
i35_267
4
13k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Six Lessons from altMBA
skipperchong
28
3.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
Documentation Writing (for coders)
carmenintech
72
4.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
510
Transcript
plotlyで 動くグラフを作る Takuma Koshiishi @kotaku08 Tokyo.R #103 2023/1/21
⾃⼰紹介 2 はじめまして こっしー 株式会社ヴァリューズ/データアナリスト @kotaku08 @kosshi • 4年ぶりのTokyo.R •
今も会社でR推進してる • plotly×shiny本の翻訳に参加
今⽇の⽬的 3 plotly触ってみようかな!と思ってもらう
Plotly 4 • ⼤元はJavascriptのデータ可視化ライブラリ(plotly.js) • インタラクティブに操作可能なぐるぐる動くグラフが描画で きる • Rのploltyパッケージなど、他⾔語から利⽤するクライアント が⽤意されている
← 今⽇plotlyと⾔ったらこのRパッケージ • データアナリストにとっては探索的データ分析とコミュニ ケーション(ダッシュボード作成など)に有益
Plotlyでダッシュボード 5 https://plotly-r.com/linking-views-with-shiny.html
ここを推したいPlotly 6 • とにかく動く!楽しい • 多様な出⼒形式。HTML、SVG、PDFなどで保存可能。 Rmarkdown、shinyとも連携できる。 • ggplot2と連携できて、初めの⼀歩の敷居が低い。今⽇か ら使える!
2つのグラフの描画⽅法① 7 ①ggplot2を利⽤して描画 ◦ggplot2のグラフをggplotly()に渡すだけ で簡単! ◦複雑なことでもggplot2とその拡張パッ ケージに任せられるのが嬉しい! ×対応してないgeomもある。
2つのグラフの描画⽅法② 8 ②plotlyの記法で描画 ◦plotlyパッケージ独⾃の書き⽅だが、 ggplot2の書き⽅が⼟台にあり、Rユーザに 優しい。 ◦インタラクティブな点のカスタマイズ性 に優れる。習熟するならこっち。
まとめ 9 • plotlyパッケージで動くグラフが作れるよ! • ggplot2と直接連携しているし、⽂法も似ているので ggplot2ユーザは簡単に始められるよ! • ⼀歩踏み出したらインタラクティブ性を極める旅に出かけ よう!(グラフ同⼠の連携やshinyアプリ作成など)
Enjoy! 10 仕事でR使いたい⼈募集しています! 興味がある⽅是⾮DMください!
参考⽂献 11 • 「Interactive web-based data visualization with R, plotly,
and shiny」https://plotly-r.com/index.html • 「Rによるインタラクティブなデータビジュアライゼー ション: 探索的データ解析のためのplotlyとshiny」