Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 26 lines (15 sloc) 1.048 kB
700d754 @WheresAlice fix readme formatting
WheresAlice authored
1 = UKTransport
06ff128 @WheresAlice add readme showing what we're aiming to do
WheresAlice authored
2
3 UKTransport is a Ruby gem for parsing Naptan CSV files and NPTD CIF files.
4
5 It uses local files and provides a Ruby interface for reading it.
6
700d754 @WheresAlice fix readme formatting
WheresAlice authored
7 == Usage
06ff128 @WheresAlice add readme showing what we're aiming to do
WheresAlice authored
8
e130afa @WheresAlice updated documentation to reflect recent changes
WheresAlice authored
9 x = UKTransport::.Naptan.new(filename) => array of bus stops
aa54261 @WheresAlice return routes as arrays in UKTransport::Cif
WheresAlice authored
10 y = UKTransport::Cif.new(filename)
e130afa @WheresAlice updated documentation to reflect recent changes
WheresAlice authored
11 y.routes => array of bus route objects
f342ff7 @WheresAlice update documentation to show we can list stops for a given route
WheresAlice authored
12 y.routes.first.stops => array of stops a route calls at, in order
e130afa @WheresAlice updated documentation to reflect recent changes
WheresAlice authored
13 y.stops => array of bus stop objects
e492d2c @WheresAlice add link to rubydoc.info docs
WheresAlice authored
14
1a04d96 @WheresAlice add 'hook' for saving to database
WheresAlice authored
15 route.save => does nothing but allows for hooking into a database
16
e492d2c @WheresAlice add link to rubydoc.info docs
WheresAlice authored
17 See also the documentation at http://rubydoc.info/github/computergentle/UKTransport/master/frames
4aee156 @WheresAlice document route data format
WheresAlice authored
18
19 == Data formats
20
e130afa @WheresAlice updated documentation to reflect recent changes
WheresAlice authored
21 The CIF data is better documented at http://www.travelinedata.org.uk/CIF/atco-cif-spec.pdf
22
23 Naptan data is returned in an array
24
25 "ATCOCode","GridType","Easting","Northing","Lon","Lat","CommonName","Identifier","Direction","Street","Landmark","NatGazID","NatGazLocality","ParentLocality","GrandParentLocality","Town","Suburb","StopType","BusStopType","BusRegistrationStatus","RecordStatus","Notes","LocalityCentre","SMSNumber","LastChanged"
Something went wrong with that request. Please try again.