PythonではじめるGISとデータ分析そして⚾ / Baseball Analytics and GIS with Python

PythonではじめるGISとデータ分析そして⚾ / Baseball Analytics and GIS with Python

PyCon mini Hiroshima 2019 Talk Session #pyconhiro

2c0947c6a28e7f771ebd9859ecf54e5c?s=128

Shinichi Nakagawa

October 12, 2019
Tweet

Transcript

  1. PythonͰ͸͡ΊΔσʔλ෼ੳ✕GISϓϩάϥϛϯά 2020೥ʹ޲͚ͯͪΐͬͱ͚ͩεϙʔπͷཱྀʹग़Α͏⽁ Shinichi Nakagawa a.k.a. @shinyorke PyCon mini Hiroshima 2019

    Talk Session 2019/10/12
  2. ͜ͷൃදͷςʔϚͱର৅ऀ ஍ਤΛ࢖ͬͨՄࢹԽɾ෼ੳʢGISʣͱ ηΠόʔϝτϦΫε, ͭ·Γʮ⽁ʯΛςʔϚʹ ʮAI͚ͩ͡Όͳ͍ʁPythonΛ஌Ζ͏ʂʯ Λ΍Γ͖͍ͬͯ͘ൃදͰ͢. ର৅ऀ͸Python࢖͍ɾཱྀ޷͖ɾͦͯ͠໺ٿ޷͖Ͱ͢ʂ

  3. ࠓ೔ͷ͓࿩͸ • ʮٿ৔ͷಛ௃ʯΛ౷ܭతʹදݱ&ՄࢹԽ • ϝδϟʔϦʔάٿஂͷʮҠಈڑ཭ʯͷ࿩ • ʮҠಈڑ཭ʯ͕νʔϜʹ༩͑ΔӨڹ #ͱ͸ • ͜ΕΒΛPythonͱԿ͔Ͱ෼ੳɾ༡Ϳํ๏

    • ޷͖ͳ͜ͱɾ೤தͰ͖Δ͜ͱͰϓϩάϥϛϯάΛ
  4. ࿩͞ͳ͍͜ͱ • Webϓϩάϥϛϯάͷ͋Ε͜Ε
 ˠCFPʹೖΕͯ·͕ͨ͠ํ਑ม͑·ͨ͠ :bow: • ೔ຊϓϩ໺ٿͷ࿩
 ˠ͍ͭ࠷ۙ·Ͱͷ࢓ࣄ͕Ͱ͢Ͷ(ry #࡯͠ •

    ࠓͷ࢓ࣄͷ࿩
 ˠࣗݾ঺հͰগ͚ͩ͠, ڵຯ͋Δํ͸Ͱͥͻ.
  5. Who am I?ʢ͓લ୭Αʣ • Shinichi Nakagawa(@shinyorke) • ͔ͭͯ໺ٿΤϯδχΞΛ࢓ࣄʹͯͨ͠ਓ • ઌ݄·Ͱɿʮϓϩʯͷ໺ٿΤϯδχΞ

    • ࠓ݄͔Βɿʮ໺ੜʯͷ໺ٿΤϯδχΞʢʹ෮ؼʣ • Python΋͘΋ࣗ͘शࣨ(#rettypy)ΦʔΨφΠβʔ • Web, σʔλαΠΤϯε, Opsʹ⽁ΛPythonͰ΍Δਓ
  6. ʊਓਓਓਓਓਓਓਓਓʊ ʼɹಥવͷస৬ใࠂɹʻ ʉY^Y^Y^Y^Y^Y^Y^Yʉ

  7. ʲҠ੶ઌʳJX௨৴ࣾ • ࠓ݄͔ΒʢגʣJX௨৴ࣾͷSenior Engineerʹ • σʔλج൫ΛθϩϕʔεͰ্ཱͪ͛ͷ࢓ࣄ
 ʢଞ, Pythonؔ࿈ͷ͋Ε͜Εɾ࠾༻޿ใͳͲʣ • స৬ͷܦҢɾϙΤϜ౳͸ϒϩάʹͯ


    https://shinyorke.hatenablog.com/entry/it-really- could-happen
  8. JX௨৴ࣾ #ͱ͸ ؾʹͳΔํ͸ޙ΄ͲλΠϜͰʂ
 Corp: https://jxpress.net/ Twitter: @jxpress_corp

  9. ౜ಥͳ࿩Ͱ͸͋Γ·͕͢ʂ

  10. ཱྀߦ,޷͖Ͱ͔͢?ࢲ͸޷͖Ͱ͢. ΄΅Ұਓཱྀ͔͠΍Γ·ͤΜ͚ͲͶ. ୭͔ͱߦ͚ͬͯ?͍΍ͦΕ͸(ry

  11. ಛʹ͓৓ʹߦ͘ͷ͕޷͖Ͱ͢. ࣮͸ྺ࢙େ޷͖ϚϯͰಛʹઓࠃʙ҆౔౧ࢁ͋ͨΓ͕େ޷෺ ࣸਅ͸6೥લʹొͬͨ۽ຊ৓ఱकֳΑΓʢ޿ౡ৓͡Όͳͯ͘ :bow:ʣ

  12. ೔ຊͷ͓৓͸3ͭʹ෼ྨ͞ΕΔ ઓࠃ࣌୅Ҏ߱,ߐށ࣌୅·Ͱͷ۠෼. ઓࠃ࣌୅Ҏલ͓Αͼ໌࣏Ҏ߱(ޒྏֲͳͲ)Λআ͘ ࢁ৓ ฏࢁ৓ ฏ৓

  13. ೔ຊͷ͓৓ͷछྨɹ˞ॾઆ͋Γ λΠϓ ୅ද֨ ໨తɾಛ௃ ࢁ৓
 ʢ΍·͡Ζʣ ஛ా৓ ذෞ৓ ɾࢁʹݐͯΔ৓Ͱओʹઓ૪໨త
 ɾ؂ࢹ༻ͷࡆɾญΛಗ͏അग़͠FUDʜ


    ɾਓ͸ݪଇॅ·ͳ͍ ઓͷ࣌ʹ᝷΋Δ ฏࢁ৓
 ʢͻΒ΍·͡Ζʣ ඣ࿏৓ ۽ຊ৓ ɾ܉ࣄɾ੓࣏ͷத৺Ͱٰɾখࢁʹங৓
 ɾઓ૪ͷࢪઃ ৓Լொ ډॅࢪઃ
 ɾࢁ৓ɾฏ৓ͷ͍͍ͱ͜औΓ ฏ৓ ʢͻΒ͡Ζʣ େࡔ৓ ޿ౡ৓ ɾ੓ܦத৺Ͱओʹฏ஍ʹங৓ ɾ੓ிɾډॅ஍ͱͯ͠ͷػೳ༏ઌ ɾ৓ͱ͍͏ΑΓٶ఼ͱ͔׭ఛ
  14. ͦΜͳ͓৓ʹࣅ͍ͯΔࢪઃ͕ εϙʔπք⽁ʹ΋͋Δ͜ͱ օ͞Μ͓ؾ͖ͮͩΖ͏͔ʁ

  15. ʲ౴ʳ໺ٿ৔. ߈ܸ༗རɾकඋෆརʢ·ͨ͸ͦͷٯʣͱ͍͏ ·ΔͰ͓৓ͷΑ͏ʹಛ௃͕ଘࡏ͢Δ

  16. ٿ৔͸ೋछྨʹ෼ྨ͞ΕΔ. ͦΕ͸ʮଧऀఱࠃʯͱʮ౤खͷָԂʯ ੈքతʹ΋ͦΜͳ෼ྨ͔ͭ, ΍͖͏ϑΝϯͷօ͞ΜΘ͔Δ΍Ζʁ(࡯͠ ଧऀఱࠃ ౤खͷָԂ

  17. ଧऀఱࠃɾ౤खָԂͷڥ໨ • ʮ෺ཧʯͱʮ஍ཧʯͰٿ৔ͷಛ௃͕΄΅ܾ·Δ • ෺ཧɿ֎໺ɾϑΝʔϧκʔϯͷ޿͞ͳͲ • ஍ཧɿւͷۙ͘ɾࢁͷ্ɾ෩ͷ༗ແͳͲ • ͜ΕΒ͕བྷΈ߹͍, ͓৓ͱಉ༷ݸੑతͳٿ৔͕ര஀

    • ʮύʔΫϑΝΫλʔʯͱ͍͏ࢦඪͰ٬؍తʹΘ͔Δ
  18. ͔ͬ͜Β໺ٿͷ࿩૿͑ΔΑʂʢਏ͘ͳ͍ʣ લड़ͷ௨ΓϝδϟʔϦʔάͷ࿩͕த৺ͷͨΊ ਏ͘͸ແ͍ͱࢥ͍·͢ʢҙ༁ɿ25൪ͱ֎εϥؔ܎ͳ͍ʣ

  19. ύʔΫϑΝΫλʔ is Կ • ʮଞٿ৔ͱൺ΂ͯ, ϗʔϜϥϯʢ΋͘͠͸ಘ఺ʣ͕ग़΍͍͔͢൱͔ʁʯ
 Λࣔ͢ࢦඪ͕ύʔΫϑΝΫλʔʢPF, Park Factorʣ. •

    ຊྥଧ͕ର৅͕ͩ,ҎԼͷϝτϦΫεͰग़͢͜ͱ΋. • ಘ఺ʢຊྥଧͱಉ͘͡Β͍Α͘࢖ΘΕΔʣ • ௕ଧʢೋྥଧ, ࡾྥଧʣ • ୯ଧ΋͘͠͸ώοτ਺શମ • ฏۉతͳٿ৔͸1.0, ͜ΕΑΓଟ͍/গͳ͍ͰධՁ͢Δ.
  20. ਺ࣜ PF = {(A+B) / Home} / {(C+D) / Away}

    A:ຊڌ஍Ͱͷຊྥଧ਺
 B:ຊڌ஍Ͱͷඃຊྥଧ਺
 C:ଞٿ৔Ͱͷຊྥଧ਺
 D:ଞٿ৔Ͱͷඃຊྥଧ਺
 Home: ຊڌ஍ࢼ߹਺
 Away: ଞٿ৔ࢼ߹਺ ※ຊྥଧΛଞͷࢦඪʢಘ఺ͳͲʣʹมߋ͢ΔͱԠ༻Ͱ͖㽂
  21. ύʔΫϑΝΫλʔΛPythonͰ • MLBͷΦʔϓϯσʔλʮRetrosheetʯͷ
 eventʢଧ੮ʣσʔλ͔Βࢉग़Ͱ͖Δ • RetrosheetͷบͬΆ͍σʔλΛCSVʹͯ͠, PandasͰαϚϦʔ͢Δ • ਺ࣜ͸γϯϓϧ͕ͩҎ֎ͱॲཧେม(ry

  22. ʲsampleʳPark Factor(งғؾ) # طʹSQLʹඞཁͳσʔλΛೖΕͯΔલఏͷίʔυ # ٿ৔Ϧετ(࠷ޙʹ͜ΕʹPFΛ଍ͯ͠CSVʹ͢Δ) df_parks = pd.read_sql("select park_id,

    home_team_id, name, lat, lng from parks where home_team_id !=''", connection) parks = {} for r in df_parks.to_dict('rows'): parks[r['home_team_id']] = r['park_id'] # தུ # 2018೥ͷΠϕϯτ৘ใʹٿ৔ίʔυΛ৐͚ͬΔ query = """ -- Πϕϯτ৘ใʹٿ৔ίʔυΛ͚ͬͭ͘Δ select g.game_id, g.park_id, g.home_team_id, g.away_team_id, e.inn_ct, e.bat_id, e.pit_id, e.origin from events as e inner join games g on e.game_id = g.game_id where g.game_dt between '{start}' and '{end}' """ df_event2018 = pd.read_sql(query.format(start='2018-03-01', end='2018-11-30'), connection)
  23. ʲsampleʳPark Factor(งғؾ) # ͢Ͱʹຊྥଧɾࡾྥଧɾೋྥଧɾ୯ଧΛલॲཧͯ͠਺͑ͯΔલఏ(ίʔυͷத਎͸ൿີ) teams = [] COLUMNS_HOME = ['home_team_id',

    'park_id', 'hr', 'triple', 'double', 'single', 'hits'] COLUMNS_AWAY = ['away_team_id', 'hr', 'triple', 'double', 'single', 'hits'] for team in df_event2018['home_team_id'].unique(): home_stadium = parks[team] _df_home = df_event2018.query(f'home_team_id == "{team}" and park_id == "{home_stadium}"') home_games = len(_df_home['game_id'].unique()) _df_home = _df_home[COLUMNS_HOME].groupby(['home_team_id', 'park_id'], as_index=False)[COLUMNS_HOME].sum() _df_away = df_event2018.query(f'away_team_id == "{team}"') away_games = len(_df_away['game_id'].unique()) _df_away = _df_away[COLUMNS_AWAY].groupby(['away_team_id'], as_index=False)[COLUMNS_AWAY].sum() teams.append({ 'park_id': home_stadium, 'team': team, 'home_games': home_games, 'home_hr': _df_home['hr'][0], 'home_triple': _df_home['triple'][0], 'home_double': _df_home['double'][0], 'home_single': _df_home['single'][0], 'home_hits': _df_home['hits'][0], 'away_games': away_games, 'away_hr': _df_away['hr'][0], 'away_triple': _df_away['triple'][0], 'away_double': _df_away['double'][0], 'away_single': _df_away['single'][0], 'away_hits': _df_away['hits'][0], }) df_pf = pd.DataFrame(teams)
  24. ʲsampleʳPark Factor(งғؾ) # ࢉग़͸γϯϓϧͳྻಉ࢜ͷԋࢉ # ຊྥଧ df_pf['pf_hr'] = (df_pf['home_hr']/ df_pf['home_games'])

    / (df_pf['away_hr']/ df_pf['away_games']) # ௕ଧ df_pf['pf_triple'] = (df_pf['home_triple']/ df_pf['home_games']) / (df_pf['away_triple']/ df_pf['away_games']) df_pf['pf_double'] = (df_pf['home_double']/ df_pf['home_games']) / (df_pf['away_double']/ df_pf['away_games']) # ୯ଧ df_pf['pf_single'] = (df_pf['home_single']/ df_pf['home_games']) / (df_pf['away_single']/ df_pf['away_games']) લॲཧؚΊͯ, ؤுΕ͹100ߦఔ౓ͷίʔυͰ ϝδϟʔϦʔάͷPFʢຊྥଧ, ࡾྥଧ, ೋྥଧ, ୯ଧʣ͕Ͱ͖Δ
  25. ຊྥଧ͕Α͘ೖΔٿ৔Top5 ॱҐ ٿ৔ ຊྥଧ1' ಛ௃  (SFBU"NFSJDBO#BMM1BSL  Ϩοζຊڌ஍ ֎໺ͱϑΝʔϧκʔϯڱ͍

     $PPST'JFME  ϩοΩʔζຊڌ஍ ඪߴ NͰؾѹ௿͍  (MPCF-JGF1BSLJO "SMJOHUPO  Ϩϯδϟʔζຊڌ஍ ϥΠτ͕લʹग़͍ͯͯଧऀ༗ར  $JUJ[FOT#BOL1BSL  ϑΟϦʔζຊڌ஍ ӈதؒɾࠨத͕ؒڱ͍  /BUJPOBMT1BSL  φγϣφϧζຊڌ஍ ͜͜΋ࠨதؒڱ͍
  26. ຊྥଧ͕ೖΓʹ͍͘ٿ৔Top5 ॱҐ ٿ৔ ຊྥଧ1' ಛ௃  .BSMJOT1BSL  ϚʔϦϯζຊڌ஍ ޿ͯ͘ւ͕͍ۙ

     "551BSL  δϟΠΞϯπຊڌ஍ ຊྥଧ͕ւʹೖΔ͙Β͍͍ۙ  0BLMBOE"MBNFEB$PVOUZ $PMJTFVN  ΞεϨνοΫεຊڌ஍ ϑΝʔϧκʔϯ͕༰ࣻͳ͘޿͍  4VOUSVTU1BSL  ϒϨʔϒεຊڌ஍ ೥Φʔϓϯͷ৽͍͠ٿ৔  1/$1BSL  ύΠϨʔπຊڌ஍ ࠨཌྷɾࠨதؒ޿͍ಛ௃తͳٿ৔
  27. ͪͳΈʹՄࢹԽ͢Δͱ by Plotly Թ͔͍৭ = Ԍ্͠΍͍͢ٿ৔ʢຊྥଧɾಘ఺ʣ

  28. ʁʁʁʮٿ৔Ͳ͜ʹ͋Δϯΰʁʯ ϝδϟʔϦʔάݏ͍ڵຯͳ͍ਓ͸ಥવ৔ॴݴΘΕͯ΋ʁ ͬͯͳΔͱࢥ͏ʢͦΒͦ͏Αʔʣ

  29. ʲղܾࡦʳࢦඪͱҰॹʹ஍ਤʹ͹Β·͘ ٿ৔ͷॅॴ͸ͦ͏ͦ͏มΘΒͳ͍ͷͰ ͩͬͨΒ஍ਤ্ʹ͓͍ͯΈͯ͸ʁ͍ͬͯ͏

  30. ஍ਤʹ·͘ = Geocoding͢Δ • Ң౓ʢLatitudeʣ,ܦ౓ʢLongitudeʣΛग़͠
 ͻͱ·ͣ஍ਤ্ʹ͹Β·͍ͯΈΔ • ॅॴɾϥϯυϚʔΫʢࠓճ͸ٿ৔ʣ͔Β
 Ң౓ܦ౓Λग़͢, ͍ΘΏΔʮGeocodingʯ

    • PythonͩͱʮGeoPyʯͰͰ͖Δͧ
  31. GeoPy • PythonͰGeocoding͢Δͱ͖ͷఆ൪ϥΠϒϥϦ • ෳ਺ͷΠϯλʔωοτ஍ਤʢGoogle, Azure, OSM, etc…ʣͷAPIΛಉ͡Α͏ͳίʔυͰPython͔Βѻ͑Δ • ެࣜυΩϡϝϯτ͕ৄ͍͠ͷͰਅࣅ͢Ε͹େମ͍͚Δ

    • https://geopy.readthedocs.io/en/stable/#
  32. GeoPyͰٿ৔໊͔ΒGeocoding • MLBͷSean Lahman Databaseʹ
 ٿ৔σʔλ͕͋Δʢ͜Ε΋Φʔϓϯσʔλʣ • ٿ৔ͷ໊લͱ౎ࢢ໊Λ࣋ͬͯΔͷͰ, ͔ͦͬΒ Geocodingͯ͋͛͠Ε͹OK

    • શମͷ7ׂ͸͜ΕͰΠέͨ, ࢒Γ͸ख࡞ۀ(ry
  33. ʲsampleʳGeoPyͰGeocoding import csv import time from geopy.geocoders import Nominatim #

    Geocoder(ͲͷαʔϏε࢖͏͔)ࢦఆ from geopy.exc import GeocoderTimedOut from retry import retry # ࠓճ͸OSMϕʔεͷ΋ͷΛ࢖͏ geoLocator = Nominatim(user_agent='Baseball Radar24 / 0.1 shinyorke@example.com’) # Geocoding͍ͯ͠Δͱ͜Ζ. งғؾΛݟͯRetry @retry((GeocoderTimedOut, ), delay=5, backoff=2, max_delay=4) def get_location(name, alias): loc = geoLocator.geocode(name) if not loc: loc = geoLocator.geocode(alias) return loc # ٿ৔໊ΛGeocodingͰ͖ΔΑ͏ʹͪΐͬ͜ͱ͚ͩΫϨϯδϯά def park_name(name): return name.replace('I', '').replace('II', '').replace('III', '').replace('IV', '').strip() Nominatimͱ͍͏OSMσʔλͷAPIͰGeocoding ٿ৔໊͸geocodersʹؾʹೖΒΕΔΑ͏ʁʹͪΐͬͱ͚ͩΫϨϯδϯά
  34. ʲsampleʳGeoPyͰGeocoding # ͔ͬ͜Β࣮ߦ # ٿ৔Ϧετ values = [] with open('./datasets/baseballdatabank/Parks.csv',

    'r') as f: reader = csv.DictReader(f) for r in reader: values.append(r) # GeocodingΛͻͨ͢Β࣮ߦ locations = [] for park in values: loc = get_location(park_name(park['park.name']), park_name(park['park.alias'])) if loc: locations.append( { 'id': park['park.key'], 'name': park['park.name'], 'lat': loc.latitude, 'lng': loc.longitude, 'address': loc.address, 'state': park['state'], 'country': park['country'] } ) else: print('geo not found: ', park['park.name'], park['park.key']) # CSVʹॻ͖ࠐΈ fields = ['id', 'name', 'lat', 'lng', 'address', 'state', 'country'] with open('./datasets/parklist.csv', 'w') as f: writer = csv.DictWriter(f, fieldnames=fields) writer.writeheader() for loc in locations: writer.writerow(loc) CSVΛಡΈࠐΜͰͻͨ͢ΒGeocodingͷؔ਺ΛݺͿ ͜ͷล͸ׂͱී௨ͷεΫϦϓτͩͬͨΓ͢Δ
  35. ՄࢹԽ͸kepler.glͰ • JupyterͰ΍ͬͯ΋͍͍ͷͰ͕͢,΍ͬͺΓ
 WebΞϓϦͱͯ͠΍Γ͍ͨʢཧ༝͸ޙ΄Ͳʣ • ͱ͸͍͑θϩ͔Β࡞Δͱൃදʹؒʹ߹Θͳ͍
 ͷͰkepler.glͱ͍͏OSSͷྗΛआΓΔ • Uber͕։ൃ,஍ਤ͸mapbox, MIT

    Licence
  36. ࠓճͷ΍Γํ • ࢦඪܭࢉɾGeocoding͓ΑͼલॲཧࡁΈͷ
 ٿ৔σʔλΛCSVʹͯ͠อଘ • खݩͰkepler.glͷσϞΛಈ͔͠, CSVΛUP
 ※kepler.glຊମ͸ReactϕʔεͷSPA • ͋ͱ͸ͻͨ͢ΒύϥϝʔλΛ͍ͬͯ͡


    ͔͍͍ͬ͜ՄࢹԽΛ໨ࢦͨ͠
  37. ʲྫʳ֤ٿ৔ͷຊྥଧɾೋྥଧͷ਺ΛՄࢹԽ ຊྥଧ͕ͨ͘͞Μग़Δͱ͜Ζ,ೋྥଧʢҎԼಉจʣ ͜Ε͸ׂͱಛ௃͋ͬͯ໘ന͍

  38. ʁʁʁʮ޿ͯ͘Ҡಈେมͦ͏ʢ͜ͳΈʣʯ ϝδϟʔϦʔά͸೥ؒ162ࢼ߹, ϓϨʔΦϑɾOPઓࠐͩͱ200ࢼ߹Λ௒͑Δ ࠃ಺Ͱ΋͕࣌ࠩ͋ΔΞϝϦΧࠃ಺ΛճΔ্, كʹւ֎Ͱࢼ߹΋ʢ౦ژ,γυχʔ, ϩϯυϯetc…ʣ

  39. ௐ΂ͯΈͨ • 2018γʔζϯMLB30ٿஂͷ೥ؒҠಈڑ཭ • εέδϡʔϧΛݩʹେݍڑ཭Ͱࢉग़ • ઌఔGeocodingͨ͠σʔλΛͻͨ͢Βฒ΂ͯ ڑ཭Λग़ͯ͠߹ࢉ, ͜Ε΋PandasͰࡁ·ͤͨ

  40. Ҡಈڑ཭ϥϯΩϯά2018 1Ґ͕40,000ϚΠϧ, 30Ґ͕20,000ϚΠϧͪΐ͍

  41. ͪͳΈʹ্Ґ5νʔϜ 5νʔϜத5νʔϜ͕֤Ϧʔάͷ੢஍۠ ώϡʔετϯ͸ԕ͍ԕ͍γΞτϧɾΦʔΫϥϯυ૬ख͕ଟ͍

  42. ʁʁʁʮ௕ཱྀ͸͔ͭΕΔͷͰ͸ʁʯ ϝδϟʔϦʔά͸֤νʔϜઐ༻ػʢνϟʔλʔػʣͰҠಈ͍ͯ͠Δ ͱ͸͍͑, ೥ؒ40,000mileҎ্ͷҠಈͬͯπϥϛͳͷͰ͸ʁʁ

  43. ʲۓٸݕূʳ Ҡಈڑ཭ͷ௕͞͸ νʔϜͷύϑΥʔϚϯεʹ ͲΕ΄ͲӨڹ͢Δͷ͔ʁ

  44. ݕূํ๏ • ೥ؒͷҠಈڑ཭ͱओཁࢦඪͷϚτϦΫεΛग़͢ • উ཰ • ಘࣦ఺ࠩ • ༧ଌউ཰ʢϐλΰϥεউ཰ʣ ※ಘࣦ఺͔Βউ཰Λग़͢

    • ͳʹ͔ۙͦ͏ͳ΋ͷ͕ݟ͔ͭͬͨΒϥοΩʔ • Ռ࣮ͨͯ͠ࡍ͸…ʂʁ
  45. ʲਤʳҠಈڑ཭ͱ֤ࢦඪͷϚτϦΫε ࢦඪ͸উ཰ͱϐλΰϥεউ཰Λ࢖༻

  46. ʁʁʁʮ͓͔͍͠ͷ͸͓લͷҠಈڑ཭ͩΑʯ ૬ؔ܎਺Λग़͢·Ͱ΋ͳ͍݁Ռʹʢ਒͑ʣ

  47. Ҡಈڑ཭ͱউ཰ؔ܎ͳ͍ཧ༝ • ͦ΋ͦ΋ྑ͍બख͕ଟ͍ͷͰҠಈڑ཭ؔ܎ͳ͍ • Ҡಈखஈ✈͕ڑ཭௕͍νʔϜ͸ྑ͍ඈߦػʹ
 ৐ͬͯΔՄೳੑ͕ඍϨଘ • બखͷೖΕସ͑ɾى༻্͕खͳͷ͔΋͠Εͳ͍ • Ҡಈڑ཭ΑΓΉ͠Ζٿ৔ͱ͔ॅ؀ڥͷํ͕ॏཁʁ

    ͋͘·ͰԾઆͰ͢, ূ໌͢Δͷ͸͖ͬͱ͜Ε͔Β
  48. ʲۓٸݕূʳ Ҡಈڑ཭ͷ௕͞͸ νʔϜͷύϑΥʔϚϯεʹ ͲΕ΄ͲӨڹ͢Δͷ͔ʁ

  49. ʲ౴ʳଞͷཧ༝ 33 - 4 Ҡಈڑ཭ #Ҡಈڑ཭·ؔ͡܎ͳ͍ #ދ͞Μ΋ͬͱؔ܎ͳ͍ #ͳΜͰ΍Hanshinؔ܎ͳ͍΍Ζ

  50. ਏ͍Ͱ͢… ͍΍,ͳΜͱͳͦ͘Μͳ༧ײ͸ͨ͠ΜͰ͚͢ͲͶ()

  51. Կނ͜Μͳͩ͘Βͳ͍ ʮ໺ੜͷݚڀʯΛ͢Δͷ͔ʁ #ͦΖͦΖΦνͰ͢

  52. ͷ,લʹ…

  53. ࠷ۙΑ͋͘Δ෩ை ※ݸਓతͳݟղͰ͢

  54. ɾϫΠ͸AIͷਓʹͳΔΜ΍ʂʂʂػցֶशΤϯ δχΞʹͳΔΜ΍ʂʂʂ ɾAIͱ͔ػցֶशͬͯݴ͏ͨΒPython֮͑Ε͹ ͑͑Μ΍Ζʂʂʂʂ ͍ͭͷࠒ͔ΒͰ͠ΐ͏͔ɺσʔλαΠΤϯςΟ ετ΍ΤϯδχΞΛ໨ࢦ͢ํ͕ଟ͍Pythonք۾ ͰͦͷΑ͏ͳ෩ைɾݴઆ͕ੜ·Εɺݱࡏͦͷ܏ ޲͕·͢·͢ڧ·͍ͬͯΔΑ͏ʹݟड͚ΒΕ· ͢ɻ #͋͘·Ͱݸਓͷݟղ

    #͕ͩ֎Εͯͳͦ͞͏
  55. ͦΓΌ·͋ਅ࣮ͩ͠ Θ͔Δؾ΋͢Δ͚Ͳ ΋ͬͱγϯϓϧʹָ͘͠ ʮ໺ੜͷݚڀʯ͠·ͤΜ͔ʁ

  56. ໺ੜͷݚڀ = ڵຯͱISSUE • ʲڵຯʳ΋ͬͱٕज़ɾPythonΛ஌Γ͍ͨ • ͜Ε͔Β࢓ࣄͰ࢖͏΋ͷɾͦ΋ͦ΋Ͱ͖ͳ͍͜ͱΛશྗͰ༡Ϳ • ໘നͦ͏ͳٕज़ɾωλΛ௥ٻָͯ͠͠Έ͍ͨ •

    ʲISSUEʳεϙʔπ✕౷ܭͰ΋ͬͱ໘ന͍ࣄɹ˞ࢲͷ৔߹͸ • ৭ΜͳσʔλɾՁ஋؍͔Βੜ·ΕΔԾઆ • Ṷ͔Δ͔Ͳ͏͔͸ผͱͯ͠,ؾ͕͍ͭͨΒԿ͔΍Γ͍ͨཉ๬ উखʹςʔϚ࡞ͬͯݚڀָͯ͠͠Έ·͠ΐ͏Αʂ݁Ռ࿹΋্͕ΔͷͰ
  57. ͜ͷ࣮ݧͷߦ͖ண͘ઌ͸

  58. ͜ΕͷSports൛ #ଟ෼ Flightradar24 https://www.flightradar24.com/ ͜͏͍͏ͷΛ࡞ΔͷʹWebΛ૝ఆͯ͠·ͨ͠.

  59. ʮAI͚ͩ͡Όͳ͍ʁPythonΛ஌Ζ͏ʂʯ is ʮ༡ͼ͔ΒPythonΛ஌Ζ͏ʂʯ #ͱ͍͏ͷ΋ΞϦ͔ͳ #݁ͼ

  60. ͱಉ࣌ʹ,໘ന͍࢓ࣄ͕ ͨ͘͞Μ͋ΔͷͰ…ʂ

  61. Ұॹʹ΍ͬͯ͜ʂ #஥ؒืूத • αʔόʔαΠυɾϑϩϯτΤϯυɾػցֶश
 ৄ͘͠͸ https://jobs.jxpress.net/ • ϝΠϯݴޠ͸Python, Serverless౳Ϟμϯͳ؀ڥ •

    ॻ੶, IDE, ษڧձࢀՃඅ͸ձࣾෛ୲ • ໿൒਺͕ΤϯδχΞʂ • ؾʹͳΔํ͸ੋඇ੠͔͚ͯͶʂ
  62. ͦΕͰ͸Αཱྀ͍Λ✈ PyCon JP 2020͋ͨΓͰձ͍·͠ΐ͏ʂ Shinichi Nakagawa(Twitter/Facebook/etc… @shinyorke)

  63. ʲAppendixʳ࢖ͬͨ΋ͷҰཡ • σʔλ෼ੳ • Jupyter notebook / Jupyter Lab https://jupyter.org/

    • Pandas https://pandas.pydata.org/ • Plotly https://plot.ly/python/ • GIS • GeoPyʢGeocodingʣ https://geopy.readthedocs.io/en/stable/ • Kepler.glʢVisualizationʣ https://kepler.gl/ • ⚾ ໺ٿɹ˞͢΂ͯMLBͰ͢ • Baseball Databank https://github.com/chadwickbureau/baseballdatabank • Retrosheet https://github.com/chadwickbureau/retrosheet • Analyzing Baseball Data with Rʢॻ੶,༸ॻʣ https://www.amazon.co.jp/dp/B07KRNP2BB