Browse Source

OpenTripPlanner post

Thomas Dy 11 years ago
parent
commit
733a2b24d2

BIN
galleries/transit/otp1.png


BIN
galleries/transit/otp2.png


BIN
galleries/transit/upkatipunan.jpg


+ 2 - 1
output/2013/index.html

@@ -36,7 +36,8 @@
         <!--Body content-->
         <div class="postbox">
         <h1>Posts for year 2013</h1>
-        <ul class="unstyled"><li><a href="../posts/one-bus-or-maybe-jeep-away.html">[2013-07-09 01:53] One Bus (or maybe Jeep) Away</a>
+        <ul class="unstyled"><li><a href="../posts/open-trip-planner.html">[2013-07-09 23:16] Open Trip Planner</a>
+            </li><li><a href="../posts/one-bus-or-maybe-jeep-away.html">[2013-07-09 01:53] One Bus (or maybe Jeep) Away</a>
             </li><li><a href="../posts/jeepney-and-bus-routes.html">[2013-07-07 10:32] Jeepney and Bus Routes</a>
             </li><li><a href="../posts/philippine-transit-app-challenge.html">[2013-07-07 00:17] Philippine Transit App Challenge</a>
         </li></ul></div>

+ 1 - 1
output/assets/js/tag_cloud_data.json

@@ -1 +1 @@
-{"programming": [3, "/categories/programming.html"], "philippine-transit-app": [3, "/categories/philippine-transit-app.html"]}
+{"programming": [4, "/categories/programming.html"], "philippine-transit-app": [4, "/categories/philippine-transit-app.html"]}

+ 2 - 1
output/categories/philippine-transit-app.html

@@ -37,7 +37,8 @@
         <div class="postbox">
         <h1>Posts about philippine-transit-app</h1>
             <a href="philippine-transit-app.xml">RSS</a>
-        <br><ul class="unstyled"><li><a href="../posts/one-bus-or-maybe-jeep-away.html">[2013-07-09 01:53] One Bus (or maybe Jeep) Away</a>
+        <br><ul class="unstyled"><li><a href="../posts/open-trip-planner.html">[2013-07-09 23:16] Open Trip Planner</a>
+            </li><li><a href="../posts/one-bus-or-maybe-jeep-away.html">[2013-07-09 01:53] One Bus (or maybe Jeep) Away</a>
             </li><li><a href="../posts/jeepney-and-bus-routes.html">[2013-07-07 10:32] Jeepney and Bus Routes</a>
             </li><li><a href="../posts/philippine-transit-app-challenge.html">[2013-07-07 00:17] Philippine Transit App Challenge</a>
         </li></ul></div>

+ 21 - 2
output/categories/philippine-transit-app.xml

@@ -1,5 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
-<rss version="2.0"><channel><title>Pleasant Programmer (philippine-transit-app)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 09 Jul 2013 10:27:07 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>One Bus (or maybe Jeep) Away</title><link>http://pleasantprogrammer.com/posts/one-bus-or-maybe-jeep-away.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://onebusaway.org/"&gt;http://onebusaway.org/&lt;/a&gt;&lt;/p&gt;
+<rss version="2.0"><channel><title>Pleasant Programmer (philippine-transit-app)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 09 Jul 2013 23:39:42 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Open Trip Planner</title><link>http://pleasantprogrammer.com/posts/open-trip-planner.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://www.opentripplanner.org"&gt;http://www.opentripplanner.org&lt;/a&gt;&lt;/p&gt;
+&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; routes pretty well; data might cause weird issues&lt;/p&gt;
+&lt;p&gt;OpenTripPlanner, as the name implies, is a routing app. Given point A and point B, it can provide possible routes by taking transit, riding a bike, or a mix of both. You can also specify options on how much walking you're willing to do or if you prefer fewer transfers over trip time. It could be a good competitor to the transit directions of Google Maps.&lt;/p&gt;
+&lt;p&gt;It's actually in general use by the &lt;a href="http://maps.trimet.org/"&gt;Trimet&lt;/a&gt;, Portland's public transit system. I think a good reason why they deployed OpenTripPlanner is that Portland is a very bike friendly area. OpenTripPlanner's support for multi-modal (bike + transit) routing is one thing that even Google Maps doesn't have. This actually just screams &lt;a href="http://philippine-transit.hackathome.com/prizes/"&gt;Inclusive Technology Award&lt;/a&gt;.&lt;/p&gt;
+&lt;h4&gt;Setup&lt;/h4&gt;
+&lt;p&gt;Getting OpenTripPlanner up and running involves a bit more downloading than OneBusAway. I'd suggest going through the &lt;a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes"&gt;5-minute introduction&lt;/a&gt; if you want to actually work with the Philippine data. You will also need to download the &lt;a href="http://download.geofabrik.de/asia/philippines.html"&gt;Philippine data dump&lt;/a&gt; from OSM. You will want the &lt;code&gt;osm.bz2&lt;/code&gt; one (WARNING: 900MB unzipped).&lt;/p&gt;
+&lt;p&gt;Once you get the webapp running, you'll notice the map tiles won't load correctly. This is because the default tileset used is from Mapbox which doesn't provide publicly free tilesets anymore. To actually see things on the map, you should click the + on the upper-right of the map and change the base layer to something like Open Street Map or OSM Mapquest. This has been fixed in their latest sources.&lt;/p&gt;
+&lt;h4&gt;Issues&lt;/h4&gt;
+&lt;p&gt;The next thing you'll notice is that you can't search for a place. You can only just pick points on the map and route between those. I'm still not exactly sure if it's supposed to have it, since the Trimet one has it. But even then adding it by using the Google Maps or MapQuest APIs shouldn't be too difficult.&lt;/p&gt;
+&lt;p&gt;Another missing thing compared to the Trimet planner is being able to look at the routes akin to OneBusAway. And even then, Trimet's implementation isn't as good for exploring as OneBusAway is. Seeing the schedule or seeing which routes pass through a stop are left to an external site to do.&lt;/p&gt;
+&lt;p&gt;There have been some weird issues with the routing though. A common occurence is the steps are somewhat disconnected (see image below). The left half shows OpenTripPlanner, it shows that you get off at a "stop" in EDSA and you should magically teleport to Arguilla street and start walking. To be fair, Google Maps (right half) shows that there is a street from the "stop" to Arguilla.&lt;/p&gt;
+&lt;p&gt;&lt;img alt="OpenTripPlanner disconnected route" src="/galleries/transit/otp1.png"&gt;&lt;/p&gt;
+&lt;p&gt;I can't say this isn't a bug. After all, OpenTripPlanner couldn't have magically known there really was a street there. If it did, it wouldn't just teleport you to the corner. I'm more inclined to think though that this is a result of not having any shape data. As a result, OpenTripPlanner might try to assume the stop could mean places within a certain radius of where it was defined.&lt;/p&gt;
+&lt;p&gt;Another weird issue that pops up sometimes is where it tells you to ride a jeep past the stop you want and then after a while, get off and ride a jeep back to your stop. A more general issue is that sometimes it won't give you the best route because it thinks you have to loop around to get to where you want to be. I don't really know how common this issue pops up though. It's highly dependent on where you put the marker. If you just move the marker down a little bit, it actually does give the correct route.&lt;/p&gt;
+&lt;p&gt;&lt;img alt="OpenTripPlanner loopy route" src="/galleries/transit/otp2.png"&gt;&lt;/p&gt;
+&lt;p&gt;Much like the earlier problem, I can't tell if this is a bug or it's a result of the bad data. Once again though, I think the issue is more of bad data. If you look at the plotted UP-Katipunan route, the stops aren't even on the road. This probably makes it more difficult for OpenTripPlanner to actually tell if the stop and road are connected.&lt;/p&gt;
+&lt;p&gt;&lt;img alt="UP Katipunan Route" src="/galleries/transit/upkatipunan.jpg"&gt;&lt;/p&gt;
+&lt;p&gt;From what they said during the launch, most of the route data was collected by getting a person to ride a jeep with a smartphone. That would explain why the coordinates aren't that exact. Even then, it would have been nice if they at least cleaned up the data by moving the stops to the road. They would have had to go over them to name the stops anyway.&lt;/p&gt;
+&lt;h4&gt;Conclusion&lt;/h4&gt;
+&lt;p&gt;Overall though, I really like OpenTripPlanner. It handles most of the hard parts of the challenge. It provides a REST API for doing routing with the GTFS + OSM data. There's also a lot of potential for additional open source work. A lot can be done to improve the default webapp. Adding a default location searcher would greatly improve usability. Adding in the route viewing features of OneBusAway would also be nice. Alternatively, you could even write your own client that just interfaces with the API.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://pleasantprogrammer.com/posts/open-trip-planner.html</guid><pubDate>Tue, 09 Jul 2013 15:16:12 GMT</pubDate></item><item><title>One Bus (or maybe Jeep) Away</title><link>http://pleasantprogrammer.com/posts/one-bus-or-maybe-jeep-away.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://onebusaway.org/"&gt;http://onebusaway.org/&lt;/a&gt;&lt;/p&gt;
 &lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; no routing; useless in Philippines&lt;/p&gt;
 &lt;p&gt;OneBusAway is a transit information app. It provides data on what bus stops are near you, which buses pass by. You can also get schedules and the route of a particular bus given the number. It can also provide realtime updates like how many minutes until the next bus arrives. It does not, however, provide routing. There is no support for providing directions to get from point A to point B.&lt;/p&gt;
 &lt;p&gt;It's comparable to what you get in some bus stops abroad. You'd get a vicinity map and a list of buses passing through the stop. You might also get the times when the next buses will pass. It's useful for locals who already know how to get around, and want to avoid waiting for the bus. But it's not particularly good for people who want to know how to get around the city.&lt;/p&gt;
