get_station_information: Grab the station_information feed.

View source: R/get_static_feeds.R

get_station_informationR Documentation

Grab the station_information feed.

Description

get_station_information grabs and tidies the station_information feed for a given city. This dataset contains locations, capacity, and other information about bikeshare stations. Metadata for this dataset can be found at: https://github.com/NABSA/gbfs/blob/master/gbfs.md

Usage

get_station_information(
  city,
  directory = NULL,
  file = "station_information.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 is set to "save" or "both"), as a character string. Must end in ".rds".

output

Optional. The type of output method. If left as default, this argument is inferred from the directory argument. If output = "save", the object will be saved as an .rds object at # the given path. If output = "return", the output will be returned as a dataframe object. Setting output = "both" will do both.

Value

The output of this function depends on argument to output and directory. Either a saved .rds object generated from the current feed, a dataframe object, or both.

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, oreoon's bikeshare program 
get_station_information(city = 
"https://gbfs.biketownpdx.com/gbfs/en/station_information.json",  
                        output = "return")


gbfs documentation built on Aug. 15, 2022, 5:09 p.m.