This package provides a R interface to the Washington Metropolitan Area Transit Authority (WMATA) API

Usage

You can use this interface to query the WMATA API. For example, you can get the real time predictions for train arrivals at Metro Center (code A01):

A data frame with mappings from stations to station codes is provided as the object stations:

Installation

You can install the released version of wmata from GitHub with:

devtools::install_github("zamorarr/wmata")

You will also have to sign up for a WMATA developer key at https://developer.wmata.com/. Once you get a key, edit your .Renviron file and place this line in there (replacing XXX with your key):

You can use usethis::edit_r_environ() to edit your .Renviron file.