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

crop season alignment does not handle dynamic crop calendars #334

Open
krsnapaudel opened this issue Sep 2, 2024 · 1 comment
Open

crop season alignment does not handle dynamic crop calendars #334

krsnapaudel opened this issue Sep 2, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@krsnapaudel
Copy link
Collaborator

For example, this code assumes that "eos_date" is the same for current and next year.

df["eos_date"] = np.where(
        (df["date"] > df["eos_date"]),
        # select eos_date for the next year
        df["eos_date"] + pd.offsets.DateOffset(years=1),
        df["eos_date"],
    )
@krsnapaudel krsnapaudel added the enhancement New feature or request label Sep 2, 2024
@mnqoliveira
Copy link
Collaborator

Not sure this is the place to comment on it, but it is a related issue. I've just noted that for the example

crop_name | adm_id | sos | eos
wheat | ES412 | 189.7319 | 192.6254

I don't know if I read it correctly, but it seems to me the current approach of assigning the date and year will likely make this a two-day season.

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

No branches or pull requests

2 participants