@@ -14,7 +33,7 @@
 &lt;p&gt;In the last post, I mentioned the quality of the data isn't quite good. Even before seeing the data, I was already a bit unsure of it. The key problem is how you model the routes. The GTFS format was inherently designed for more well developed and organized transit agencies which isn't exactly what we have in the Philippines now.&lt;/p&gt;
 &lt;p&gt;One potential problem is the nature of the jeeps and buses. GTFS routes are a collection of trips which are a sequence of stops. However, we don't have jeepney stops, and even if we did they still just stop anywhere. There are also times where jeeps will take a shortcut if no passengers need to get dropped off along their normal route.&lt;/p&gt;
 &lt;p&gt;From what I've seen of the data, they handled the first problem well enough. Stops are defined as where people typically get on the jeep or bus. This is good, but they didn't define a shape for the routes. There is no information as to which exact roads they pass through. All we have to go by are the stops to show the route on a map.&lt;/p&gt;
-&lt;p&gt;&lt;img alt="sample route" src="/galleries/transit/gtfs_preview.jpg"&gt;&lt;/p&gt;
+&lt;p&gt;&lt;img alt="sample route" src="http://i.imgur.com/NSVlryE.jpg"&gt;&lt;/p&gt;
 &lt;p&gt;The problem isn't that bad though. The agencies could still add the shapes later on. Or maybe an app challenge participant could make an app around fixing the routes via crowd-sourcing or similar. The shape itself isn't that important for a rudimentary directions app, but if we want better apps, we will need better data.&lt;/p&gt;
 &lt;p&gt;There were also some minor issues with the data itself. Some of the files had extra columns. This normally isn't an issue, but it caused problems for &lt;a href="https://github.com/harrisony/gtfs_SQL_importer"&gt;GTFS SQL importer&lt;/a&gt;. There were also problems with matching the shape data with the stops when I tried it with &lt;a href="http://onebusaway.org"&gt;OneBusAway&lt;/a&gt;. They could probably be &lt;a href="https://github.com/OneBusAway/onebusaway-application-modules/wiki/Stop-to-Shape-Matching"&gt;fixed&lt;/a&gt; but that's for another day.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://pleasantprogrammer.com/posts/jeepney-and-bus-routes.html</guid><pubDate>Sun, 07 Jul 2013 02:32:36 GMT</pubDate></item><item><title>Philippine Transit App Challenge</title><link>http://pleasantprogrammer.com/posts/philippine-transit-app-challenge.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Last week, the DOTC launched the &lt;a href="http://philippine-transit.hackathome.com"&gt;Philippine Transit App Challenge&lt;/a&gt;. It's a competition to build something great using the newly available 1) jeepney/bus/rail routes and 2) traffic incident data in Metro Manila and Cebu.&lt;/p&gt;
 &lt;p&gt;I'm actually quite excited about this as it's not everyday our government does wonderful things. Many people have been waiting for this kind of data to be available. Before, the only way to figure out which jeeps to ride to get from A to B is by asking other people. The website of the LTFRB used to just have a list of jeepney routes, but nothing else, no maps or list of stops.&lt;/p&gt;

+ 2 - 1
output/categories/programming.html

@@ -37,7 +37,8 @@
         <div class="postbox">
         <h1>Posts about programming</h1>
             <a href="programming.xml">RSS</a>
-        <br><ul class="unstyled"><li><a href="../posts/one-bus-or-maybe-jeep-away.html">[2013-07-09 01:53] One Bus (or maybe Jeep) Away</a>
+        <br><ul class="unstyled"><li><a href="../posts/open-trip-planner.html">[2013-07-09 23:16] Open Trip Planner</a>
+            </li><li><a href="../posts/one-bus-or-maybe-jeep-away.html">[2013-07-09 01:53] One Bus (or maybe Jeep) Away</a>
             </li><li><a href="../posts/jeepney-and-bus-routes.html">[2013-07-07 10:32] Jeepney and Bus Routes</a>
             </li><li><a href="../posts/philippine-transit-app-challenge.html">[2013-07-07 00:17] Philippine Transit App Challenge</a>
         </li></ul></div>

+ 21 - 2
output/categories/programming.xml

