Using FME and GTFS datasets to run TransitDatabase.com

25
Using FME 2016 and GTFS Datasets Nick Ison April 6, 2016

Transcript of Using FME and GTFS datasets to run TransitDatabase.com

Page 1: Using FME and GTFS datasets to run TransitDatabase.com

Using FME 2016 and GTFS Datasets

Nick IsonApril 6, 2016

Page 2: Using FME and GTFS datasets to run TransitDatabase.com

About Me

BCIT GIS Student

University of Victoria

Advanced Diploma, 2016

BA Geography, GIS/Geomatics Concentration, 2013

Workplace Practicum

Jan-May, 2016

Page 3: Using FME and GTFS datasets to run TransitDatabase.com

GTFS Datasets – What are they?

Quite simply – a common format and specification for public transportation schedules and their associated geographic information

Page 4: Using FME and GTFS datasets to run TransitDatabase.com

GTFS Structure• Collection of 6-13 CSV files (.txt),

packaged into a single ZIP file• Each CSV is a table of relevant

components of a transit system’s scheduling, stops, routes and related attributes

Page 5: Using FME and GTFS datasets to run TransitDatabase.com

Schema:http://lin-ear-th-inking.blogspot.ca/2011/09/data-model-diagrams-for-gtfs.html

Page 6: Using FME and GTFS datasets to run TransitDatabase.com

Required Components• routes.txt• Transit routes. A route is a group of trips that are

displayed to riders as a single service.• Toronto has 197 routes on all modes of transit

• stops.txt• Individual locations where vehicles pick up or drop off

passengers.• Chicago has 11449 transit stops in the CTA

Page 7: Using FME and GTFS datasets to run TransitDatabase.com

Required Components• trips.txt• Trips for each route. A trip is a sequence of two or more

stops that occurs at specific time.• NYC Subways make 19425 trips per week

• stop_times.txt• Times that a vehicle arrives at and departs from

individual stops for each trip.• TransLink busses, trains and boats make 2.4m scheduled stops/week

Page 8: Using FME and GTFS datasets to run TransitDatabase.com

Required Components• agency.txt• One or more transit agencies that provide the data in

this feed.• Vancouver has three, TransLink/CMBC, WCE and BCRTC

• calendar.txt• Dates for service IDs using a weekly schedule. Specify

when service starts and ends, as well as days of the week where service is available.

Page 9: Using FME and GTFS datasets to run TransitDatabase.com

Common Optional Components• shapes.txt• Rules for drawing lines on a map to represent a transit

organization's routes.• TransLink services travel 1229 different routes per week- on 246 unique routes –

25 Brentwood Stn, 25 UBC, 25 Granville, 25 BCIT

Page 10: Using FME and GTFS datasets to run TransitDatabase.com

Lots of Information in Lots of Files!

Page 11: Using FME and GTFS datasets to run TransitDatabase.com

What's the problem?• Format can be difficult for the average person to access

and interpret• Especially if looking for information involving transit data

from multiple operators• Route Maps as KML• Tabular Schedules in Excel• Stop locations in GeoJSON• Service Extent in Shapefile

• Learning Opportunity!

Page 12: Using FME and GTFS datasets to run TransitDatabase.com

How can FME Help?• FME 2016 introduced some shiny new features

making my life a lot easier, saved time and cut my workspace complexity in half• Direct GTFS Format Support• MapboxStyler• FeatureWriter• AttributeManager❤

Page 13: Using FME and GTFS datasets to run TransitDatabase.com

Project Considerations• Needed to be able to serve data quickly• ‘Student’ budget• Processing files can be expensive and

time consuming if done on the fly, so pre-processing essential

• Historical record accessibility

Page 14: Using FME and GTFS datasets to run TransitDatabase.com

TransitDatabase.com• Web portal to view and download desired information• Multiple datasets• Multiple formats (GeoJSON, SHP, KML, XLS, etc.)• Multiple versions of the GTFS datasets

Still quite a work in progress, but the shell of the site is up and running now

Page 15: Using FME and GTFS datasets to run TransitDatabase.com

System Overview

Page 16: Using FME and GTFS datasets to run TransitDatabase.com

RouteDetails

Page 17: Using FME and GTFS datasets to run TransitDatabase.com

How it all works…

Page 18: Using FME and GTFS datasets to run TransitDatabase.com

Overall Process

Download GTFS from

Transit Agency

Run Main GTFS

Workspace FTP resulting output files

to web server

Check to see if new file

found

This process is run overnight, every night using FME Cloud

Average runtime for one new GTFS file is between 2 and 20 minutes (incl. FTP

uploads)

Page 19: Using FME and GTFS datasets to run TransitDatabase.com

Runner Workflow

Page 20: Using FME and GTFS datasets to run TransitDatabase.com

GTFS Handling

Read Files

Inline Querier

Information Extraction

Formatting/ Styling Output to

Desired Format(s)

Page 21: Using FME and GTFS datasets to run TransitDatabase.com

GTFS Handling Workflow

Page 22: Using FME and GTFS datasets to run TransitDatabase.com

InlineQuerier

Page 23: Using FME and GTFS datasets to run TransitDatabase.com

FME makes this easy!

Page 24: Using FME and GTFS datasets to run TransitDatabase.com

Next Steps?Website• Better way of

implementing the maps– geoJsons and Mapbox

are limited to simple styling

FME Workflows• Integrate with GTFS

data feeds to only run when updates are found

• Many many more outputs and formats

Page 25: Using FME and GTFS datasets to run TransitDatabase.com

Thank you!Nick [email protected]://nickison.ca