Skip to content

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

@mikofski

Description

@mikofski

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions