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

Implement Season Period Object #53

Open
paololucchino opened this issue Jan 27, 2025 · 0 comments
Open

Implement Season Period Object #53

paololucchino opened this issue Jan 27, 2025 · 0 comments
Assignees

Comments

@paololucchino
Copy link
Member

Filtering and aggregating timeseries by season is a common operational step in our work.

Noting the usefulness of the Dekad object and associated accessor, this issue proposes the creation of a Season object and associated accessor.

Example functionality would be something like the below. An added complication compared to Dekad is that the user would need to feed in some start and end range.

Example time dimension
[2020-01-11, ...., 2020-03-21, 2020-04-01, ...., 2021-02-11, ..., 2021-03-01]

# Pseudo code converting time dimension to season dimention
# Must pass season_range in Dekad of Year format (0...35)
# season_range could be a list of tuples to handle areas with more than one season
da.time.season.label(season_range=(5,16))

Result in format : YYYY_SeasonNumber
[NaT, ...., 2020_1, 2020_1, ....,NaT, ..., 2021_01]

This new index would then easily allow to drop out of season timesteps and run groupby operations by season.

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

3 participants