Using FME and GTFS datasets to run TransitDatabase.com

Post on 13-Apr-2017

390 views 0 download

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

Using FME 2016 and GTFS Datasets

Nick IsonApril 6, 2016

About Me

BCIT GIS Student

University of Victoria

Advanced Diploma, 2016

BA Geography, GIS/Geomatics Concentration, 2013

Workplace Practicum

Jan-May, 2016

GTFS Datasets – What are they?

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

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

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

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

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

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.

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

Lots of Information in Lots of Files!

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!

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❤

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

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

System Overview

RouteDetails

How it all works…

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)

Runner Workflow

GTFS Handling

Read Files

Inline Querier

Information Extraction

Formatting/ Styling Output to

Desired Format(s)

GTFS Handling Workflow

InlineQuerier

FME makes this easy!

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

Thank you!Nick Isonnickison@gmail.comhttp://nickison.ca