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
Red Data Tools で切り開く Ruby の未来
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kenta Murata
February 25, 2023
Technology
1.3k
3
Share
Red Data Tools で切り開く Ruby の未来
Ruby 30周年記念イベント LT
Kenta Murata
February 25, 2023
More Decks by Kenta Murata
See All by Kenta Murata
waitany と waitall を作った話
mrkn
0
310
HolidayJp.jl を作りました
mrkn
0
340
Calling Julia functions from Streamlit applications
mrkn
1
580
Method-based JIT compilation by transpiling to Julia
mrkn
0
8.8k
Apache Arrow C++ Datasets
mrkn
4
1.8k
Reducing ActiveRecord memory consumption using Apache Arrow
mrkn
0
1.9k
RubyData and Rails
mrkn
0
3.4k
Tensor and Arrow
mrkn
0
1.1k
RubyData Current and Future
mrkn
1
3.7k
Other Decks in Technology
See All in Technology
Digitization部 紹介資料
sansan33
PRO
1
7.3k
プラットフォームエンジニアリングの実践 - AWS コンテナサービスで構築する社内プラットフォーム / AWS Containers Platform Meetup #1
literalice
1
160
Chasing Real-Time Observability for CRuby
whitegreen
0
110
AzureのIaC管理からログ調査まで、随所に役立つSkillsとCustom-Instructions / Boosting IaC and Log Analysis with Skills
aeonpeople
0
230
扱える不確実性を増やしていく - スタートアップEMが考える「任せ方」
kadoppe
0
300
自分のハンドルは自分で握れ! ― 自分のケイパビリティを増やし、メンバーのケイパビリティ獲得を支援する ― / Take the wheel yourself
takaking22
1
910
みんなの「データ活用」を支えるストレージ担当から持ち込むAWS活用/コミュニティー設計TIPS 10選~「作れる」より、「続けられる」設計へ~
yoshiki0705
0
250
小説執筆のハーネスエンジニアリング
yoshitetsu
0
680
クラウドネイティブな開発 ~ 認知負荷に立ち向かうためのコンテナ活用
literalice
0
120
Standards et agents IA : un tour d’horizon de MCP, A2A, ADK et plus encore
glaforge
0
170
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
2
470
Good Enough Types: Heuristic Type Inference for Ruby
riseshia
1
220
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
340
WCS-LA-2024
lcolladotor
0
540
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Navigating Weather and Climate Data
rabernat
0
170
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
[SF Ruby Conf 2025] Rails X
palkan
2
960
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
110
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
120
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Transcript
Red Data Tools で切り開く Ruby の未来 Kenta Murata 2023.02.25 Ruby
30周年記念イベント LT
Ruby 30 周年おめでとうございます
self.introduction Kenta Murata 株式会社サイカ CRO Apache Arrow と CRuby のコミッター
Red Data Tools メンバー
self.introduction Kenta Murata 株式会社サイカ CRO Apache Arrow と CRuby のコミッター
Red Data Tools メンバー ← 今日はこの立場
Contents 1. Red Data Tools 2. Ruby 用データフレームライブラリ 3. まとめ
Red Data Tools https://red-data-tools.github.io/ja/
Red Data Tools とは Ruby用のデータ処理ツールを開発するプロジェクト いま Ruby 界隈で一番ホットな、データ処理ツールの開発者集団 とてもよいポリシーを掲げている
Red Data Tools プロジェクトのポリシー 1. Rubyコミュニティーを超えて協力する 2. 非難することよりも手を動かすことが大事 3. 一回だけの活発な活動よりも小さくてもいいので継続的に活動することが大事
4. 現時点での知識不足は問題ではない 5. 部外者からの非難は気にしない 6. 楽しくやろう!
詳しくは
Red Data Tools の主なプロダクト Red Arrow ファミリー Apache Arrow の
Ruby バインディング (apache/arrow 内にある) Red Datasets オープンデータにアクセスするための統一インターフェイス Charty 複数のバックエンドをサポートする統計的可視化ライブラリ unicode_plot ターミナルでデータ可視化を行うライブラリ YouPlot ターミナルでデータ可視化を行う CLI ツール (unicode_plot を使用)
詳しくは
Ruby 用のデータフレームライブラリについて
データフレーム? データフレームは表の形のデータ構造 トランザクション処理ではなく分析処理を主な用途とする 表を行指向ではなく列指向で管理
行指向?列指向?
行指向?列指向?
データフレーム? データフレームは表の形のデータ構造 トランザクション処理ではなく分析処理を主な用途とする 表を行単位ではなく列単位で管理 選択、結合、集約などの操作、要素単位の演算 複数のデータフレームを扱う操作と演算
Ruby 用データフレームライブラリ Red Amber Polas Ruby pandas Daru
Red Amber https://github.com/heronshoes/red_amber Red Arrow をバックエンドとしてデータフレームを実装 メモリ上のデータ構造は Arrow 形式 Apache
Arrow C++ の機能を利用できる Ruby にとって自然なインターフェイスを目指している heronshoes さんがモリモリと開発している これも Red Data Tools プロダクトのひとつ
Polars Ruby https://github.com/ankane/polars-ruby Polars という Rust 用データフレームライブラリのバインディング Polars は Rust
版 Apache Arrow を使っててめっちゃ速い (blazingly fast)
Polars の速さ 凄く速いので pandas から polars に乗り換える Kaggler が続出している
Polars Ruby https://github.com/ankane/polars-ruby Polars という Rust 用データフレームライブラリのバインディング Polars は Rust
版 Apache Arrow 使っててめっちゃ速い (blazingly fast) Red Amber と同様にメモリ上のデータ構造は Arrow 形式 Polars の Python 版 API に従って実装されている ankane さんがモリモリと開発している
pandas https://github.com/mrkn/pandas.rb Python 用データフレームである pandas を Ruby から使える pycall を用いて
CPython を直接呼び出す形で実装している pycall のおかげで df.applymap(->(x){ x * 5 }) のような事も可能 pandas の全機能について網羅テストをしてないため、未対応の機能があるかも pycall の制限を引き継ぐので、メインスレッド以外では使えないなどの制限がある
daru https://github.com/SciRuby/daru おそらく最古の Ruby 用データフレームライブラリ Pure Ruby で実装されている!! 遅いけど、Ruby さえあれば動く利点もある
残念ながら最近はまったくメンテされていない
25周年のとき (5年前) にあったもの pandas Daru 30周年目で増えたもの Red Amber Polars Ruby
5年で2つも増えた!! Red Amber は Rubyist が使いやすいデータフレームのインターフェイスを目指している Polars Ruby は最速データフレームの Ruby
バインディング どちらも Apache Arrow という共通基盤の上に乗っている どちらも活発に開発が進んでいる
この波に乗るしかない!! Rubyist にとって使いやすいデータフレームを作れるのは Red Amber の良いところ Red Data Tools に参加して一緒に
Red Amber を盛り上げませんか? 最速を求めて Polars Ruby を弄るのも良いと思う (Charty 対応とか!) Daru をメンテする人も増えてほしい
まとめ: Red Data Tools に参加しよう