@@ -1,5 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
-<rss version="2.0"><channel><title>Pleasant Programmer (programming)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 09 Jul 2013 10:27:08 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>One Bus (or maybe Jeep) Away</title><link>http://pleasantprogrammer.com/posts/one-bus-or-maybe-jeep-away.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://onebusaway.org/"&gt;http://onebusaway.org/&lt;/a&gt;&lt;/p&gt;
+<rss version="2.0"><channel><title>Pleasant Programmer (programming)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 09 Jul 2013 23:39:42 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Open Trip Planner</title><link>http://pleasantprogrammer.com/posts/open-trip-planner.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://www.opentripplanner.org"&gt;http://www.opentripplanner.org&lt;/a&gt;&lt;/p&gt;
+&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; routes pretty well; data might cause weird issues&lt;/p&gt;
+&lt;p&gt;OpenTripPlanner, as the name implies, is a routing app. Given point A and point B, it can provide possible routes by taking transit, riding a bike, or a mix of both. You can also specify options on how much walking you're willing to do or if you prefer fewer transfers over trip time. It could be a good competitor to the transit directions of Google Maps.&lt;/p&gt;
+&lt;p&gt;It's actually in general use by the &lt;a href="http://maps.trimet.org/"&gt;Trimet&lt;/a&gt;, Portland's public transit system. I think a good reason why they deployed OpenTripPlanner is that Portland is a very bike friendly area. OpenTripPlanner's support for multi-modal (bike + transit) routing is one thing that even Google Maps doesn't have. This actually just screams &lt;a href="http://philippine-transit.hackathome.com/prizes/"&gt;Inclusive Technology Award&lt;/a&gt;.&lt;/p&gt;
+&lt;h4&gt;Setup&lt;/h4&gt;
+&lt;p&gt;Getting OpenTripPlanner up and running involves a bit more downloading than OneBusAway. I'd suggest going through the &lt;a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes"&gt;5-minute introduction&lt;/a&gt; if you want to actually work with the Philippine data. You will also need to download the &lt;a href="http://download.geofabrik.de/asia/philippines.html"&gt;Philippine data dump&lt;/a&gt; from OSM. You will want the &lt;code&gt;osm.bz2&lt;/code&gt; one (WARNING: 900MB unzipped).&lt;/p&gt;
+&lt;p&gt;Once you get the webapp running, you'll notice the map tiles won't load correctly. This is because the default tileset used is from Mapbox which doesn't provide publicly free tilesets anymore. To actually see things on the map, you should click the + on the upper-right of the map and change the base layer to something like Open Street Map or OSM Mapquest. This has been fixed in their latest sources.&lt;/p&gt;
+&lt;h4&gt;Issues&lt;/h4&gt;
+&lt;p&gt;The next thing you'll notice is that you can't search for a place. You can only just pick points on the map and route between those. I'm still not exactly sure if it's supposed to have it, since the Trimet one has it. But even then adding it by using the Google Maps or MapQuest APIs shouldn't be too difficult.&lt;/p&gt;
+&lt;p&gt;Another missing thing compared to the Trimet planner is being able to look at the routes akin to OneBusAway. And even then, Trimet's implementation isn't as good for exploring as OneBusAway is. Seeing the schedule or seeing which routes pass through a stop are left to an external site to do.&lt;/p&gt;
+&lt;p&gt;There have been some weird issues with the routing though. A common occurence is the steps are somewhat disconnected (see image below). The left half shows OpenTripPlanner, it shows that you get off at a "stop" in EDSA and you should magically teleport to Arguilla street and start walking. To be fair, Google Maps (right half) shows that there is a street from the "stop" to Arguilla.&lt;/p&gt;
+&lt;p&gt;&lt;img alt="OpenTripPlanner disconnected route" src="/galleries/transit/otp1.png"&gt;&lt;/p&gt;
+&lt;p&gt;I can't say this isn't a bug. After all, OpenTripPlanner couldn't have magically known there really was a street there. If it did, it wouldn't just teleport you to the corner. I'm more inclined to think though that this is a result of not having any shape data. As a result, OpenTripPlanner might try to assume the stop could mean places within a certain radius of where it was defined.&lt;/p&gt;
+&lt;p&gt;Another weird issue that pops up sometimes is where it tells you to ride a jeep past the stop you want and then after a while, get off and ride a jeep back to your stop. A more general issue is that sometimes it won't give you the best route because it thinks you have to loop around to get to where you want to be. I don't really know how common this issue pops up though. It's highly dependent on where you put the marker. If you just move the marker down a little bit, it actually does give the correct route.&lt;/p&gt;
+&lt;p&gt;&lt;img alt="OpenTripPlanner loopy route" src="/galleries/transit/otp2.png"&gt;&lt;/p&gt;
+&lt;p&gt;Much like the earlier problem, I can't tell if this is a bug or it's a result of the bad data. Once again though, I think the issue is more of bad data. If you look at the plotted UP-Katipunan route, the stops aren't even on the road. This probably makes it more difficult for OpenTripPlanner to actually tell if the stop and road are connected.&lt;/p&gt;
+&lt;p&gt;&lt;img alt="UP Katipunan Route" src="/galleries/transit/upkatipunan.jpg"&gt;&lt;/p&gt;
+&lt;p&gt;From what they said during the launch, most of the route data was collected by getting a person to ride a jeep with a smartphone. That would explain why the coordinates aren't that exact. Even then, it would have been nice if they at least cleaned up the data by moving the stops to the road. They would have had to go over them to name the stops anyway.&lt;/p&gt;
+&lt;h4&gt;Conclusion&lt;/h4&gt;
+&lt;p&gt;Overall though, I really like OpenTripPlanner. It handles most of the hard parts of the challenge. It provides a REST API for doing routing with the GTFS + OSM data. There's also a lot of potential for additional open source work. A lot can be done to improve the default webapp. Adding a default location searcher would greatly improve usability. Adding in the route viewing features of OneBusAway would also be nice. Alternatively, you could even write your own client that just interfaces with the API.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://pleasantprogrammer.com/posts/open-trip-planner.html</guid><pubDate>Tue, 09 Jul 2013 15:16:12 GMT</pubDate></item><item><title>One Bus (or maybe Jeep) Away</title><link>http://pleasantprogrammer.com/posts/one-bus-or-maybe-jeep-away.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://onebusaway.org/"&gt;http://onebusaway.org/&lt;/a&gt;&lt;/p&gt;
 &lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; no routing; useless in Philippines&lt;/p&gt;
 &lt;p&gt;OneBusAway is a transit information app. It provides data on what bus stops are near you, which buses pass by. You can also get schedules and the route of a particular bus given the number. It can also provide realtime updates like how many minutes until the next bus arrives. It does not, however, provide routing. There is no support for providing directions to get from point A to point B.&lt;/p&gt;
 &lt;p&gt;It's comparable to what you get in some bus stops abroad. You'd get a vicinity map and a list of buses passing through the stop. You might also get the times when the next buses will pass. It's useful for locals who already know how to get around, and want to avoid waiting for the bus. But it's not particularly good for people who want to know how to get around the city.&lt;/p&gt;
@@ -14,7 +33,7 @@
 &lt;p&gt;In the last post, I mentioned the quality of the data isn't quite good. Even before seeing the data, I was already a bit unsure of it. The key problem is how you model the routes. The GTFS format was inherently designed for more well developed and organized transit agencies which isn't exactly what we have in the Philippines now.&lt;/p&gt;
 &lt;p&gt;One potential problem is the nature of the jeeps and buses. GTFS routes are a collection of trips which are a sequence of stops. However, we don't have jeepney stops, and even if we did they still just stop anywhere. There are also times where jeeps will take a shortcut if no passengers need to get dropped off along their normal route.&lt;/p&gt;
 &lt;p&gt;From what I've seen of the data, they handled the first problem well enough. Stops are defined as where people typically get on the jeep or bus. This is good, but they didn't define a shape for the routes. There is no information as to which exact roads they pass through. All we have to go by are the stops to show the route on a map.&lt;/p&gt;
-&lt;p&gt;&lt;img alt="sample route" src="/galleries/transit/gtfs_preview.jpg"&gt;&lt;/p&gt;
+&lt;p&gt;&lt;img alt="sample route" src="http://i.imgur.com/NSVlryE.jpg"&gt;&lt;/p&gt;
 &lt;p&gt;The problem isn't that bad though. The agencies could still add the shapes later on. Or maybe an app challenge participant could make an app around fixing the routes via crowd-sourcing or similar. The shape itself isn't that important for a rudimentary directions app, but if we want better apps, we will need better data.&lt;/p&gt;
 &lt;p&gt;There were also some minor issues with the data itself. Some of the files had extra columns. This normally isn't an issue, but it caused problems for &lt;a href="https://github.com/harrisony/gtfs_SQL_importer"&gt;GTFS SQL importer&lt;/a&gt;. There were also problems with matching the shape data with the stops when I tried it with &lt;a href="http://onebusaway.org"&gt;OneBusAway&lt;/a&gt;. They could probably be &lt;a href="https://github.com/OneBusAway/onebusaway-application-modules/wiki/Stop-to-Shape-Matching"&gt;fixed&lt;/a&gt; but that's for another day.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://pleasantprogrammer.com/posts/jeepney-and-bus-routes.html</guid><pubDate>Sun, 07 Jul 2013 02:32:36 GMT</pubDate></item><item><title>Philippine Transit App Challenge</title><link>http://pleasantprogrammer.com/posts/philippine-transit-app-challenge.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Last week, the DOTC launched the &lt;a href="http://philippine-transit.hackathome.com"&gt;Philippine Transit App Challenge&lt;/a&gt;. It's a competition to build something great using the newly available 1) jeepney/bus/rail routes and 2) traffic incident data in Metro Manila and Cebu.&lt;/p&gt;
 &lt;p&gt;I'm actually quite excited about this as it's not everyday our government does wonderful things. Many people have been waiting for this kind of data to be available. Before, the only way to figure out which jeeps to ride to get from A to B is by asking other people. The website of the LTFRB used to just have a list of jeepney routes, but nothing else, no maps or list of stops.&lt;/p&gt;

+ 9 - 3
output/galleries/transit/index.html

@@ -35,14 +35,20 @@
     
     <ul class="breadcrumb"><li><a href="../">/ galleries</a>
             </li><li><a href="#">/ transit</a>
