Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend sequence class with time information #372

Open
DriesDeprest opened this issue Dec 12, 2024 · 8 comments
Open

Extend sequence class with time information #372

DriesDeprest opened this issue Dec 12, 2024 · 8 comments

Comments

@DriesDeprest
Copy link
Contributor

I would like to extend the Sequence class with start and end time information.

@dataclass
class Sequence:
    sequence_id: int
    team: Team
    start: Time
    end: Time

This way, we can easily retrieve for an event when the sequence it is part of started and ended, which is helpful for my analysis use case.

Thoughts?

@andreasdarsa
Copy link

Have you started working on the issue? Because I would be interested in trying this one.

@DriesDeprest
Copy link
Contributor Author

Hi Andreas,

Apologies for the delay in my response.

No, I haven't started this implementation, feel free to work on it and create a PR :-)

@andreasdarsa
Copy link

Thank you. Can you elaborate on the time information you talked about storing in start and end? Is it a certain period (ex. the first half) or a specific point in time?

@DriesDeprest
Copy link
Contributor Author

The start and end attributes should have Time as their type. This contains both the timestamp and period information. This is used to uniquely describe a point in time in the match.

@dataclass
class Time:
    period: Period
    timestamp: timedelta

@andreasdarsa
Copy link

Since in this file we're handling event instances, does the event class have any attribute related to time (both start and end)?

@DriesDeprest
Copy link
Contributor Author

The Event class has a property time of type Time, which it inherits this from the DataRecord class. This contains both the timestamp and period information. Events don't have a start and end moment. They have a single point in time when they occur. Their time property is used to uniquely describe the point in time during the match on which the event occurred.

Sequences on the other hand, should have a start and end moment, where the start would be equal to the time value of its first event and the end equal to the time value of the last event.

Does that answer your question?

@andreasdarsa
Copy link

Yes I think you've pretty much covered what I wanted to clarify. Thank you very much.

@andreasdarsa
Copy link

Hi again. I haven't managed to work out anything solid about this issue, so if you have any good ideas, you can take up this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants