get_free_bike_status {gbfs} | R Documentation |
Grab the free_bike_status feed.
Description
Grab a dataframe giving the geographic location and other metadata of bikeshare bikes not parked at bikeshare stations. Metadata for this dataset can be found at: https://github.com/MobilityData/gbfs/blob/master/gbfs.md
Usage
get_free_bike_status(
city,
directory = NULL,
file = "free_bike_status.rds",
output = NULL
)
Arguments
city |
A character string that can be matched to a gbfs feed. The recommended argument is a system ID supplied in the output of [get_gbfs_cities()], but will also attempt to match to the URL of an active .json feed or city name. |
directory |
Optional. Path to a folder (or folder to be created) where the feed will be saved. |
file |
Optional. The name of the file to be saved (if |
output |
Optional. The type of output method. If left as default, this
argument is inferred from the |
Value
The output of this function depends on the argument to output
and directory
. Either a saved .rds object generated from the current
station_information feed, a dataframe object, or both. If a saved feed of
the same type already exists at the filepath, the feed will be appended to
rather than overwritten.
See Also
[get_gbfs()] for a wrapper to call each of the get_feed
functions, [get_gbfs_cities()] for a dataframe of cities releasing gbfs
functions, and [get_which_gbfs_feeds()] for a dataframe of which feeds
are released by a given city.
Examples
# grab the free bike status feed for portland, oregon's bikeshare program
get_free_bike_status(city =
"https://gbfs.lyft.com/gbfs/1.1/pdx/en/free_bike_status.json",
output = "return")