big data baseball with python - ichiro suzuki hacks! #kwsk01
TRANSCRIPT
Ichiro Suzuki - The journey to 3,000 hitsBig Data Baseball With Python( Ruby 01 2016/8/20)
Shinichi Nakagawa@shinyorke
Starting Member
• Who am I ?
• Hack ( )
• MLB Python Hack
Ichiro Suzuki - The journey to 3,000 hits
• &
Who am I?
• Shinichi Nakagawa(@shinyorke)
• Pythonista/Agile & Scrum & Kansan coach/Baseball Analyst
• visasQ( ) Python Engineer
• /Oakland Athletics/RADIOHEAD
※ (21) & Thom Yorke
• Python .
• Hack .
Hack?
• PyConJP 2015 Python Hack
• ( ) Python OSS
• ” ”
Web (
•
• Python &
( Ruby )
Hack! PythonPyCon JP 2015
http://www.slideshare.net/shinyorke/hackpython-pyconjp
Hack! PythonPyCon JP 2015
http://www.slideshare.net/shinyorke/hackpython-pyconjp
Hack! PythonPyCon JP 2015
http://www.slideshare.net/shinyorke/hackpython-pyconjp
Hack!→Big Data Baseball
• etc…
•
• ( )
( , etc…)
• …
•
MLB at BAT MLB
• MLB
• PC Apple TV
• MLB.TV
•
Ichiro Suzuki records 3000th MLB Hits!!!3,000
(8/20) 3,007 ( )
Ichiro Suzuki - The journey to 3,000 hits( Ichiro Suzuki hack)
• 8/7 ( 3,000 )
Ichiro .
• & .
• 3,000 !?
• Python pitchpx 2015-2016
& Get
• & Ichiro Suzuki
• Jupyter + matplotlib
2015-2016
※ ( )$ pip install pitchpx # MLB Dataset library(author: @shinyorke)$ pitchpx -s 20150401 -e 20151005 ./output/ # 2015 Season$ pitchpx -s 20150401 -e 20151005 ./output/ # 2016 Season$ ls -l-rw-r--r-- 1 shinyorke_mbp staff 363988 8 20 14:40 mlbam_atbat_20150401.csv-rw-r--r-- 1 shinyorke_mbp staff 357494 8 6 14:31 mlbam_atbat_20150402.csv( )-rw-r--r-- 1 shinyorke_mbp staff 3429 8 17 20:55 mlbam_umpire_20150912.csv-rw-r--r-- 1 shinyorke_mbp staff 3241 8 6 14:31 mlbam_umpire_20160723.csv
Ichiro &
• pitchpx CSV At Bat Pitch f/x
At Bat: Pitch f/x:
• At Bat Pitch f/x
• pandas .
( )
(At Bat) 30 50MB
(Pitch f/x) 200 300MB
Ichiro Suzuki
$ # $ ls -lah ichiro_suzuki*.csv-rw-r--r--@ 1 shinyorke staff 140K 8 18 01:42 ichiro_suzuki_2015_atbats.csv-rw-r--r--@ 1 shinyorke staff 687K 8 18 01:42 ichiro_suzuki_2015_pitchfx.csv-rw-r--r-- 1 shinyorke staff 74K 8 14 17:06 ichiro_suzuki_2016_atbats.csv-rw-r--r-- 1 shinyorke staff 402K 8 14 17:14 ichiro_suzuki_2016_pitchfx.csv$ wc ichiro_suzuki*.csv 442 7641 143176 ichiro_suzuki_2015_atbats.csv 1636 10368 703882 ichiro_suzuki_2015_pitchfx.csv 233 4026 75543 ichiro_suzuki_2016_atbats.csv 955 6002 411526 ichiro_suzuki_2016_pitchfx.csv 3266 28037 1334127 total
?
( ) ( )
( ) Jupyter
2015/2016 …
F
4 (FF)
2015 2016
.
(CU) (SL) ???
2015 2016
: ( ) : : :
20: 21: 22: 23:
2015 2016
: ( ) : : :
20: 21: 22: 23:
2015 2016
•
•
• ( )
•
• ( )
• ( )
• 3,000
• Pandas
PyCon JP 20169/22( )12:00 ?
Python Hack
&Ichiro !!!
Shinichi Nakagawa(Twitter/Facebook/visasQ:@shinyorke)