Skip to content

minor changes and a bug or two in documentation. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Basic Setup
## Basic Setup (Linux)

1. Make sure Java 1.6 is installed
* Open a command prompt/terminal and type `java -version`
Expand Down
7 changes: 4 additions & 3 deletions data/README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ The basics of downloading and cleaning gtfs data.

## Downloading Data

1. `Use get_agencies.py` (or whatever other method you like) to snag a list of all of the agencies with GTFS:
1. Use `python get_agencies.py` (make sure python is installed or whatever other method you like) to snag a list of all of the agencies with GTFS:

`wget http://www.gtfs-data-exchange.com/api/agencies -O agencies.json`

Expand All @@ -25,6 +25,7 @@ The basics of downloading and cleaning gtfs data.
* pdf license agreements
* Sometimes the data is super messy
* Measure twice, cut once?
* One other reason: https://github.com/OneBusAway/onebusaway-application-modules/wiki/Developer-Guide#common-problems-building-bundle

### GTFS Feed Validator

Expand All @@ -37,10 +38,10 @@ This validation tool can be found at https://code.google.com/p/googletransitdata

`python feedvalidator.py path/to/gtfs.zip`

4. Errors will pop up in a your web browser
* Errors will pop up in a your web browser if you are using terminal on a local machine and not remote ssh.

### Conveyal Validator

New java-based tool in development

https://github.com/conveyal/gtfs-validator
https://github.com/conveyal/gtfs-validator
Empty file modified data/get_agencies.py
100644 → 100755
Empty file.
Empty file modified data/google_transit.zip
100644 → 100755
Empty file.
Empty file modified data/transitfeed-1.2.12.tar.gz
100644 → 100755
Empty file.
9 changes: 6 additions & 3 deletions database/README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ The basics of putting GTFS into a database with the [OneBusAway GTFS Hibernate C

2. Create a database called `gtfs` with the sql flavor of your choice. If you're not familiar with or don't have a database software installed, the easiest to use is probably just HSQLDB (does not require setting up a separate database software).

3. Run hibernate (full documentation is [here](http://developer.onebusaway.org/modules/onebusaway-gtfs-modules/current-SNAPSHOT/onebusaway-gtfs-transformer-cli.html))

### Generic
```bash
java -classpath onebusaway-gtfs-hibernate-cli-1.3.3.jar:your-database-jdbc.jar \
Expand All @@ -30,11 +28,14 @@ java -classpath onebusaway-gtfs-hibernate-cli-1.3.3.jar:hsqldb.jar \
../data/google_transit.zip
```

Important! You will need to run the above command 2 times, the first time to create the tables and the second time is to insert the data. You can can copy and paste the texts.

After a successful gtfs import, run `java -jar sqltool.jar` to open the sql tools command line interface.

To connect to the `gtfs` database in sql tools, type `\j user pass jdbc:hsqldb:file:gtfs`

### Postgresql (assumes version 9.3)
### Postgresql
(assumes version 9.3 & 9.1.13 on unbuntu 12.04. And making sure username and password.)
```bash
java -classpath onebusaway-gtfs-hibernate-cli-1.3.3.jar:postgresql-9.3-1100.jdbc4.jar \
org.onebusaway.gtfs.GtfsDatabaseLoaderMain \
Expand All @@ -45,3 +46,5 @@ java -classpath onebusaway-gtfs-hibernate-cli-1.3.3.jar:postgresql-9.3-1100.jdbc
../data/google_transit.zip
```

### Mysql
(Is similar to Postgresql for details go https://groups.google.com/forum/#!topic/onebusaway-developers/3Qhf7QRU9wI)
Binary file modified database/hsqldb.jar
100644 → 100755
Binary file not shown.
Empty file modified database/onebusaway-gtfs-hibernate-cli-1.3.3.jar
100644 → 100755
Empty file.
Empty file modified database/postgresql-9.3-1100.jdbc4.jar
100644 → 100755
Empty file.
Binary file added database/sqltool.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions transformer/README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ The basics of processing GTFS with the [OneBusAway GTFS Transformer CLI](http://

1. Move into this directory `cd learnyougtfs/transformer`

2. Run transformer (full documentation is [here](http://developer.onebusaway.org/modules/onebusaway-gtfs-modules/current-SNAPSHOT/onebusaway-gtfs-transformer-cli.html))
2. Run transformer (full documentation is [here](http://developer.onebusaway.org/modules/onebusaway-gtfs-modules/current-SNAPSHOT/onebusaway-gtfs-transformer-cli.html). And making sure modifying the match.json to match at least one record like the example below else it will result in error of Java zipping empty file)
* `java -jar -Xmx4G -server onebusaway-gtfs-transformer-cli-1.3.3.jar --transform=match.json ../data/google_transit.zip ../data/gtfs_out.zip`

### Examples
To change the transformations you perform on your gtfs feed, open `match.json` and change the arguments to suit your needs.

Here are some examples (use one at a time):
```json
{"op":"retain", "match":{"file":"routes.txt", "route_short_name":"RED"}}
{"op":"retain", "match":{"file":"routes.txt", "route_short_name":"Red"}}

{"op":"retain", "match":{"file":"trips.txt", "trip_id":"2139539"}}

Expand Down
2 changes: 1 addition & 1 deletion transformer/match.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"op":"retain", "match":{"file":"routes.txt", "route_short_name":"400"}}
{"op":"retain", "match":{"file":"routes.txt", "route_short_name":"Red"}}

Empty file modified transformer/onebusaway-gtfs-transformer-cli-1.3.3.jar
100644 → 100755
Empty file.
Empty file modified zip.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.