CRAN status Lifecycle: experimental Travis build status Coverage status


Handle TfL Oyster journey history data. Under development.

You can use an Oyster card to pay for public transit on Transport for London (TfL) services. You can opt-in to monthly emails with your journey history attached as a CSV. Functions in this package help to read, handle and summarise these data.

I, and this package, are not associated officially with TfL.


The package is under development with no guarantees whatsoever.

Install with remotes::install_github("matt-dray/oystr").


Functions under development:

There's also anonymised journey history data:


Developing this package is an exercise in working with minimal dependencies (hopefully zero) and working with good ol' base R functions.


The format of journey history data from TfL have remained pretty consistent for a number of years and there's no reason to believe that this will change anytime soon. It could though. In which case, these functions may fail.

Also, I asked TfL for details of all the possible forms of their column 'Journey/Action', which includes things like station start and end, bus route and much more. They were unable to provide this information. Therefore, the oy_clean() function can only parse formats that I'm personally aware of (train and bus, mostly) given my own Oyster history data. For example, I know the exact string for bus journeys is "Bus journey, route ". I don't know what format this string takes if you travel on a boat, for example.

I would be extremely pleased if someone could share this information.


Please note that the 'oystr' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

matt-dray/oystr documentation built on Dec. 24, 2019, 8:09 p.m.