Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

get_weather_data() in the old blog post doesn't work #8

Closed
jlehtoma opened this issue Jun 5, 2016 · 4 comments
Closed

get_weather_data() in the old blog post doesn't work #8

jlehtoma opened this issue Jun 5, 2016 · 4 comments
Assignees

Comments

@jlehtoma
Copy link
Contributor

jlehtoma commented Jun 5, 2016

Function get_weather_data() used to generate the old blog post gives the following error:

kaisa.2012 <- get_weather_data(apiKey, startDateTime, endDateTime, fmisid.kaisa)
trying URL 'http://data.fmi.fi/fmi-apikey/0253711c-056f-439b-af9d-a5a3a2920faf/wfs?request=getFeature&storedquery_id=fmi::observations::weather::daily::timevaluepair&starttime=2011-12-24&endtime=2012-12-31&fmisid=100971&parameters=rrday,snow,tday,tmin,tmax'
 Show Traceback

 Rerun with Debug
 Error in download.file(private$getURL(), destFile, "internal") : 
  cannot open URL 'http://data.fmi.fi/fmi-apikey/0253711c-056f-439b-af9d-a5a3a2920faf/wfs?request=getFeature&storedquery_id=fmi::observations::weather::daily::timevaluepair&starttime=2011-12-24&endtime=2012-12-31&fmisid=100971&parameters=rrday,snow,tday,tmin,tmax' In addition: Warning message:
In download.file(private$getURL(), destFile, "internal") :
  cannot open URL 'http://data.fmi.fi/fmi-apikey/0253711c-056f-439b-af9d-a5a3a2920faf/wfs?request=getFeature&storedquery_id=fmi::observations::weather::daily::timevaluepair&starttime=2011-12-24&endtime=2012-12-31&fmisid=100971&parameters=rrday,snow,tday,tmin,tmax': HTTP status was '400 Bad Request'

Check what's wrong.

@torsti
Copy link
Collaborator

torsti commented Jun 5, 2016

Works for me, I can't reproduce.

Slightly off-issue, but get_weather_data() or something similar should probably be made part of the package.

@jlehtoma
Copy link
Contributor Author

jlehtoma commented Jun 5, 2016

@torsti : did you test just the function or all the code in the blog post? Could be something funky in my parameter combination. Will come back to this later. Yes, get_weather_data() would make a useful addition to the package.

@torsti
Copy link
Collaborator

torsti commented Jun 5, 2016

Only the bit with the function and the next code block where you use the function. Also did it for the Kaisaniemi FMISID.

@jlehtoma jlehtoma added the ready label Sep 6, 2016
@jlehtoma
Copy link
Contributor Author

jlehtoma commented Sep 7, 2016

Works fine for as well, no idea what the previous glitch was. Closing this issue.

@jlehtoma jlehtoma closed this as completed Sep 7, 2016
@jlehtoma jlehtoma removed the ready label Sep 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants