Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Pragmatic Charty
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
秒速284km
June 08, 2019
Programming
2.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pragmatic Charty
名古屋 Ruby 会議 04
秒速284km
June 08, 2019
More Decks by 秒速284km
See All by 秒速284km
fukuoka_ruby_2019
284km
0
210
Rubyアソシエーション開発助成成果報告会
284km
0
2.5k
Charty - Visualize Real-world Data with Ruby
284km
1
2.8k
Charty - Visualizing your data in Ruby
284km
0
2.7k
.so にして色々な言語から便利にのっかろう
284km
0
110
Charty with Rails
284km
1
110
Charty (RubyGrant 2018)
284km
0
2.7k
Better CSV processing with Ruby 2.6
284km
0
120
Charty on Rails - Railsdm 2019
284km
3
2.4k
Other Decks in Programming
See All in Programming
wkhtmltopdfの次どうするか問題2026
willnet
2
1.8k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.2k
カツオ、ご期待ください
suneo3476
0
130
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
510
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5.2k
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
Webの地図
yosuke_furukawa
PRO
6
5k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
410
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3.1k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
130
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
360
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
460
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
590
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Test your architecture with Archunit
thirion
2
2.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
540
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Building Applications with DynamoDB
mza
96
7.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
290
Paper Plane (Part 1)
katiecoart
PRO
2
11k
New Earth Scene 8
popppiees
4
2.6k
Transcript
Pragmatic Charty 名古屋 Ruby 会議 04 秒速亭⼆⼋四粁
None
None
None
None
内径 35 メートル !!
None
昨夜 ロース味噌かつ ⼿⽻先 天むす
今朝 串カツ エビフライ おいしいお茶
お茶 直前の発表で joker1007 さんはお茶を濁すって⾔ってたけど 今朝のは濁っていないきれいなお茶でした
茶
茶 :tea:
...... !!!
"Charty"
(@amatsuda says...)
red-data-tools/charty Visualizing your data in Ruby
Visualizing your data in Ruby って たとえば
None
None
None
None
みたいなのが簡単に出⼒できちゃう
red-data-tools/charty You need to write very few lines of code
for representing what you want to do. It lets you focus on your analysis of data, instead of plotting.
red-data-tools/charty 過去の発表 Charty を知ってほしいなあ。開発者が増えたらうれしいなあ。 RailsDM 2019 RubyKaigi 2019 - RubyData
Workshop
red-data-tools/charty 今⽇の発表 Charty を知ってほしいなあ 名古屋でも開発者が増えたらうれしいなあ 実⽤的な話もしたい ← New!!
Charty を知ってほしいなあ について
Charty の基本情報 前提ぽいことを話すと⻑いので、ちょっと駆け⾜で説明します。 ここわからないんだけど!というのがあったら補⾜するので発表中で も声かけて頂いて⼤丈夫です! (今⽇は最後までいるので発表後に聞いてくれても良いです!)
None
最近の状況を踏まえて (RubyKaigi 2019 での発表以降、⾊々と開発が進んだので最新情報 を説明します)
Data Abstraction Layer Daru::DataFrame Numo::NArray NMatrix ActiveRecord benchmark_driver (Charty Adapter)
Plotting Abstraction Layer PyPlot (matplotlib.pyplot) Gruff rubyplot Google Charts ←
New!! chart.js (experimental) (bokeh) 実装予定 (Plotly) よさそう。実装予定 GR Framework ( 再考。薄いラッパーを⽤意するか)
None
Simple usage require 'charty' charty = Charty::Plotter.new(:pyplot) bar_plot = charty.bar
do series [0,1,2,3,4], [10,40,20,90,70], label: "sample" end bar_plot.render("sample.png")
GitHub を⾒たり、デモをしながらい くつかのサンプルを紹介します 実はここにサンプルがいろいろ⼊っている。 https://github.com/red-data-tools/charty/tree/master/examples
名古屋でも開発者が増えたらうれしい なあ について
最近の Charty 開発のようすを紹介し ようと思います
RubyKaigi 2019 コード懇親会にて 3 ⼈からの合計 3 つの pull request がマージまでたどり着いた。
内 2 ⼈は OSS のコードで pull request ははじめだったとのこと これらは⾃分以外の⼈が開発をしたから分かったモノ達である。 Unstrict dependency version for bundler by tomog105 · Pull Request #4 · red-data-tools/charty Adds MacOS installation to README by Chinats · Pull Request #5 · red-data-tools/charty Fix typo in examples/daru.rb by kantarow · Pull Request #6 · red-data-tools/charty
RubyKaigi 2019 の翌⽇ After Hack にて 実際に使っている backend を⾒てもらえると助かる例: Gruff
現在は Pyplot がリファレンス実装的位置づけなので( プロット可能な グラフが⼀番多い。などが理由) 直接話しながら背景を踏まえて⼀緒に開発したら捗った例と⾔えそう add an instruction for Ubuntu + pyenv by hasumikin · Pull Request #8 · red-data-tools/charty Add label option to series at README by yaboojp · Pull Request #9 · red-data-tools/charty
RubyKaigi 以降、現在まで Add google charts backend by indigolain · Pull
Request #11 · red-data-tools/charty Abstract plotter by kantarow · Pull Request #13 · red-data- tools/charty Use volume mount in Dockerfile.dev by kei-s · Pull Request #15 · red-data-tools/charty fix travis ci by katsyoshi · Pull Request #17 · red-data- tools/charty あとは、コミット権を持っている⼈の分は書いていないけれど、裏側 の設計、実装の整理が最近進⾏していたりします。
How to development
Development with Docker (@koic さんの " 海外Ruby カンファレンスへの踏み出し⽅" に学ぼう!) (yn-misaki
さんの 開発環境のに関する話でも⾔及していましたね。) たとえば突然いつもの開発⽤マシンを失うことだってある。そんな時 にもすぐに開発再開が可能となるのは便利。 今ならこれだけで動かせます! $ bundle install $ docker build -f ./Dockerfile.dev -t charty-dev:0.1 . $ docker run -it -v ${PWD}:/charty -w /charty charty-dev:0.1 ./bin/console irb(main):001:0> Charty::VERSION => "0.1.4-dev"
最近はどんな⼈が、どういうことをや っているか、という話 Gruff bokeh Chart.js Plotly
Ruby Association Grant のはなし https://www.ruby.or.jp/en/news/20181106
実⽤的な話もしたい
Gruff が古い RMagick に依存している 件 先ほど話した、Charty が Gruff から他の何かへの移⾏パスになり得 るという話。
( もし話していなかったら、ここで話します)
ActiveRecord との組み合わせ image ファイルの場合はまあ、Gruff を置き換えるだけという感じ JavaScript ライブラリと組み合わせた場合はどう? デモをします Chart.js の場合、pan
とか、pinch in, out をするために hammber.js に依存している辺りがちょっと気になっている。 react だったり、他の何らかの javascript のライブラリと組み合わ せた時⼤丈夫なもの? まだ調べられていない。知っている⽅がいたら教えてほしいで す! こちらはまだ実装が無いのですが、bokeh.js や、plotly の⽅が本 命。という感じはしています。
再びバックエンドの切り替えが楽とい う話 それらが後にバックエンドとして実装されたら、バックエンドを簡 単に切り替えればそのまま使えるというのも Charty のメリット まだしていなかったら、Plotly のおもしろそうな機能の話
284km/benchmark_driver-output- charty $ be benchmark-driver examples/parse.yaml -o charty
red-datasets を⽤いての例 デモしながら説明します!
Future Plans 実⽤的な例を⽰そうと思った時、例えば他の⾔語やライブラリのサ ンプルと同様のデータセットを red-datasets に追加して、同様の こういうことはカバーしています。という⾒せ⽅ができると説得⼒ がありそう。とここ最近考えるようになりました。 最近 Charty
の interface を変えているせいで、rubydown との連携 が壊れていると思う。直す。(スミマセン Charty を使えそうなところ ( 使うメリットがある部分で使っていく) Charty を導⼊したいとか、既存のグラフライブラリから置き換え たい。気になる。などありましたら是⾮気軽に声をかけてください
こう書く⽅向に変更しようと現在考えている foo = Foo.where(...) plot = Charty.bar(:price, :sales, foo, plotter:
:google_chart) plot.render
Practicality and Continuity ⼿元のブランチで実はあるリポジトリの gruff を Charty にほぼ置 き換えたやつがある。 少しづつ試してみて、いけそうな段階に達したら切り替えようかと
Join us! Red Data Tools: https://red-data-tools.github.io/ 次は 6/11( ⽕) OSS
Gate 東京ミートアップ for Red Data Tools in Speee オンラインのコミュニケーションはこちら! red-data-tools/ja - Gitter