-    </li></ul><ul></ul><ul class="thumbnails"><li><a href="gtfs_preview.jpg" class="thumbnail image-reference" id="gtfs_preview" alt="gtfs_preview" title="Gtfs preview">
+    </li></ul><ul></ul><ul class="thumbnails"><li><a href="upkatipunan.jpg" class="thumbnail image-reference" id="upkatipunan" alt="upkatipunan" title="Upkatipunan">
+                <img src="upkatipunan.thumbnail.jpg"></a>
+            </li><li><a href="gtfs_preview.jpg" class="thumbnail image-reference" id="gtfs_preview" alt="gtfs_preview" title="Gtfs preview">
                 <img src="gtfs_preview.thumbnail.jpg"></a>
             </li><li><a href="onebusaway1.png" class="thumbnail image-reference" id="onebusaway1" alt="onebusaway1" title="Onebusaway1">
                 <img src="onebusaway1.thumbnail.png"></a>
-            </li><li><a href="onebusaway2.png" class="thumbnail image-reference" id="onebusaway2" alt="onebusaway2" title="Onebusaway2">
-                <img src="onebusaway2.thumbnail.png"></a>
             </li><li><a href="onebusaway3.png" class="thumbnail image-reference" id="onebusaway3" alt="onebusaway3" title="Onebusaway3">
                 <img src="onebusaway3.thumbnail.png"></a>
+            </li><li><a href="onebusaway2.png" class="thumbnail image-reference" id="onebusaway2" alt="onebusaway2" title="Onebusaway2">
+                <img src="onebusaway2.thumbnail.png"></a>
+            </li><li><a href="otp1.png" class="thumbnail image-reference" id="otp1" alt="otp1" title="Otp1">
+                <img src="otp1.thumbnail.png"></a>
+            </li><li><a href="otp2.png" class="thumbnail image-reference" id="otp2" alt="otp2" title="Otp2">
+                <img src="otp2.thumbnail.png"></a>
     </li></ul></div>
     </div>
     <!--End of body content-->

BIN
output/galleries/transit/otp1.png


BIN
output/galleries/transit/otp1.thumbnail.png


BIN
output/galleries/transit/otp2.png


BIN
output/galleries/transit/otp2.thumbnail.png


BIN
output/galleries/transit/upkatipunan.jpg


BIN
output/galleries/transit/upkatipunan.thumbnail.jpg


+ 30 - 1
output/index.html

@@ -33,6 +33,35 @@
     <div class="span2"></div>
     <div class="span8">
     
+        <div class="postbox">
+        <h1><a href="posts/open-trip-planner.html">Open Trip Planner</a>
+        <small>  
+             Posted: <time class="published" datetime="2013-07-09T23:16:12+08:00">2013-07-09 23:16</time></small></h1>
+        <hr><p>Link: <a href="http://www.opentripplanner.org">http://www.opentripplanner.org</a></p>
+<p><strong>TL;DR</strong> routes pretty well; data might cause weird issues</p>
+<p>OpenTripPlanner, as the name implies, is a routing app. Given point A and point B, it can provide possible routes by taking transit, riding a bike, or a mix of both. You can also specify options on how much walking you're willing to do or if you prefer fewer transfers over trip time. It could be a good competitor to the transit directions of Google Maps.</p>
+<p>It's actually in general use by the <a href="http://maps.trimet.org/">Trimet</a>, Portland's public transit system. I think a good reason why they deployed OpenTripPlanner is that Portland is a very bike friendly area. OpenTripPlanner's support for multi-modal (bike + transit) routing is one thing that even Google Maps doesn't have. This actually just screams <a href="http://philippine-transit.hackathome.com/prizes/">Inclusive Technology Award</a>.</p>
+<h4>Setup</h4>
+<p>Getting OpenTripPlanner up and running involves a bit more downloading than OneBusAway. I'd suggest going through the <a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes">5-minute introduction</a> if you want to actually work with the Philippine data. You will also need to download the <a href="http://download.geofabrik.de/asia/philippines.html">Philippine data dump</a> from OSM. You will want the <code>osm.bz2</code> one (WARNING: 900MB unzipped).</p>
+<p>Once you get the webapp running, you'll notice the map tiles won't load correctly. This is because the default tileset used is from Mapbox which doesn't provide publicly free tilesets anymore. To actually see things on the map, you should click the + on the upper-right of the map and change the base layer to something like Open Street Map or OSM Mapquest. This has been fixed in their latest sources.</p>
+<h4>Issues</h4>
+<p>The next thing you'll notice is that you can't search for a place. You can only just pick points on the map and route between those. I'm still not exactly sure if it's supposed to have it, since the Trimet one has it. But even then adding it by using the Google Maps or MapQuest APIs shouldn't be too difficult.</p>
+<p>Another missing thing compared to the Trimet planner is being able to look at the routes akin to OneBusAway. And even then, Trimet's implementation isn't as good for exploring as OneBusAway is. Seeing the schedule or seeing which routes pass through a stop are left to an external site to do.</p>
+<p>There have been some weird issues with the routing though. A common occurence is the steps are somewhat disconnected (see image below). The left half shows OpenTripPlanner, it shows that you get off at a "stop" in EDSA and you should magically teleport to Arguilla street and start walking. To be fair, Google Maps (right half) shows that there is a street from the "stop" to Arguilla.</p>
+<p><img alt="OpenTripPlanner disconnected route" src="galleries/transit/otp1.png"></p>
+<p>I can't say this isn't a bug. After all, OpenTripPlanner couldn't have magically known there really was a street there. If it did, it wouldn't just teleport you to the corner. I'm more inclined to think though that this is a result of not having any shape data. As a result, OpenTripPlanner might try to assume the stop could mean places within a certain radius of where it was defined.</p>
+<p>Another weird issue that pops up sometimes is where it tells you to ride a jeep past the stop you want and then after a while, get off and ride a jeep back to your stop. A more general issue is that sometimes it won't give you the best route because it thinks you have to loop around to get to where you want to be. I don't really know how common this issue pops up though. It's highly dependent on where you put the marker. If you just move the marker down a little bit, it actually does give the correct route.</p>
+<p><img alt="OpenTripPlanner loopy route" src="galleries/transit/otp2.png"></p>
+<p>Much like the earlier problem, I can't tell if this is a bug or it's a result of the bad data. Once again though, I think the issue is more of bad data. If you look at the plotted UP-Katipunan route, the stops aren't even on the road. This probably makes it more difficult for OpenTripPlanner to actually tell if the stop and road are connected.</p>
+<p><img alt="UP Katipunan Route" src="galleries/transit/upkatipunan.jpg"></p>
+<p>From what they said during the launch, most of the route data was collected by getting a person to ride a jeep with a smartphone. That would explain why the coordinates aren't that exact. Even then, it would have been nice if they at least cleaned up the data by moving the stops to the road. They would have had to go over them to name the stops anyway.</p>
+<h4>Conclusion</h4>
+<p>Overall though, I really like OpenTripPlanner. It handles most of the hard parts of the challenge. It provides a REST API for doing routing with the GTFS + OSM data. There's also a lot of potential for additional open source work. A lot can be done to improve the default webapp. Adding a default location searcher would greatly improve usability. Adding in the route viewing features of OneBusAway would also be nice. Alternatively, you could even write your own client that just interfaces with the API.</p>
+            
+    <p>
+        <a href="posts/open-trip-planner.html#disqus_thread" data-disqus-identifier="cache/posts/open-trip-planner.html">Comments</a>
+
+        </p></div>
         <div class="postbox">
         <h1><a href="posts/one-bus-or-maybe-jeep-away.html">One Bus (or maybe Jeep) Away</a>
         <small>  
@@ -62,7 +91,7 @@
 <p>In the last post, I mentioned the quality of the data isn't quite good. Even before seeing the data, I was already a bit unsure of it. The key problem is how you model the routes. The GTFS format was inherently designed for more well developed and organized transit agencies which isn't exactly what we have in the Philippines now.</p>
 <p>One potential problem is the nature of the jeeps and buses. GTFS routes are a collection of trips which are a sequence of stops. However, we don't have jeepney stops, and even if we did they still just stop anywhere. There are also times where jeeps will take a shortcut if no passengers need to get dropped off along their normal route.</p>
 <p>From what I've seen of the data, they handled the first problem well enough. Stops are defined as where people typically get on the jeep or bus. This is good, but they didn't define a shape for the routes. There is no information as to which exact roads they pass through. All we have to go by are the stops to show the route on a map.</p>
