# NOT RUN {
# we can grab the free bike status feed for portland,
# oregon's bikeshare program in several ways! the most
# straightforward way is just to supply the `city` argument
# as a string:
# }
# NOT RUN {
get_free_bike_status(city = "portland")
# }
# NOT RUN {
# the `city` argument can also be supplied as an
# actual URL to an active .json feed
# }
# NOT RUN {
get_free_bike_status(city =
"http://biketownpdx.socialbicycles.com/opendata/free_bike_status.json",
directory = tempdir())
# }
# NOT RUN {
# if you'd like to save the output to file, supply a
# `directory` argument. usually, though, we would supply a
# character string (like "pdx", maybe,) for the `directory`
# argument instead of `tempdir`.
# }
# NOT RUN {
get_free_bike_status(city = "portland",
directory = tempdir())
# }
# NOT RUN {
# the output argument can control whether the file is
# saved and/or returned explicitly
# }
# NOT RUN {
get_free_bike_status(city = "portland",
directory = tempdir(),
output = "both")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab