-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error loading some GBFS links #10
Comments
Thanks for the issue! Confirming that I see this as well with one of the Marseille feeds: library(gbfs)
get_station_status("https://gbfs.api.ridedott.com/public/v2/marseille/gbfs.json")
#> Error in find_feed_from_top_level(city_, feed_): The supplied "city" argument
#> looks like the top-level "gbfs.json" URL, but the webpage for the station_status
#> .json feed doesn't seem to exist. Please supply the actual URL or the name of
#> the city as a string. Created on 2023-04-26 with reprex v2.0.2 It looks like, at least for this feed, there is no
In that case, there's not much I can do from this package. Do you have any examples of |
Oh I forgot that there is effectively no data in Marseille. On the other hand, Nancy (and many others) is really problematic: https://transport.data.gouv.fr/gbfs/nancy/gbfs.json |
Same for Lyon here: https://transport.data.gouv.fr/gbfs/lyon/gbfs.json |
Reproduced, thanks! This ought to be fixed at some point. In the meantime, supplying the URL of the library(gbfs)
res <- get_station_status("https://transport.data.gouv.fr/gbfs/nancy/gbfs.json")
#> Error in find_feed_from_top_level(city_, feed_): The supplied "city" argument
#> looks like the top-level "gbfs.json" URL, but the webpage for the station_status
#> .json feed doesn't seem to exist. Please supply the actual URL or the name of
#> the city as a string.
res2 <- get_station_status("https://transport.data.gouv.fr/gbfs/nancy/station_status.json")
head(res2)
#> is_installed is_renting is_returning last_reported num_bikes_available
#> 1 1 1 1 1682527913 8
#> 2 1 1 1 1682527538 10
#> 3 1 1 1 1682527674 18
#> 4 1 1 1 1682527895 3
#> 5 1 1 1 1682527972 1
#> 6 1 1 1 1682527763 7
#> num_docks_available station_id last_updated year month day hour minute
#> 1 7 30 2023-04-26 12:55:11 2023 4 26 12 55
#> 2 14 29 2023-04-26 12:55:11 2023 4 26 12 55
#> 3 7 1 2023-04-26 12:55:11 2023 4 26 12 55
#> 4 12 33 2023-04-26 12:55:11 2023 4 26 12 55
#> 5 15 6 2023-04-26 12:55:11 2023 4 26 12 55
#> 6 11 19 2023-04-26 12:55:11 2023 4 26 12 55 Created on 2023-04-26 with reprex v2.0.2 |
Thanks for the alternative, I will use it! |
Thanks for the issue, @jc-ulles. :) The problem has now been resolved and the fix will be in the CRAN version of the package soon. |
Hi,
On many French cities (for example Marseille, Lyon...), I get an error when trying to load the
get_station_status()
:I think this is due to the layout of the data in some APIs. Is there a resolution?
Thanks for your help!
The text was updated successfully, but these errors were encountered: