Skip to content

[FEATURE REQ] Separate Defensive & Special Teams Fumbles in calculate_stats() #581

Description

@TheMathNinja

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe.

Currently, def_fumbles is a bit of a misleading phrase because it includes punt return fumbles, since the returning team is the defensive team.

Describe the solution you'd like

I'd like the fumbles logic to mirror the TD logic in this function. In particular, for TD's:

def_tds → team == def & special != 1
special_tds → special == 1

Likewise, I would like to update from
def_fumbles → stat_id %in% 52:53 & team == def to def_fumbles → stat_id %in% 52:53 & team == def & special != 1 plus
special_fumbles → stat_id %in% 52:53 & special == 1

This has the added benefit of cleaning up the relationship between fumbles_total and the subcategories. If we break out this additional special category, I believe it leaves the only instances of fumbles_total not adding up to the subcategories as being botched snap plays or fumbles off of offensive fumble recoveries (I think this works well as other_off_fumbles). Currently, kickoff fumbles are unclassified in any of the subcategories, but special_fumbles would catch it nicely.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions