9/26/25 nfl project day 3


day 3 of this project and i got a lot more done then lest week since it was a 2 class day today so i got more done

[print("\n--- Play Breakdown ---")
        print(f"Game ID: {play_details['game_id']}")
        print(f"Play ID: {play_details['play_id']}")
        print(f"Quarter: {play_details['qtr']}")
        print(f"Down and Distance: {play_details['down']}&{play_details['ydstogo']}")
        print(f"Play Type: {play_details['play_type']}")
        print(f"Play Description: {play_details['play_description']}")
        print(f"Yard Line: {play_details['yardline_100']} yards from opponent's goal line")
        print(f"Offensive Team: {play_details['posteam']}")
        print(f"Defensive Team: {play_details['defteam']}")
        print(f"Home Team: {play_details['home_team']}")
        print(f"Away Team: {play_details['away_team']}")

        # Display player-specific stats for the play, if available
        if play_details['pass'] == 1 and not pd.isna(play_details['passer_player_id']):
            print("\nPassing Details:")
            print(f"  Passer: {play_details['passer_player_name']}")
            print(f"  Receiver: {play_details['receiver_player_name']}")
            print(f"  Passing Yards: {play_details['passing_yards']}")
            print(f"  Touchdown Pass: {'Yes' if play_details['pass_touchdown'] == 1 else 'No'}")
        
        elif play_details['rush'] == 1 and not pd.isna(play_details['rusher_player_id']):
            print("\nRushing Details:")
            print(f"  Rusher: {play_details['rusher_player_name']}")
            print(f"  Rushing Yards: {play_details['rushing_yards']}")
            print(f"  Rushing Touchdown: {'Yes' if play_details['rush_touchdown'] == 1 else 'No'}")
        
        # Display other analytical metrics
        print("\nAdvanced Analytics:")
        print(f"  Expected Points Added (EPA): {play_details['epa']:.2f}")
        print(f"  Win Probability Added (WPA): {play_details['wpa']:.4f}")
        print(f"  Air Yards: {play_details['air_yards']}")
        print(f"  Yards After Catch (YAC): {play_details['yac_yards']}")
] 

    else:
        print("play not highlight play")

this make sure if there is a highlight play that it will print the play details if it wasn’t a big play its prints not a highlight play

this prints this highlight play in extra detail

this is day 3 i’ll be back next week with more detall stay tooned for next weeks info


Leave a Reply

Your email address will not be published. Required fields are marked *