stplanr icon indicating copy to clipboard operation
stplanr copied to clipboard

route_transportapi_public error

Open BlaiseKelly opened this issue 5 years ago • 7 comments

Hello,

I am trying to use the function 'route_transportapi_public'

Usage <- route_transportapi_public(from = "Bristol",
                                     to = "Bath",
                                     silent = FALSE, 
                                     region = "southwest")

but it is returning the following error:

Error in curl::curl_fetch_memory(url, handle = handle) : Could not resolve host: fcc.transportapi.com

Is something down?

BlaiseKelly avatar May 04 '20 09:05 BlaiseKelly

Is something down?

I believe so, things have changed since the function was first developed. My colleague Malcolm (cc @mem48 ) may be able to provide details/guidance.

Robinlovelace avatar May 04 '20 12:05 Robinlovelace

The FCC seems to have been closed, you need to use an api key

mem48 avatar May 04 '20 13:05 mem48

Thanks both. Malcolm, I have an API key, but can't work out how to add to the function.

BlaiseKelly avatar May 04 '20 16:05 BlaiseKelly

I note the ITS page was mentioned. Does this code work instead? https://github.com/ITSLeeds/transportAPI/blob/master/R/journey.R

BlaiseKelly avatar May 05 '20 08:05 BlaiseKelly

I had a quick look at the code route_transportapi_public will no longer work as the server is closed. @Robinlovelace the function should be removed.

The transportAPI package should still work and gives option to use your API key I've stopped using TransportAPI in favor of opentripplanner so the package is underdeveloped. PR are welcome.

mem48 avatar May 08 '20 10:05 mem48

Great. I will deprecate the function and close this issue when it has been removed.

Robinlovelace avatar May 08 '20 12:05 Robinlovelace

Thanks so much for this. I hadn't heard of opentripplanner but it looks phenomenal!

BlaiseKelly avatar May 09 '20 18:05 BlaiseKelly