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

add boilerplate to fix pvgis tmy to a timezone and year #2139

Closed
mikofski opened this issue Jul 19, 2024 · 0 comments · Fixed by #2138
Closed

add boilerplate to fix pvgis tmy to a timezone and year #2139

mikofski opened this issue Jul 19, 2024 · 0 comments · Fixed by #2138
Assignees

Comments

@mikofski
Copy link
Member

Is your feature request related to a problem? Please describe.
pvgis is the easiest weather data to retrieve b/c no credentials required, but it always returns data in UTC, which then needs to be adjusted to local timezone, causing the year to not start at midnight.

Describe the solution you'd like
This is some boilerplate that I use everytime I pull pvgis, so rather than clogging up my codebase, I thought it would be easier if it were upstream. Basically:

  1. if february is a leap year, change it to 1990
  2. rotate the dataframe by the desired utc offset (note, don't shift the index)
  3. convert the timezone
  4. change indices to desired year

Tested in this Google Colab notebook test_coerce_pvgis.ipynb

Describe alternatives you've considered
keep doing this manually in my code.

Additional context
This was discussed here #1528 (comment)

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

Successfully merging a pull request may close this issue.

1 participant