Problems with daily_observed_latlng fun

Friday, March 24, 2017 - 09:50
Hugo Andres Dorado Betancourt

I want to use R to download daily weather information, but I have the follow results.

Library (devtools)
#devtools :: install_github ("aWhereAPI / aWhere-R-Library")
Library (aWhereAPI)
Daily_observed_latlng (latitude = "2.56778", longitude = "31.9673805", day_start = "2016-07-01", day_end = "2016-07-07")
1 403
Warning messages:
1: In `[.data.table` (allWeath,,`: = `(grep (" _ links ", varNames), NULL)
  Length (LHS) == 0; RHS to.
2: In `[.data.table` (allWeath,,`: = `(grep (". Units ", varNames), NULL)
  Length (LHS) == 0; RHS to.

I have explored the code function for running line per line and I had the next output when i sent the request of data

Jsonlite :: fromJSON (a, flatten = TRUE)

$ StatusCode
[1] 403
$ Status
[1] "Forbidden"
$ ErrorId
[1] ""
$ SimpleMessage
[1] "The dates requested fall outside the allowed range for daily observed weather data."
$ DetailedMessage
[1] "This API only supports retrieving weather data from up to 30 months ago." (From today). Please use the historical averages API to retrieve older information, or contact your account manager for historical daily observed data products.

I'm using R version 3.3.2

Please let me know if someone knows the solution.

Answer Count: 

Hi Hugo-

You are getting a 403 error because you are trying to pull 2016 data on a trial app. The 30 day free trial provides 6 months of observed data. Once you upgrade to a paid account you will receive 30 months of observed data.

I apologize. that the 403 error message is a bit misleading as it stated you are going beyond the 30months limit when in actuality you are going over the 6 months trial limit.

Thank you,


Wednesday, March 29, 2017 - 12:00
Amanda Howard