Skip to content
Matt Conway edited this page Sep 18, 2012 · 1 revision

The Data Dashboard has features to load information about what agencies provide their GTFS data to Google Transit, based on the information contained in this page. Here are the steps to loading that data (it is a somewhat involved process).

This should happen after all GTFS has been loaded and all agencies that have no NTD have been created from the GTFS (see Data Loading).

First of all, download the HTML of that page (other assets are not needed) into a convenient directory, and call the page google_transit.html. Then, in the utils/ subdirectory of the dashboard checkout, run npm install to grab the node.js packages needed by the script. Then run node loadGoogleTransit.js in the directory where google_transit.html is located. If there are errors contacting the server, you may need to edit the script and set the host/port correctly.

Watch the output of the script for mismatched feeds. There will be many unmatched feeds; don't worry about these (they'll be fixed in the next step). But some feeds may match to the wrong agency; these will need to be manually patched up in the database. It might be wise to pipe the output into a file.

Now, you can go to /api/admin/index and find 'Unmatched metro areas'. Click on it; this will take you to a screen where you can assign each of Google's lat/lon pairs to a metro area. Keep an eye on the console; failed requests will not be reported (this usually happends because of an expired SSH tunnel). That is, when you tell it to update, it makes an XmlHttpRequest, and if that fails there is no error reporting. This step needs to occur before the next step.

Once that's complete, you can go to /api/admin/index again and click on 'Unmatched private GTFS agencies.' This will give you a slideshow of agencies, and you can either assign them to an existing agency in their metro or create a new agency from them, filled in with what little information we have from Google.

Finally, you can use the CRUD interface or PGAdmin to touch up the DB from the ones that mapped accidentally (by setting googleGtfs to false on the DB record), or those that were assigned to the wrong metro area.

Clone this wiki locally