-<p><img alt="sample route" src="galleries/transit/gtfs_preview.jpg"></p>
+<p><img alt="sample route" src="http://i.imgur.com/NSVlryE.jpg"></p>
 <p>The problem isn't that bad though. The agencies could still add the shapes later on. Or maybe an app challenge participant could make an app around fixing the routes via crowd-sourcing or similar. The shape itself isn't that important for a rudimentary directions app, but if we want better apps, we will need better data.</p>
 <p>There were also some minor issues with the data itself. Some of the files had extra columns. This normally isn't an issue, but it caused problems for <a href="https://github.com/harrisony/gtfs_SQL_importer">GTFS SQL importer</a>. There were also problems with matching the shape data with the stops when I tried it with <a href="http://onebusaway.org">OneBusAway</a>. They could probably be <a href="https://github.com/OneBusAway/onebusaway-application-modules/wiki/Stop-to-Shape-Matching">fixed</a> but that's for another day.</p>
             

+ 1 - 1
output/posts/jeepney-and-bus-routes.html

@@ -55,7 +55,7 @@
 <p>In the last post, I mentioned the quality of the data isn't quite good. Even before seeing the data, I was already a bit unsure of it. The key problem is how you model the routes. The GTFS format was inherently designed for more well developed and organized transit agencies which isn't exactly what we have in the Philippines now.</p>
 <p>One potential problem is the nature of the jeeps and buses. GTFS routes are a collection of trips which are a sequence of stops. However, we don't have jeepney stops, and even if we did they still just stop anywhere. There are also times where jeeps will take a shortcut if no passengers need to get dropped off along their normal route.</p>
 <p>From what I've seen of the data, they handled the first problem well enough. Stops are defined as where people typically get on the jeep or bus. This is good, but they didn't define a shape for the routes. There is no information as to which exact roads they pass through. All we have to go by are the stops to show the route on a map.</p>
-<p><img alt="sample route" src="../galleries/transit/gtfs_preview.jpg"></p>
+<p><img alt="sample route" src="http://i.imgur.com/NSVlryE.jpg"></p>
 <p>The problem isn't that bad though. The agencies could still add the shapes later on. Or maybe an app challenge participant could make an app around fixing the routes via crowd-sourcing or similar. The shape itself isn't that important for a rudimentary directions app, but if we want better apps, we will need better data.</p>
 <p>There were also some minor issues with the data itself. Some of the files had extra columns. This normally isn't an issue, but it caused problems for <a href="https://github.com/harrisony/gtfs_SQL_importer">GTFS SQL importer</a>. There were also problems with matching the shape data with the stops when I tried it with <a href="http://onebusaway.org">OneBusAway</a>. They could probably be <a href="https://github.com/OneBusAway/onebusaway-application-modules/wiki/Stop-to-Shape-Matching">fixed</a> but that's for another day.</p>
     

+ 1 - 1
output/posts/jeepney-and-bus-routes.md

@@ -15,7 +15,7 @@ One potential problem is the nature of the jeeps and buses. GTFS routes are a co
 
 From what I've seen of the data, they handled the first problem well enough. Stops are defined as where people typically get on the jeep or bus. This is good, but they didn't define a shape for the routes. There is no information as to which exact roads they pass through. All we have to go by are the stops to show the route on a map.
 
-![sample route](../galleries/transit/gtfs_preview.jpg)
+![sample route](http://i.imgur.com/NSVlryE.jpg)
 
 The problem isn't that bad though. The agencies could still add the shapes later on. Or maybe an app challenge participant could make an app around fixing the routes via crowd-sourcing or similar. The shape itself isn't that important for a rudimentary directions app, but if we want better apps, we will need better data.
 

+ 3 - 0
output/posts/one-bus-or-maybe-jeep-away.html

@@ -67,6 +67,9 @@
     <ul class="pager"><li class="previous">
             <a href="jeepney-and-bus-routes.html">← Previous post</a>
         </li>
+        <li class="next">
+            <a href="open-trip-planner.html">Next post →</a>
+        </li>
     </ul><div id="disqus_thread"></div>
         <script type="text/javascript">
         var disqus_shortname ="pleasantprog";

+ 108 - 0
output/posts/open-trip-planner.html

@@ -0,0 +1,108 @@
+<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta charset="utf-8"><meta name="description" content=""><meta name="author" content="Thomas Dy"><title>Open Trip Planner | Pleasant Programmer</title><link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"><link href="../assets/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"><link href="../assets/css/rst.css" rel="stylesheet" type="text/css"><link href="../assets/css/code.css" rel="stylesheet" type="text/css"><link href="../assets/css/colorbox.css" rel="stylesheet" type="text/css"><link href="../assets/css/theme.css" rel="stylesheet" type="text/css"><link href="../assets/css/custom.css" rel="stylesheet" type="text/css"><!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
+    <![endif]--><link rel="alternate" type="application/rss+xml" title="RSS" href="../rss.xml"></head><body>
+<!-- Menubar -->
+<div class="navbar navbar-fixed-top">
+    <div class="navbar-inner">
+        <div class="container">
+
+        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
+        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+        </a>
+
+            <a class="brand" href="../">
+            Pleasant Programmer
+            </a>
+            <!-- Everything you want hidden at 940px or less, place within here -->
+            <div class="nav-collapse collapse">
+                <ul class="nav"><li><a href="../archive.html">Archives</a>
+            </li><li><a href="../categories/index.html">Tags</a>
+            </li><li><a href="../rss.xml">RSS</a>
+
+                </li></ul><ul class="nav pull-right"><li>
+    <a href="open-trip-planner.md" id="sourcelink">Source</a>
+    </li>
+
+                </ul></div>
+        </div>
+    </div>
+</div>
+<!-- End of Menubar -->
+<div class="container-fluid" id="container-fluid">
+    <!--Body content-->
+    <div class="row-fluid">
+    <div class="span2"></div>
+    <div class="span8">
+    
+    <div class="postbox">
+    
+    <h1>Open Trip Planner</h1>
+
+    <hr><small>
+        Posted: <time class="published" datetime="2013-07-09T23:16:12+08:00">2013-07-09 23:16</time>
+        
+
+        
+          |  More posts about
+            <a class="tag" href="../categories/philippine-transit-app.html"><span class="badge badge-info">philippine-transit-app</span></a>
+            <a class="tag" href="../categories/programming.html"><span class="badge badge-info">programming</span></a>
+
+    </small>
+    <hr><p>Link: <a href="http://www.opentripplanner.org">http://www.opentripplanner.org</a></p>
+<p><strong>TL;DR</strong> routes pretty well; data might cause weird issues</p>
+<p>OpenTripPlanner, as the name implies, is a routing app. Given point A and point B, it can provide possible routes by taking transit, riding a bike, or a mix of both. You can also specify options on how much walking you're willing to do or if you prefer fewer transfers over trip time. It could be a good competitor to the transit directions of Google Maps.</p>
+<p>It's actually in general use by the <a href="http://maps.trimet.org/">Trimet</a>, Portland's public transit system. I think a good reason why they deployed OpenTripPlanner is that Portland is a very bike friendly area. OpenTripPlanner's support for multi-modal (bike + transit) routing is one thing that even Google Maps doesn't have. This actually just screams <a href="http://philippine-transit.hackathome.com/prizes/">Inclusive Technology Award</a>.</p>
+<h4>Setup</h4>
+<p>Getting OpenTripPlanner up and running involves a bit more downloading than OneBusAway. I'd suggest going through the <a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes">5-minute introduction</a> if you want to actually work with the Philippine data. You will also need to download the <a href="http://download.geofabrik.de/asia/philippines.html">Philippine data dump</a> from OSM. You will want the <code>osm.bz2</code> one (WARNING: 900MB unzipped).</p>
+<p>Once you get the webapp running, you'll notice the map tiles won't load correctly. This is because the default tileset used is from Mapbox which doesn't provide publicly free tilesets anymore. To actually see things on the map, you should click the + on the upper-right of the map and change the base layer to something like Open Street Map or OSM Mapquest. This has been fixed in their latest sources.</p>
+<h4>Issues</h4>
+<p>The next thing you'll notice is that you can't search for a place. You can only just pick points on the map and route between those. I'm still not exactly sure if it's supposed to have it, since the Trimet one has it. But even then adding it by using the Google Maps or MapQuest APIs shouldn't be too difficult.</p>
+<p>Another missing thing compared to the Trimet planner is being able to look at the routes akin to OneBusAway. And even then, Trimet's implementation isn't as good for exploring as OneBusAway is. Seeing the schedule or seeing which routes pass through a stop are left to an external site to do.</p>
+<p>There have been some weird issues with the routing though. A common occurence is the steps are somewhat disconnected (see image below). The left half shows OpenTripPlanner, it shows that you get off at a "stop" in EDSA and you should magically teleport to Arguilla street and start walking. To be fair, Google Maps (right half) shows that there is a street from the "stop" to Arguilla.</p>
+<p><img alt="OpenTripPlanner disconnected route" src="../galleries/transit/otp1.png"></p>
+<p>I can't say this isn't a bug. After all, OpenTripPlanner couldn't have magically known there really was a street there. If it did, it wouldn't just teleport you to the corner. I'm more inclined to think though that this is a result of not having any shape data. As a result, OpenTripPlanner might try to assume the stop could mean places within a certain radius of where it was defined.</p>
+<p>Another weird issue that pops up sometimes is where it tells you to ride a jeep past the stop you want and then after a while, get off and ride a jeep back to your stop. A more general issue is that sometimes it won't give you the best route because it thinks you have to loop around to get to where you want to be. I don't really know how common this issue pops up though. It's highly dependent on where you put the marker. If you just move the marker down a little bit, it actually does give the correct route.</p>
+<p><img alt="OpenTripPlanner loopy route" src="../galleries/transit/otp2.png"></p>
+<p>Much like the earlier problem, I can't tell if this is a bug or it's a result of the bad data. Once again though, I think the issue is more of bad data. If you look at the plotted UP-Katipunan route, the stops aren't even on the road. This probably makes it more difficult for OpenTripPlanner to actually tell if the stop and road are connected.</p>
+<p><img alt="UP Katipunan Route" src="../galleries/transit/upkatipunan.jpg"></p>
+<p>From what they said during the launch, most of the route data was collected by getting a person to ride a jeep with a smartphone. That would explain why the coordinates aren't that exact. Even then, it would have been nice if they at least cleaned up the data by moving the stops to the road. They would have had to go over them to name the stops anyway.</p>
+<h4>Conclusion</h4>
+<p>Overall though, I really like OpenTripPlanner. It handles most of the hard parts of the challenge. It provides a REST API for doing routing with the GTFS + OSM data. There's also a lot of potential for additional open source work. A lot can be done to improve the default webapp. Adding a default location searcher would greatly improve usability. Adding in the route viewing features of OneBusAway would also be nice. Alternatively, you could even write your own client that just interfaces with the API.</p>
+    
+    <ul class="pager"><li class="previous">
+            <a href="one-bus-or-maybe-jeep-away.html">← Previous post</a>
+        </li>
+    </ul><div id="disqus_thread"></div>
+        <script type="text/javascript">
+        var disqus_shortname ="pleasantprog";
+            var disqus_url="http://pleasantprogrammer.com/posts/open-trip-planner.html";
+        var disqus_title="Open Trip Planner";
+        var disqus_identifier="cache/posts/open-trip-planner.html";
+        var disqus_config = function () {
+            this.language = "en";
+        };
+        (function() {
+            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+            dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+        })();
+    </script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+
+    
+
+    </div>
+
+    </div>
+    </div>
+    <!--End of body content-->
+</div>
+<div class="footerbox">
+    <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png"></a> © 2013 Thomas Dy - Powered by <a href="http://nikola.ralsina.com.ar">Nikola</a>
+</div>
+
+
+
+            <script src="../assets/js/jquery-1.7.2.min.js" type="text/javascript"></script><script src="../assets/js/bootstrap.min.js" type="text/javascript"></script><script src="../assets/js/jquery.colorbox-min.js" type="text/javascript"></script><script type="text/javascript">jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"80%",maxHeight:"80%",scalePhotos:true});</script></body></html>

