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
現場データから見える、開発生産性の変化コード生成AI導入・運用のリアル〜 / Changes in Development Productivity and Operational Challenges Following the Introduction of Code Generation AI
nttcom
1
430
webpack依存からの脱却!快適フロントエンド開発をViteで実現する #vuefes
bengo4com
1
1.6k
データ戦略部門 紹介資料
sansan33
PRO
1
3.8k
会社を支える Pythonという言語戦略 ~なぜPythonを主要言語にしているのか?~
curekoshimizu
1
320
Claude Codeを駆使した初めてのiOSアプリ開発 ~ゼロから3週間でグローバルハッカソンで入賞するまで~
oikon48
10
5.3k
AI時代、“平均値”ではいられない
uhyo
8
1.9k
Digitization部 紹介資料
sansan33
PRO
1
5.6k
AIとともに歩んでいくデザイナーの役割の変化
lycorptech_jp
PRO
0
800
NLPコロキウム20251022_超効率化への挑戦: LLM 1bit量子化のロードマップ
yumaichikawa
1
170
AWSでAgentic AIを開発するための前提知識の整理
nasuvitz
2
250
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
フレームワークを意識させないワークショップづくり
keigosuda
0
240
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
5.8k
Speed Design
sergeychernyshev
32
1.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
4 Signs Your Business is Dying
shpigford
185
22k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
Automating Front-end Workflow
addyosmani
1371
200k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Designing Experiences People Love
moore
142
24k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
369
20k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
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」