ALShum / rwunderground

A simple R package to get historical and forecast weather data
78 stars 14 forks source link

wunderground.com returns extra data for some, but not all, stations on days when switch TO daylight saving time occurs #34

Closed CraigMohn closed 6 years ago

CraigMohn commented 6 years ago

The resolution of the previous history daylight saving time edge case introduced a requirement that data requested from wunderground actually be from the day requested, or at least all be from the same day (local time). A look at interactive web results shows that sometimes the first observation from the next day is thrown in along with the data actually requested. The code resolving the earlier DST edge case catches and warns about this case, but I will change it today or tomorrow to fix problems with this extraneous data.

CraigMohn commented 6 years ago

There is a fix on fork https://github.com/CraigMohn/rwunderground ). I will create a pull request after a bit more testing. I'm out of daily quota at wunderground, so it won't be until tomorrow. I checked some archived data I retrieved a month ago, and many (but not all) days when DST goes into effect have observations from the first hour of the next day, or at least there are duplicate records for that hour in the stacked dataframe that history_range() returns.

erichare commented 6 years ago

Merged it in! Thank you again so much for the help 👍 havent had much time to focus on rwunderground lately so this has been a life saver.

I'm planning a CRAN update for the very near future so if there are any further (particularly if they're pressing) issues that you notice, a report would be fantastic.