Extracting weather data from local weather stations package

95 Views Asked by At

I have been trying to extract weather data from local weather stations close to the locations I am interested in.

Although when using the "weatherData" package with an API key from their website e.g.,

read.csv("https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/CA8%201LR/2014-01-03/2023-07-20?unitGroup=metric&key=X2UEANPPQ3928F5V4DKERX97H&contentType=json")

I get the following error:

Error in file(file, "rt") : cannot open the connection to 'https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/CA8%201LR/2014-01-03/2023-07-20?unitGroup=metric&key=X2UEANPPQ3928F5V4DKERX97H&contentType=json' In addition: Warning message: In file(file, "rt") : cannot open URL 'https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/CA8%201LR/2014-01-03/2023-07-20?unitGroup=metric&key=X2UEANPPQ3928F5V4DKERX97H&contentType=json': HTTP status was '401 Unauthorized'

I know that the "wunderground" package is no longer viable. Are there any other packages that will allow me to extract weather data in R, please?

Any help would be highly appreciated, THANK YOU!

0

There are 0 best solutions below