feat: add exclude_penalty_shootouts parameter for event data loading#514
Open
DriesDeprest wants to merge 1 commit intoPySport:masterfrom
Open
feat: add exclude_penalty_shootouts parameter for event data loading#514DriesDeprest wants to merge 1 commit intoPySport:masterfrom
DriesDeprest wants to merge 1 commit intoPySport:masterfrom
Conversation
Add support for excluding penalty shootout events (period 5) when loading event data across all providers. This feature provides complete cleanup of penalty shootout data from the dataset. Changes: - Add exclude_penalty_shootouts parameter to EventDataDeserializer - Implement should_include_event() filtering for period 5 events - Add remove_penalty_shootout_data() method to clean up metadata: - Removes period 5 from metadata.periods - Updates period references (prev/next) - Removes player positions for period 5 - Removes team formations for period 5 - Update all provider load functions to support the parameter: - StatsBomb, Opta, Wyscout, DataFactory, Impect - StatsPerform, Sportec, Metrica - Add comprehensive tests in test_event.py The parameter defaults to False for backward compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
|
Let's rewrite it as a method on the (Event)Dataset instead of an argument in the deserializer. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Sometimes, when analyzing event data, we want to exclude actions that occurred during the penalty shootout, as including them can distort player statistics such as shots and goals.
Functionality
Add support for excluding penalty shootout events (period 5) when loading event data across all providers. This feature provides complete cleanup of penalty shootout data from the dataset.
Changes
The parameter defaults to False for backward compatibility.
🤖 Generated with Claude Code