6758-Project / hockey

0 stars 0 forks source link

Milestone1 tidy data #10

Closed salelkafrawy closed 2 years ago

salelkafrawy commented 2 years ago

Hello Team,

I made the function that takes in a game id and the type of the game (regular or post-season) and retrieve two types of events (shots and goals). Here is a snippet of the event information that is retrieved:

            event_entry = {
                "id": event_id,
                "event_index": event_index,
                "game_id": game_id,
                "type": event_type_id,
                "secondary_type": event_secondary_type,
                "description": event_desc,
                "code": event_code,
                "period": period_num,
                "period_type": period_type,
                "time": event_time,
                "time_remaining": event_time_remaining,
                "date": event_date,
                "goals_home": event_goals_home,
                "goals_away": event_goals_away,
                "team_id": team_id,
                "team_name": team_name,
                "team_code": team_code,
                "shooter_name": shooter_name,
                "shooter_id": shooter_id,
                "goalie_name": goalie_name,
                "goalie_id": goalie_id,
                "is_empty_net": empty_net,
                "is_winning_goal": game_winning_goal,
                "strength_name": strength_name,
                "strength_code": strength_code,
                "coordinate_x": coord_x,
                "coordinate_y": coord_y,
            }

I have written a question in the tidy_data.py file, should we take the game id and the game type or just the game id and look for all games inside the regular and post-season games?

I also appreciate your comment on the refactoring of the code, the place where the code is and any other comment.