- データを抜く・トラッキングデータDBを立てる
- リーグスタッツで予測値と実測値の補正パラメータを作る
- トラッキングデータの欠損値fill上、推定分布と実際のデータ分布にdiffが生まれるため
- Statcastデータのクリーニング|Student_analysis|note
- クリーニングしても(おそらく)分布は変わらないので、上振れ補正を入れることにする
- 選手単位で分布パラメータ(代表値・歪度・尖度)を取得して、パフォーマンス予測
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.stream-item, .rpl { | |
background-color: black; | |
color: yellow; | |
border-bottom: 2px dashed yellow; | |
} | |
.prf-actions, .prf-meta, .social-proof-container { | |
background-color: black; | |
color: yellow; | |
border: 1px solid yellow; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using HTTP, CSV, DataFrames | |
URL_FORMAT_STR = "https://baseballsavant.mlb.com/statcast_search/csv?all=true&hfPT=&hfAB=&hfBBT=&hfPR=&hfZ=&stadium=&hfBBL=&hfNewZones=&hfGT=R%7CPO%7CS%7C=&hfSea=&hfSit=&player_type=pitcher&hfOuts=&opponent=&pitcher_throws=&batter_stands=&hfSA=&game_date_gt={start_dt}&game_date_lt={end_dt}&team=&position=&hfRO=&home_road=&hfFlag=&metric_1=&hfInn=&min_pitches=0&min_results=0&group_by=name&sort_col=pitches&player_event_sort=h_launch_speed&sort_order=desc&min_abs=0&type=details&" | |
function statcast(start_dt=nothing, end_dt=nothing) | |
if start_dt === nothing | |
start_dt = string(today()) | |
end | |
if end_dt === nothing | |
end_dt = start_dt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
""" | |
GIFマージスクリプト | |
## 仕様 | |
- マージしてサイズが大きくなることを回避するため、(9/10)^(n-1)のサイズにする. (マージ量が増えるとどんどん小さいGIFになる) | |
## 処理フロー |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name MLB.com Prospect List Expander | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Expand MLB.com Prospect List without clicking "Load More" button. | |
// @author prs-watch | |
// @match https://www.mlb.com/prospects/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import docker | |
import jsondiff as jd | |
import re | |
import uuid | |
CLIENT = docker.from_env(timeout=600) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# meta information | |
FROM jupyter/minimal-notebook | |
LABEL maintainer="prs-watch" | |
# setting command | |
RUN pip install -U jupyterlab==0.35.6 | |
RUN jupyter labextension install jupyterlab_voyager | |
RUN jupyter labextension install @jupyterlab/plotly-extension | |
# at directory where this Dockerfile exists.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import umap | |
from pyclustering.cluster import xmeans | |
class FGClusterExecuter: | |
""" | |
FanGraphs stats clustering class | |
""" | |
@classmethod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import requests | |
from requests_oauthlib import OAuth1 as oauth | |
import webbrowser | |
class Settings: | |
""" | |
アプリケーションを登録すると取得出来る認証情報を保持するプロパティクラス。 | |
""" | |
CLIENT_ID = 'XXX' |
NewerOlder