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
投球を可視化する技術〜Analyzing Pitching Data With Python
Search
Shinichi Nakagawa
March 22, 2016
Research
1
1.1k
投球を可視化する技術〜Analyzing Pitching Data With Python
MLBの一球速報データを使った投球データの可視化をPython他でやってみました.
BPStudy #103 2016/3/22 発表資料
Shinichi Nakagawa
March 22, 2016
Tweet
Share
More Decks by Shinichi Nakagawa
See All by Shinichi Nakagawa
実践Dash - 手を抜きながら本気で作るデータApplicationの基本と応用 / Dash for Python and Baseball
shinyorke
2
1.1k
Terraform, GitHub Actions, Cloud Buildでデータ基盤をProvisioningする / Data Platform provisioning for Google Cloud and Terraform
shinyorke
2
2.8k
Cloud RunとCloud PubSubでサーバレスなデータ基盤2024 with Terraform / Cloud Run and PubSub with Terraform
shinyorke
10
2.8k
自らを強いエンジニアにするための3つの習慣 / I need to be myself, I can't be no one else
shinyorke
77
58k
阪神タイガース優勝のひみつ - Pythonでシュッと調べた件 / SABRmetrics for Python
shinyorke
1
1.3k
Pythonとクラウドと野球の推し活. / Baseball Data Platform for Python and Google Cloud
shinyorke
2
2.7k
月額コーヒー3.34杯分のコストでオオタニサンの活躍を見守るデータ基盤のはなし / Pyhack Con
shinyorke
2
460
俺のDXを実現するためのサーバレスなデータ基盤開発と運用 / Serverless Data Platform and Baseball
shinyorke
5
11k
機械学習エンジニアが目指すキャリアパスとその実話 / My Journey to Become a ML Engineer
shinyorke
9
16k
Other Decks in Research
See All in Research
[依頼講演] 適応的実験計画法に基づく効率的無線システム設計
k_sato
0
130
FOSS4G 山陰 Meetup 2024@砂丘 はじめの挨拶
wata909
1
110
Zipf 白色化:タイプとトークンの区別がもたらす良質な埋め込み空間と損失関数
eumesy
PRO
5
650
LiDARとカメラのセンサーフュージョンによる点群からのノイズ除去
kentaitakura
0
130
Weekly AI Agents News! 7月号 論文のアーカイブ
masatoto
1
220
さんかくのテスト.pdf
sankaku0724
0
340
Leveraging LLMs for Unsupervised Dense Retriever Ranking (SIGIR 2024)
kampersanda
2
190
ニューラルネットワークの損失地形
joisino
PRO
35
16k
ECCV2024読み会: Minimalist Vision with Freeform Pixels
hsmtta
1
140
MetricSifter:クラウドアプリケーションにおける故障箇所特定の効率化のための多変量時系列データの特徴量削減 / FIT 2024
yuukit
2
120
文献紹介:A Multidimensional Framework for Evaluating Lexical Semantic Change with Social Science Applications
a1da4
1
220
ミニ四駆AI用制御装置の事例紹介
aks3g
0
160
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Designing for Performance
lara
604
68k
Side Projects
sachag
452
42k
Git: the NoSQL Database
bkeepers
PRO
427
64k
How to train your dragon (web standard)
notwaldorf
88
5.7k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
A Tale of Four Properties
chriscoyier
156
23k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Transcript
None
Who am I? • Shinichi Nakagawa(@shinyorke) • Pythonista/Agile Software Development/Baseball
Analyst • visasQ(ϏβεΫ) Python Engineer/Scrum Master • ւಓຊϋϜϑΝΠλʔζ/Oakland Athletics • ιχʔɾάϨΠ(OAK)ͷαΠϠϯάड &Ԭւ(ϋϜ)ͷελϝϯୣऔΛ৴͍ͯ͡·͢.
ࠓγʔζϯݟͲ͜Ζ ݟͲ͜Ζ ੈؒͷ෩ை தͷݟղ ༏উνʔϜ ɾιϑτόϯΫ ɾϠΫϧτ ɾϋϜ ɾڊਓPSౡ τϦϓϧεϦʔ
ɾ༄ా༔ذ ࿈ଓ ɾࢁాਓ ࿈ଓ ࢁాਓ ࿈ଓ ΪʔλࡾףͲ͏ͧ ΰʔϧσϯάϥϒ ɾ༄ా༔ذ $' ɾௗ୩ܟ 44 ɾೋਓڞऩ ɾγϣʔτ୭͕ʁ ۙ౻݈հ ϋϜ ɾׂຊ͍͚ΔͰʂ ɾࢦ໊ଧऀPSϥΠτ ۙ౻ ࢦcӈcัcࡾc༡ ˠॅॴෆఆʹͳΔ
Starting Member • ٿHack!2015ৼΓฦΓ • MLBҰٿใσʔλͱٿHack • MLBҰٿใσʔλΛPythonͰHackͯ͠ΈΔ ʙpitchpxͱJupyter +
pandas + matplotlibʙ • ར༻ྫʙؠ۾ٱࢤϊʔώοτϊʔϥϯ • ݁ͼʙࠓޙͷٿHack(PyCon JP 2016ʹ͚ͯ) • ʲΦϚέʳ2016ϓϩٿେ༧
ٿHack!1.0(PyCon JP 2015) • MLBͷࢼ߹͝ͱͷଧ੮σʔλΛHack! • ࢄาʢ࢛ٿʣͷʢΠονVSϘοτʣ • ϐονϟʔͷ݄ผউͪʢδϣϯɾϨελʔʣ •
ຖຖࢼ߹ͷσʔλΛऔಘ&ੳ • ΞμϜɾμϯʢଧऀʣ • ඃΞμϜɾμϯʢखʣ • ৄ͘͠εϥΠυΛޚཡ͍ͩ͘͞ or ʮٿ PythonʯͰάάΖ͏
ٿHack!ʙPythonΛ༻͍ͨσʔλੳͱՄࢹԽ PyCon JP 2015ൃදࢿྉ http://www.slideshare.net/shinyorke/hackpython-pyconjp
ٿHack!ʙPythonΛ༻͍ͨσʔλੳͱՄࢹԽ PyCon JP 2015ൃදࢿྉ http://www.slideshare.net/shinyorke/hackpython-pyconjp ͷωλ
ٿHack!ʙPythonΛ༻͍ͨσʔλੳͱՄࢹԽ PyCon JP 2015ൃදࢿྉ http://www.slideshare.net/shinyorke/hackpython-pyconjp ҰٿใΓ͍ͨϯΰ ˠͷςʔϚʂ
ٿHack!ͱҰٿใ • ࢼ߹ɾଧ੮ͷ݁Ռetc…είΞͰଌΕΔωλΓͬͨײ͋Δ • બखͷނোɾෆௐʢௐʣείΞͰଌΕͳ͍ˠΓ͍ͨ • खͳΒٿɾίϯτϩʔϧɾϘʔϧͷճసɺ खकඋൣғ()ɾεΠϯάεϐʔυͰଌΕΔͷͰʂʁ • Ұٿใͷσʔλ͕͋ΕͰ͖ͦ͏…͋ͬͨʂʂʂ
• ࢼ͠ʹͬͯΈΑ͏ʂʂʂˡࠓίί
MLB at BATʙMLBҰٿใ • MLB࣮گҰٿใαʔϏε • PCαΠτɾεϚϗΞϓϦɾApple TVͳͲ • MLB.TVͱ߹ΘͤͯܖͰ࣮گಈըݟΒΕΔ
• σʔλ͕ͱʹ͔͘ॆ࣮
Analyzing Baseball Data with R • MLBͷΦʔϓϯσʔλʮRetrosheetʯ, MLB at BATใσʔλΛ༻͍ͨσʔλੳɾՄࢹ
Խʹ͍ͭͯॻ͔Ε͍ͯΔॻ੶ʢӳޠʣ • RݴޠΛͬͨੳͱՄࢹԽͷωλ͕ϝΠϯ • ʮpitchRxʯͱ͍͏ɺRݴޠͷϥΠϒϥϦΛ༻͍ͯ at BATσʔλΛऔಘ&ՄࢹԽ
“ʮpitchRxʯͱ͍͏ɺ RݴޠͷϥΠϒϥϦΛ༻͍ͯ at BATσʔλΛऔಘ&ՄࢹԽ”
ʁʁʁʮPythonͰΓ͍ͨΜ͡Όʂʯ ※RΛͲ͏͜͏ݴ͏ͱ͔ͦΜͳҙਤ(ry
pitchpx - Getting MLB dataset • MLB at BATͷҰٿใσʔλΛऔಘ&εΫϨΠϐϯάͯ͠ CSVσʔληοτʹམͱ͢PythonϥΠϒϥϦ.
• pitchRx(R)ͳͲΛࢀߟʹࢲ͕։ൃ͠·ͨ͠. • ίϚϯυϥΠϯπʔϧͰ͢. • Python 3.3.xҎ্ઐ༻ˡڧ͍ͩ͜ΘΓ • PyPIͰެ։͍ͯ͠·͢ʂʂʂʢ୭Ͱ͑Δʣ
͍ํ $ # Python 3.3Ҏ্(ਪPython 3.4Ҏ্)͕ಈ͘ڥͰͬͯͶ $ pip install pitchpx
$ # ྫɿ2015/8/1-8/12·Ͱͷࢼ߹݁ՌΛऔಘ͢Δ $ pitchpx -s 20150801 -e 20150812 -o .
ʲྫʳؠ۾ϊʔώοτϊʔϥϯ • ϚϦφʔζ-ΦϦΦʔϧζͷࢼ߹(2015/8/12)ʹͯɺ ϊʔώοτϊʔϥϯΛܾΊͨؠ۾ٱࢤखͷٿΛੳ • ٿɺϘʔϧͷճసɺετϥΠΫκʔϯɺetc… • pitchpxͰऔಘͨ͠σʔλΛpandasͱ matplotlib(&seaborn)Ͱલॲཧ&ՄࢹԽ •
ڥJupyter notebook(Python 3.5.1)
σϞ (লུ)
ৄ͘͠QiitaͰʂʂʂ ؠ۾ٱࢤ(SEA)ͷφΠεϐονϯάΛPythonͰՄࢹԽ http://qiita.com/shinyorke/items/2c2e2c3976fc2d1ed051
݁ͼʙ2016ͷٿHack! • ͦΒʢࠓٿσʔλͷՄࢹԽ͔ͩΒʣ ͦ͏ʢͭ͗कඋσʔλͷՄࢹԽʹʣ Αɹʢܾ·͍ͬͯΔ͡Όͳ͍͔ʣ • PyCon JP 2016(9/21,22)ɺ ʮAnalyzing
Baseball Data With Pythonʯ ͱ͔ͦΜͳλΠτϧͰͬͱ໘ന͍͕Ͱ͖Δϋζ. • ຊެ։ͨ͠ωλੋඇ༡ΜͰΈͯʂ ˠػցֶशͷࡐͱ͔ʹΠέΔΜ͡Όͳ͍ʁ
ʮҰٿใσʔλͷϥΠηϯεʁେৎͳͷʁʯ ※Ұ൪͋Γͦ͏ͳ࣭
ɿ(ݸਓར༻ఔͳΒ)OK ʲެࣜʳ http://gd2.mlb.com/components/copyright.txt ʲ༁&ղઆʳ http://qiita.com/shinyorke/items/566f1b7e7687492a0c7f
ήʔϜηοτʂʂʂ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠. Shinichi Nakagawa(Twitter/Facebook/hatena:@shinyorke)