+ 48 - 0
output/posts/open-trip-planner.md

@@ -0,0 +1,48 @@
+<!-- 
+.. link: 
+.. description: 
+.. tags: philippine-transit-app, programming
+.. date: 2013/07/09 23:16:12
+.. title: Open Trip Planner
+.. slug: open-trip-planner
+-->
+
+Link: [http://www.opentripplanner.org](http://www.opentripplanner.org)
+
+**TL;DR** routes pretty well; data might cause weird issues
+
+OpenTripPlanner, as the name implies, is a routing app. Given point A and point B, it can provide possible routes by taking transit, riding a bike, or a mix of both. You can also specify options on how much walking you're willing to do or if you prefer fewer transfers over trip time. It could be a good competitor to the transit directions of Google Maps.
+
+It's actually in general use by the [Trimet](http://maps.trimet.org/), Portland's public transit system. I think a good reason why they deployed OpenTripPlanner is that Portland is a very bike friendly area. OpenTripPlanner's support for multi-modal (bike + transit) routing is one thing that even Google Maps doesn't have. This actually just screams [Inclusive Technology Award](http://philippine-transit.hackathome.com/prizes/).
+
+### Setup
+
+Getting OpenTripPlanner up and running involves a bit more downloading than OneBusAway. I'd suggest going through the [5-minute introduction](https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes) if you want to actually work with the Philippine data. You will also need to download the [Philippine data dump](http://download.geofabrik.de/asia/philippines.html) from OSM. You will want the `osm.bz2` one (WARNING: 900MB unzipped).
+
+Once you get the webapp running, you'll notice the map tiles won't load correctly. This is because the default tileset used is from Mapbox which doesn't provide publicly free tilesets anymore. To actually see things on the map, you should click the + on the upper-right of the map and change the base layer to something like Open Street Map or OSM Mapquest. This has been fixed in their latest sources.
+
+### Issues
+
+The next thing you'll notice is that you can't search for a place. You can only just pick points on the map and route between those. I'm still not exactly sure if it's supposed to have it, since the Trimet one has it. But even then adding it by using the Google Maps or MapQuest APIs shouldn't be too difficult.
+
+Another missing thing compared to the Trimet planner is being able to look at the routes akin to OneBusAway. And even then, Trimet's implementation isn't as good for exploring as OneBusAway is. Seeing the schedule or seeing which routes pass through a stop are left to an external site to do.
+
+There have been some weird issues with the routing though. A common occurence is the steps are somewhat disconnected (see image below). The left half shows OpenTripPlanner, it shows that you get off at a "stop" in EDSA and you should magically teleport to Arguilla street and start walking. To be fair, Google Maps (right half) shows that there is a street from the "stop" to Arguilla.
+
+![OpenTripPlanner disconnected route](../galleries/transit/otp1.png)
+
+I can't say this isn't a bug. After all, OpenTripPlanner couldn't have magically known there really was a street there. If it did, it wouldn't just teleport you to the corner. I'm more inclined to think though that this is a result of not having any shape data. As a result, OpenTripPlanner might try to assume the stop could mean places within a certain radius of where it was defined.
+
+Another weird issue that pops up sometimes is where it tells you to ride a jeep past the stop you want and then after a while, get off and ride a jeep back to your stop. A more general issue is that sometimes it won't give you the best route because it thinks you have to loop around to get to where you want to be. I don't really know how common this issue pops up though. It's highly dependent on where you put the marker. If you just move the marker down a little bit, it actually does give the correct route.
+
+![OpenTripPlanner loopy route](../galleries/transit/otp2.png)
+
+Much like the earlier problem, I can't tell if this is a bug or it's a result of the bad data. Once again though, I think the issue is more of bad data. If you look at the plotted UP-Katipunan route, the stops aren't even on the road. This probably makes it more difficult for OpenTripPlanner to actually tell if the stop and road are connected.
+
+![UP Katipunan Route](../galleries/transit/upkatipunan.jpg)
+
+From what they said during the launch, most of the route data was collected by getting a person to ride a jeep with a smartphone. That would explain why the coordinates aren't that exact. Even then, it would have been nice if they at least cleaned up the data by moving the stops to the road. They would have had to go over them to name the stops anyway.
+
+### Conclusion
+
+Overall though, I really like OpenTripPlanner. It handles most of the hard parts of the challenge. It provides a REST API for doing routing with the GTFS + OSM data. There's also a lot of potential for additional open source work. A lot can be done to improve the default webapp. Adding a default location searcher would greatly improve usability. Adding in the route viewing features of OneBusAway would also be nice. Alternatively, you could even write your own client that just interfaces with the API.

+ 21 - 2
output/rss.xml

@@ -1,5 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
-<rss version="2.0"><channel><title>Pleasant Programmer</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 09 Jul 2013 10:27:08 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>One Bus (or maybe Jeep) Away</title><link>http://pleasantprogrammer.com/posts/one-bus-or-maybe-jeep-away.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://onebusaway.org/"&gt;http://onebusaway.org/&lt;/a&gt;&lt;/p&gt;
+<rss version="2.0"><channel><title>Pleasant Programmer</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 09 Jul 2013 23:39:42 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Open Trip Planner</title><link>http://pleasantprogrammer.com/posts/open-trip-planner.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://www.opentripplanner.org"&gt;http://www.opentripplanner.org&lt;/a&gt;&lt;/p&gt;
+&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; routes pretty well; data might cause weird issues&lt;/p&gt;
+&lt;p&gt;OpenTripPlanner, as the name implies, is a routing app. Given point A and point B, it can provide possible routes by taking transit, riding a bike, or a mix of both. You can also specify options on how much walking you're willing to do or if you prefer fewer transfers over trip time. It could be a good competitor to the transit directions of Google Maps.&lt;/p&gt;
+&lt;p&gt;It's actually in general use by the &lt;a href="http://maps.trimet.org/"&gt;Trimet&lt;/a&gt;, Portland's public transit system. I think a good reason why they deployed OpenTripPlanner is that Portland is a very bike friendly area. OpenTripPlanner's support for multi-modal (bike + transit) routing is one thing that even Google Maps doesn't have. This actually just screams &lt;a href="http://philippine-transit.hackathome.com/prizes/"&gt;Inclusive Technology Award&lt;/a&gt;.&lt;/p&gt;
+&lt;h4&gt;Setup&lt;/h4&gt;
+&lt;p&gt;Getting OpenTripPlanner up and running involves a bit more downloading than OneBusAway. I'd suggest going through the &lt;a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes"&gt;5-minute introduction&lt;/a&gt; if you want to actually work with the Philippine data. You will also need to download the &lt;a href="http://download.geofabrik.de/asia/philippines.html"&gt;Philippine data dump&lt;/a&gt; from OSM. You will want the &lt;code&gt;osm.bz2&lt;/code&gt; one (WARNING: 900MB unzipped).&lt;/p&gt;
+&lt;p&gt;Once you get the webapp running, you'll notice the map tiles won't load correctly. This is because the default tileset used is from Mapbox which doesn't provide publicly free tilesets anymore. To actually see things on the map, you should click the + on the upper-right of the map and change the base layer to something like Open Street Map or OSM Mapquest. This has been fixed in their latest sources.&lt;/p&gt;
+&lt;h4&gt;Issues&lt;/h4&gt;
+&lt;p&gt;The next thing you'll notice is that you can't search for a place. You can only just pick points on the map and route between those. I'm still not exactly sure if it's supposed to have it, since the Trimet one has it. But even then adding it by using the Google Maps or MapQuest APIs shouldn't be too difficult.&lt;/p&gt;
+&lt;p&gt;Another missing thing compared to the Trimet planner is being able to look at the routes akin to OneBusAway. And even then, Trimet's implementation isn't as good for exploring as OneBusAway is. Seeing the schedule or seeing which routes pass through a stop are left to an external site to do.&lt;/p&gt;
+&lt;p&gt;There have been some weird issues with the routing though. A common occurence is the steps are somewhat disconnected (see image below). The left half shows OpenTripPlanner, it shows that you get off at a "stop" in EDSA and you should magically teleport to Arguilla street and start walking. To be fair, Google Maps (right half) shows that there is a street from the "stop" to Arguilla.&lt;/p&gt;
+&lt;p&gt;&lt;img alt="OpenTripPlanner disconnected route" src="/galleries/transit/otp1.png"&gt;&lt;/p&gt;
+&lt;p&gt;I can't say this isn't a bug. After all, OpenTripPlanner couldn't have magically known there really was a street there. If it did, it wouldn't just teleport you to the corner. I'm more inclined to think though that this is a result of not having any shape data. As a result, OpenTripPlanner might try to assume the stop could mean places within a certain radius of where it was defined.&lt;/p&gt;
+&lt;p&gt;Another weird issue that pops up sometimes is where it tells you to ride a jeep past the stop you want and then after a while, get off and ride a jeep back to your stop. A more general issue is that sometimes it won't give you the best route because it thinks you have to loop around to get to where you want to be. I don't really know how common this issue pops up though. It's highly dependent on where you put the marker. If you just move the marker down a little bit, it actually does give the correct route.&lt;/p&gt;
+&lt;p&gt;&lt;img alt="OpenTripPlanner loopy route" src="/galleries/transit/otp2.png"&gt;&lt;/p&gt;
+&lt;p&gt;Much like the earlier problem, I can't tell if this is a bug or it's a result of the bad data. Once again though, I think the issue is more of bad data. If you look at the plotted UP-Katipunan route, the stops aren't even on the road. This probably makes it more difficult for OpenTripPlanner to actually tell if the stop and road are connected.&lt;/p&gt;
+&lt;p&gt;&lt;img alt="UP Katipunan Route" src="/galleries/transit/upkatipunan.jpg"&gt;&lt;/p&gt;
+&lt;p&gt;From what they said during the launch, most of the route data was collected by getting a person to ride a jeep with a smartphone. That would explain why the coordinates aren't that exact. Even then, it would have been nice if they at least cleaned up the data by moving the stops to the road. They would have had to go over them to name the stops anyway.&lt;/p&gt;
+&lt;h4&gt;Conclusion&lt;/h4&gt;
+&lt;p&gt;Overall though, I really like OpenTripPlanner. It handles most of the hard parts of the challenge. It provides a REST API for doing routing with the GTFS + OSM data. There's also a lot of potential for additional open source work. A lot can be done to improve the default webapp. Adding a default location searcher would greatly improve usability. Adding in the route viewing features of OneBusAway would also be nice. Alternatively, you could even write your own client that just interfaces with the API.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://pleasantprogrammer.com/posts/open-trip-planner.html</guid><pubDate>Tue, 09 Jul 2013 15:16:12 GMT</pubDate></item><item><title>One Bus (or maybe Jeep) Away</title><link>http://pleasantprogrammer.com/posts/one-bus-or-maybe-jeep-away.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://onebusaway.org/"&gt;http://onebusaway.org/&lt;/a&gt;&lt;/p&gt;
 &lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; no routing; useless in Philippines&lt;/p&gt;
 &lt;p&gt;OneBusAway is a transit information app. It provides data on what bus stops are near you, which buses pass by. You can also get schedules and the route of a particular bus given the number. It can also provide realtime updates like how many minutes until the next bus arrives. It does not, however, provide routing. There is no support for providing directions to get from point A to point B.&lt;/p&gt;
 &lt;p&gt;It's comparable to what you get in some bus stops abroad. You'd get a vicinity map and a list of buses passing through the stop. You might also get the times when the next buses will pass. It's useful for locals who already know how to get around, and want to avoid waiting for the bus. But it's not particularly good for people who want to know how to get around the city.&lt;/p&gt;
@@ -14,7 +33,7 @@
 &lt;p&gt;In the last post, I mentioned the quality of the data isn't quite good. Even before seeing the data, I was already a bit unsure of it. The key problem is how you model the routes. The GTFS format was inherently designed for more well developed and organized transit agencies which isn't exactly what we have in the Philippines now.&lt;/p&gt;
 &lt;p&gt;One potential problem is the nature of the jeeps and buses. GTFS routes are a collection of trips which are a sequence of stops. However, we don't have jeepney stops, and even if we did they still just stop anywhere. There are also times where jeeps will take a shortcut if no passengers need to get dropped off along their normal route.&lt;/p&gt;
 &lt;p&gt;From what I've seen of the data, they handled the first problem well enough. Stops are defined as where people typically get on the jeep or bus. This is good, but they didn't define a shape for the routes. There is no information as to which exact roads they pass through. All we have to go by are the stops to show the route on a map.&lt;/p&gt;
-&lt;p&gt;&lt;img alt="sample route" src="/galleries/transit/gtfs_preview.jpg"&gt;&lt;/p&gt;
+&lt;p&gt;&lt;img alt="sample route" src="http://i.imgur.com/NSVlryE.jpg"&gt;&lt;/p&gt;
 &lt;p&gt;The problem isn't that bad though. The agencies could still add the shapes later on. Or maybe an app challenge participant could make an app around fixing the routes via crowd-sourcing or similar. The shape itself isn't that important for a rudimentary directions app, but if we want better apps, we will need better data.&lt;/p&gt;
 &lt;p&gt;There were also some minor issues with the data itself. Some of the files had extra columns. This normally isn't an issue, but it caused problems for &lt;a href="https://github.com/harrisony/gtfs_SQL_importer"&gt;GTFS SQL importer&lt;/a&gt;. There were also problems with matching the shape data with the stops when I tried it with &lt;a href="http://onebusaway.org"&gt;OneBusAway&lt;/a&gt;. They could probably be &lt;a href="https://github.com/OneBusAway/onebusaway-application-modules/wiki/Stop-to-Shape-Matching"&gt;fixed&lt;/a&gt; but that's for another day.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://pleasantprogrammer.com/posts/jeepney-and-bus-routes.html</guid><pubDate>Sun, 07 Jul 2013 02:32:36 GMT</pubDate></item><item><title>Philippine Transit App Challenge</title><link>http://pleasantprogrammer.com/posts/philippine-transit-app-challenge.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Last week, the DOTC launched the &lt;a href="http://philippine-transit.hackathome.com"&gt;Philippine Transit App Challenge&lt;/a&gt;. It's a competition to build something great using the newly available 1) jeepney/bus/rail routes and 2) traffic incident data in Metro Manila and Cebu.&lt;/p&gt;
 &lt;p&gt;I'm actually quite excited about this as it's not everyday our government does wonderful things. Many people have been waiting for this kind of data to be available. Before, the only way to figure out which jeeps to ride to get from A to B is by asking other people. The website of the LTFRB used to just have a list of jeepney routes, but nothing else, no maps or list of stops.&lt;/p&gt;

+ 1 - 1
posts/jeepney-and-bus-routes.md

@@ -15,7 +15,7 @@ One potential problem is the nature of the jeeps and buses. GTFS routes are a co
 
 From what I've seen of the data, they handled the first problem well enough. Stops are defined as where people typically get on the jeep or bus. This is good, but they didn't define a shape for the routes. There is no information as to which exact roads they pass through. All we have to go by are the stops to show the route on a map.
 
-![sample route](../galleries/transit/gtfs_preview.jpg)
+![sample route](http://i.imgur.com/NSVlryE.jpg)
 
 The problem isn't that bad though. The agencies could still add the shapes later on. Or maybe an app challenge participant could make an app around fixing the routes via crowd-sourcing or similar. The shape itself isn't that important for a rudimentary directions app, but if we want better apps, we will need better data.
 

+ 48 - 0
posts/open-trip-planner.md

@@ -0,0 +1,48 @@
+<!-- 
+.. link: 
+.. description: 
+.. tags: philippine-transit-app, programming
+.. date: 2013/07/09 23:16:12
+.. title: Open Trip Planner
+.. slug: open-trip-planner
+-->
+
+Link: [http://www.opentripplanner.org](http://www.opentripplanner.org)
+
+**TL;DR** routes pretty well; data might cause weird issues
+
+OpenTripPlanner, as the name implies, is a routing app. Given point A and point B, it can provide possible routes by taking transit, riding a bike, or a mix of both. You can also specify options on how much walking you're willing to do or if you prefer fewer transfers over trip time. It could be a good competitor to the transit directions of Google Maps.
+
+It's actually in general use by the [Trimet](http://maps.trimet.org/), Portland's public transit system. I think a good reason why they deployed OpenTripPlanner is that Portland is a very bike friendly area. OpenTripPlanner's support for multi-modal (bike + transit) routing is one thing that even Google Maps doesn't have. This actually just screams [Inclusive Technology Award](http://philippine-transit.hackathome.com/prizes/).
+
+### Setup
+
+Getting OpenTripPlanner up and running involves a bit more downloading than OneBusAway. I'd suggest going through the [5-minute introduction](https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes) if you want to actually work with the Philippine data. You will also need to download the [Philippine data dump](http://download.geofabrik.de/asia/philippines.html) from OSM. You will want the `osm.bz2` one (WARNING: 900MB unzipped).
+
+Once you get the webapp running, you'll notice the map tiles won't load correctly. This is because the default tileset used is from Mapbox which doesn't provide publicly free tilesets anymore. To actually see things on the map, you should click the + on the upper-right of the map and change the base layer to something like Open Street Map or OSM Mapquest. This has been fixed in their latest sources.
+
+### Issues
+
+The next thing you'll notice is that you can't search for a place. You can only just pick points on the map and route between those. I'm still not exactly sure if it's supposed to have it, since the Trimet one has it. But even then adding it by using the Google Maps or MapQuest APIs shouldn't be too difficult.
+
+Another missing thing compared to the Trimet planner is being able to look at the routes akin to OneBusAway. And even then, Trimet's implementation isn't as good for exploring as OneBusAway is. Seeing the schedule or seeing which routes pass through a stop are left to an external site to do.
+
+There have been some weird issues with the routing though. A common occurence is the steps are somewhat disconnected (see image below). The left half shows OpenTripPlanner, it shows that you get off at a "stop" in EDSA and you should magically teleport to Arguilla street and start walking. To be fair, Google Maps (right half) shows that there is a street from the "stop" to Arguilla.
+
+![OpenTripPlanner disconnected route](../galleries/transit/otp1.png)
+
+I can't say this isn't a bug. After all, OpenTripPlanner couldn't have magically known there really was a street there. If it did, it wouldn't just teleport you to the corner. I'm more inclined to think though that this is a result of not having any shape data. As a result, OpenTripPlanner might try to assume the stop could mean places within a certain radius of where it was defined.
+
+Another weird issue that pops up sometimes is where it tells you to ride a jeep past the stop you want and then after a while, get off and ride a jeep back to your stop. A more general issue is that sometimes it won't give you the best route because it thinks you have to loop around to get to where you want to be. I don't really know how common this issue pops up though. It's highly dependent on where you put the marker. If you just move the marker down a little bit, it actually does give the correct route.
+
+![OpenTripPlanner loopy route](../galleries/transit/otp2.png)
+
+Much like the earlier problem, I can't tell if this is a bug or it's a result of the bad data. Once again though, I think the issue is more of bad data. If you look at the plotted UP-Katipunan route, the stops aren't even on the road. This probably makes it more difficult for OpenTripPlanner to actually tell if the stop and road are connected.
+
+![UP Katipunan Route](../galleries/transit/upkatipunan.jpg)
+
+From what they said during the launch, most of the route data was collected by getting a person to ride a jeep with a smartphone. That would explain why the coordinates aren't that exact. Even then, it would have been nice if they at least cleaned up the data by moving the stops to the road. They would have had to go over them to name the stops anyway.
+
+### Conclusion
+
+Overall though, I really like OpenTripPlanner. It handles most of the hard parts of the challenge. It provides a REST API for doing routing with the GTFS + OSM data. There's also a lot of potential for additional open source work. A lot can be done to improve the default webapp. Adding a default location searcher would greatly improve usability. Adding in the route viewing features of OneBusAway would also be nice. Alternatively, you could even write your own client that just interfaces with the API.