You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Related to #845
Describe the solution you'd like
Similar to get_pvgis_tmy retrieve pvgis hourly radiation data from their api
Describe alternatives you've considered
Pvgis is becoming a popular resource more and more people are asking me for it, it is nice because it is a global collection of several different radiation databases including nsrdb and others, and different from cams, the data is complete, ie it has air temperature, wind speed as well as all 3 components of irradiance
Additional context
This would be part of the iotool sub-package. There's already a pvgis.py module with a getter for tmy be data
@mikofski I'm developing a function for PVGIS hourly radiation and have a question to the person who developed the TMY function.
The get_pvgis_tmy function uses io.BytesIO(res.content) for the csv outputformat, whereas the epw format decodes the response: io.StringIO(res.content.decode('utf-8')). Is there a reason for not decoding the response for the csv outputformat (performance)? The reason I'm asking is that my code for _parse_pvgis_hourly_csv is much cleaner when the file-buffer has been decoded first.
Sorry, no good reason I can think of. I was probably just hacking at it until I could get it to work. Maybe I tried a string buffer first and had issues? I can't find your code for _parse_pvgis_hourly_csv, are you planning to open a pull request to close this issue? Would be great to clean up my mess with cleaner code if you have it. Thanks!
@mikofski Thanks for the update, it could have been some smart trick I wasn't aware of. I'm opening a pull request within the next few days to add functions for PVGIS hourly radiation and then in a second pull I can clean up the TMY so they follow similar formats.
Activity
AdamRJensen commentedon Feb 28, 2021
@mikofski I'm developing a function for PVGIS hourly radiation and have a question to the person who developed the TMY function.
The get_pvgis_tmy function uses io.BytesIO(res.content) for the csv outputformat, whereas the epw format decodes the response: io.StringIO(res.content.decode('utf-8')). Is there a reason for not decoding the response for the csv outputformat (performance)? The reason I'm asking is that my code for _parse_pvgis_hourly_csv is much cleaner when the file-buffer has been decoded first.
mikofski commentedon Feb 28, 2021
Sorry, no good reason I can think of. I was probably just hacking at it until I could get it to work. Maybe I tried a string buffer first and had issues? I can't find your code for
_parse_pvgis_hourly_csv, are you planning to open a pull request to close this issue? Would be great to clean up my mess with cleaner code if you have it. Thanks!AdamRJensen commentedon Feb 28, 2021
@mikofski Thanks for the update, it could have been some smart trick I wasn't aware of. I'm opening a pull request within the next few days to add functions for PVGIS hourly radiation and then in a second pull I can clean up the TMY so they follow similar formats.