oy
oy is a library for analysis of London Oyster card history statements. It performs basic statistical analysis of journeys providing average and median journey times, journey time variation etc.
It accepts Oyster history files in CSV format. They can be downloaded from TfL website: https://oyster.tfl.gov.uk/oyster/
Installation
npm install oy --save
Usage
oy exposes a single function, which accepts CSV string as input and returns summarised journey data:
var oy = ; ;
Journey object
Data variable in the example above is an array consisting of multiple journey objects. Here is a sample journey object:
"from": "text": "Dalston Junction [London Overground]" "type": "overground" "to": "text": "Shoreditch High Street [London Overground]" "type": "overground" "durations": "data": 19 20 21 18 "stats": "size": 4 "min": 18 "max": 21 "mean": 195 "median": 195 "stdev": 129 "times": "data": "2013-11-14T14:24:00.000Z" "2013-11-15T14:24:00.000Z" "2013-11-16T14:24:00.000Z" "2013-11-14T14:24:00.000Z" "stats": {}
Release history
Tests
npm test