6758-Project / hockey

0 stars 0 forks source link

MS1 - Tidy Data (10%) #4

Open JakeColor opened 3 years ago

JakeColor commented 3 years ago

Directions

Create a function to convert all events of every game into a pandas dataframe.

See Google Doc for context

TimkLee commented 3 years ago

Notes:

Q1.

Q2.

Q3.

TimkLee commented 3 years ago

Initial Thoughts/Brainstorm:

Q2. Predict team strength based on events such as "Penalty" or "Fight"?

JakeColor commented 3 years ago

Good thoughts @TimkLee.

For #2, i agree that we can use occurrences of Penalty and related events to write an event parser that would "lookback" over game history to infer each team's strength for shot events.

Specifically, we could implement logic like

TWO_MINUTE_PENALTIES = ['hooking', 'tripping', 'interference'] # ...

for event in events:
  goal_scored = None   # todo
  if penalty_type in TWO_MINUTE_PENALTIES & not goal_scored & time - penalty_time < 2*60:
    team_strength = 5-1
salelkafrawy commented 3 years ago

could you explain this in Hokey on Friday @JakeColor ? I know that we can track the Penalty events to see if a player was out .. maybe I need to look on the Penalty events and see how it is stored in the json file