knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

bikeHelpR

Helpful functions for interacting with data from https://capitalbikeshare.com and for use with the RStudio Bike Prediction example (https://solutions.rstudio.com/example/bike_predict/).

Installation

Install bikeHelpR from RStudio Package Manager.

install.packages("bikeHelpR", repos = "https://packagemanager.rstudio.com/all/latest")

Install the latest development version of bikeHelpR from GitHub.

# install.packages("devtools")
devtools::install_github("sol-eng/bikeHelpR")

Example

Check out the list of available data feeds:

library(bikeHelpR)

feeds <- feeds_urls()
print(feeds)

Get the latest data from the station_status feed:

url <- feeds |> 
  dplyr::filter(name == "station_status") |> 
  dplyr::pull(url)

station_status <- get_data(url)
dplyr::glimpse(station_status)

Contributing

Updating the docs

Regenerate the README using:

devtools::load_all()
rmarkdown::render("README.Rmd", "all")


sol-eng/bikeHelpR documentation built on May 25, 2022, 2:48 a.m.