28
Ichiro Suzuki - The journey to 3,000 hits Big Data Baseball With Python( Ruby 01 2016/8/20) Shinichi Nakagawa@shinyorke

Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

  • Upload
    -

  • View
    1.405

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Ichiro Suzuki - The journey to 3,000 hitsBig Data Baseball With Python( Ruby 01 2016/8/20)

Shinichi Nakagawa@shinyorke

Page 2: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Starting Member

• Who am I ?

• Hack ( )

• MLB Python Hack

Ichiro Suzuki - The journey to 3,000 hits

• &

Page 3: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Who am I?

• Shinichi Nakagawa(@shinyorke)

• Pythonista/Agile & Scrum & Kansan coach/Baseball Analyst

• visasQ( ) Python Engineer

• /Oakland Athletics/RADIOHEAD

※ (21) & Thom Yorke

• Python .

• Hack .

Page 4: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Hack?

• PyConJP 2015 Python Hack

• ( ) Python OSS

• ” ”

Web (

• Python &

( Ruby )

Page 5: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Hack! PythonPyCon JP 2015

http://www.slideshare.net/shinyorke/hackpython-pyconjp

Page 6: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Hack! PythonPyCon JP 2015

http://www.slideshare.net/shinyorke/hackpython-pyconjp

Page 7: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Hack! PythonPyCon JP 2015

http://www.slideshare.net/shinyorke/hackpython-pyconjp

Page 8: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Hack!→Big Data Baseball

• etc…

• ( )

( , etc…)

• …

Page 9: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

MLB at BAT MLB

• MLB

• PC Apple TV

• MLB.TV

Page 10: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01
Page 11: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Ichiro Suzuki records 3000th MLB Hits!!!3,000

(8/20) 3,007 ( )

Page 12: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Ichiro Suzuki - The journey to 3,000 hits( Ichiro Suzuki hack)

• 8/7 ( 3,000 )

Ichiro .

• & .

• 3,000 !?

Page 13: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

• Python pitchpx 2015-2016

& Get

• & Ichiro Suzuki

• Jupyter + matplotlib

Page 14: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

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

Page 15: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

Ichiro &

• pitchpx CSV At Bat Pitch f/x

At Bat: Pitch f/x:

• At Bat Pitch f/x

• pandas .

( )

Page 16: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

(At Bat) 30 50MB

(Pitch f/x) 200 300MB

Page 17: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

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

Page 18: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

?

Page 19: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

( ) ( )

Page 20: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

( ) Jupyter

Page 21: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

2015/2016 …

Page 22: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

F

4 (FF)

2015 2016

Page 23: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

.

(CU) (SL) ???

2015 2016

Page 24: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

: ( ) : : :

20: 21: 22: 23:

2015 2016

Page 25: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

: ( ) : : :

20: 21: 22: 23:

2015 2016

Page 26: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

• ( )

• ( )

• ( )

• 3,000

• Pandas

Page 27: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

PyCon JP 20169/22( )12:00 ?

Python Hack

Page 28: Big Data Baseball with Python - Ichiro Suzuki hacks! #kwsk01

&Ichiro !!!

Shinichi Nakagawa(Twitter/Facebook/visasQ:@shinyorke)