Category: Tools

Update on my work this summer: Chicago Bike Guide now on Android

Yesterday I released the first version of my app for the Android operating system. The Chicago Bike Guide (born the Chicago Offline Bike Map) had been available for iOS since April 2012 and the most frequent question I heard was, “When will you have an Android version?” At first I was probably joking when I said it was coming soon as I had no interest in it. But things change: more people kept asking, I was slowly learning how to publish an app for Android, I bought a tablet myself on which to test it, and Android eclipsing iOS as the most dominant mobile OS had some effect.

I use PhoneGap software to compile the Chicago Bike Guide for iOS. My app is actually an HTML5 compliant website using jQueryMobile and PhoneGap allows this website to interact with some of the hardware on the iPhone (like the GPS components) and software (native notification buttons). PhoneGap compiles for Android and other operating systems, but my experience using the Android emulator put a damper on my progress.

I would install Google’s software development kit (SDK), including Eclipse, and load the app (er, website) into the emulator and it would be terribly slow. It didn’t emulate the Android experience very well. I did this twice; I don’t remember making any additional progress the second time but I probably made different progress, slightly expanding my understanding of how to make Android apps.

PhoneGap 3.0.0 came around, and its use requires focusing on the command line to build apps. In prior versions, for iOS, you would add “helper software” to Xcode but now it creates the Xcode project for you. It was easier to use this time around, as the process in this version was simpler to understand, use, and the documentation had improved. I felt it was time to try again to make an Android version so I “made the plunge” and bought the Asus MeMO Pad HD 7″ tablet from my local Micro Center.

At first I used the tablet to test my app (website) as a website, loading it over the network from my Mac’s web server. After fixing a lot of the display bugs I moved into native app testing. One command, “cordova build android”, and an APK I can email to my tablet appears 30 seconds later. This is one of the few areas where Android has iOS beat in terms of testing.

The iOS development environment requires so much setting up with developer profiles, team profiles, and other gunk I forget the names of. With Android, you simply email the ChicagoBikeGuide-debug.apk file to your device and open it in the Gmail app. Voilá.

After getting this far I stopped progress on developing for Android as I wanted to issue a new version for iOS with features and bug fixes I’d been working on since the last release in July (version 0.8.2). With that out of the way last week, and the new version waiting for Apple’s review, I worked on the Android version on Sunday and finished it today.

Did you catch that? I uploaded version 0.8.3 for iOS on October 3 and it’s been in review since then while in less than 24 hours I set up my Google Play Developer Console ($25 per year), merchant account, store listing, and started selling the Android version.

N.B. Google Play doesn’t allow you to switch the app between free and not free like the iTunes App Store does, so I cannot release it for free during a short promotional period like I did for the iOS platform.

After a sufficient period (a few days, perhaps) of no reports of it crashing, I will promote the Android version heavily.

New iOS app offers most advanced Divvy route directions

Chicago Bike Route for iOS

Walking directions from my house to the Divvy station at the CTA California Blue Line station, and then from there to the Divvy station at LaSalle/Illinois Streets. Lastly, there’s walking directions to some arbitrary N LaSalle Street address.

Adam Gluck and Andrew Beinstein showed up at OpenGov Hack Night on July 16, 2013, to show off the technical concept of their forthcoming app for iOS devices. I looped them into the Divvy app-making progress I and others were undertaking (documented on a shared Google Doc).

They said they would make their app was going quite different from all of the eight apps for using Divvy that have since launched before theirs: it would offer directions for walking to the nearest Divvy station with available bikes, directions to the Divvy station nearest their destination with open docks, and then walking directions from that end station to their destination.

Chicago Bike Route launched Friday last week. Currently only three of the eight iOS apps released before Chicago Bike Route have routing. CBR takes directions to a new level by giving you directions from where you are to where you want to go, and not necessarily from a specific Divvy station (like my Chicago Bike Guide does). Instead, CBR gives you complete directions between origin and destination and smartly picks the nearest Divvy station with available bikes. Now, I believe most often this will just be the nearest Divvy station, period, as it’s relatively rare for a station to lack bicycles.

The app uses Google Directions and for every trip makes a maximum of three calls to their API; counts against the app’s free quota from Google. The first call gets walking directions from the origin to the nearest Divvy station with available bikes, and the second call gets bicycling directions to the Divvy station with available docks nearest the destination, and the third call (assuming the destination isn’t that Divvy station) gets walking directions from the end Divvy station to your destination. The next step, I believe, is to have the app use a prediction model to accurately choose the end Divvy station. A lot can happen at that Divvy station in the 30 minutes (or whatever) it takes to get there. It may not have open docks when you arrive.

Two other suggestions I have: an improvement to the autocomplete destination function because it didn’t recognize “Chicago city hall” or its address, “121 N LaSalle Street”; and adding a “locate me” button. Additionally I’d like them to add some basic resources to advise users on where they can get more information about Divvy or bicycling in Chicago.

Adam and Andrew are going to publish a “dock surfing” function in the app that will incorporate multiple segments on Divvy to make a trip longer than the free 30 minute period. This would probably mean a fourth call to the Google Directions API. I emailed Adam and Andrew to learn more about the app development.

Video of Beinstein and Gluck presenting their app to Hack Night. Created by Christopher Whitaker for Smart Chicago Collaborative.

Why did you make Chicago Bike Route?

We made the app because we wanted to make something civic related. We thought that Divvy was an exciting new civic program coming into existence, and we kept seeing it all over the place. It also solves a real problem in public transportation that we notice and hear about a lot living in Hyde Park called the “last mile problem.” We also had the data in our hands from having attended civic hack night at 1871 when Divvy came and we thought “let’s make a native Divvy app!” And that’s what we did. We also released a framework for interacting with the Divvy API natively for developers who don’t want to get their hands dirty playing around with the iOS frameworks.

What makes your app stand out from the pack?

I think the routing but also the simplicity of design of the app.  We wanted it to be something you could just open up and use and was like all the other mapping utilities that one has on their phone (Google Maps, Apple Maps). And that’s what we did. You open it, enter an address, and you get routed to that address. Something that people could use to get up and running with Divvy with basically no familiarity with the system.

What features are you planning for the future?

Bike surfing! Seriously though. We think that it would be a really useful feature for some people, and also help reduce the cost of using the bikes. It would be useful for the regular riders where the $2 additional charge could really add up but also if you are someone who is not part of the program and are just taking the bike out for a joy ride. It can actually get kind of expensive, since every half hour after the first hour in a half is an additional $8, rather than $4.50 for members. You would also be less familiar with the bike stations under that situation. We also need to integrate with Chicago public transportation. But, we also want to keep with the simplicity, and create a user experience with basically no learning curve, and we are a little cautious to throw something in that could complicate things.

Results of my personal #editathon this weekend

I added a lot of parking lots to OpenStreetMap this weekend, but I also added the Willow Creek Community Church (South Barrington, Illinois) parking lots, driveways, buildings, and retention ponds. I’ll let my before and after screenshots show you what I did. Ian Dees, local organizer for Chicagoland OSM data – he has other roles, too – said there’s an application that can generate these images automatically.

View in OpenStreetMap now.

I’m also writing a draft tutorial on how to convert GIS data stored as a shapefile to a format you can import into AutoCAD. GRASS will take a .shp and convert it to .dxf (a geo-aware CAD file).

OpenStreetMap editing and two Chicago events in April

A mapping party! Photo by MapBox. 

I use OpenStreetMap (OSM) heavily since I learned how to edit the map. OSM is the Wikipedia of worldwide mapping: it allows anyone to edit and contribute and allows anyone to copy and extract the data.

I edit places that lack information, fix mistakes (like how roads are drawn, or typos), and add new places. This work is important to my app because what is shown on OpenStreetMap is what appears in my iOS app, the Chicago Bike Map app.

The Chicago Bike Map app map tiles currently look like the above screenshot. Before releasing the next version I will download the latest version of “planet”, which has 100% of buildings now, thanks to Ian Dees

When I locate a place that needs more detail and I want to add it, I open JOSM.app and then, on the OpenStreetMap.org website, I click “Edit>Edit with Remote Control”. JOSM pans over to that spot and downloads all of the OSM data. It works very much like a GIS application and AutoCAD: it has points and polygons that you can move or resize. When you’re done adding features or editing the geometry or metadata of existing ones, click “Upload data”, add a message summarizing the changes you made, and hit the “Upload” button.

Screencast showing how I locate places to which to add detail and then add them with JOSM.

Your changes will be integrated in the OSM database almost immediately. The changes will appear on the live OpenStreetMap.org map tiles in minutes. The “extract services”, which take the data out and send to you as a compressed file or even ESRI shapefile, will read the “planet” file (complete OSM database) soon; some update nightly while others update weekly.

Here are the extract services I use (each one for different reasons):

  • BBBike.org – nightly; allows you to select any area with a self-drawn polygon; exports in ESRI shapefile and other formats; extracts take 15-30 minutes.
  • Michal Migurski’s Metro Extracts – monthly; has ~100 cities pre-extracted; this is now hosted on Smart Chicago Collaborative’s resources alongside my Crash Browser.
  • GEOFABRIK – nightly; all continents, many countries and all fifty states are pre-extracted;

Events!

These are copied straight from the Smart Chicago Collaborative website. I will be at the Map-a-Thon. I’m still thinking about the Hackathon. While I can’t program in the languages required, I can write decent documentation.

OpenStreetMap Map-a-Thon

Beginning mappers are invited to be a part of a national OpenStreetMap Map-a-thon by learning how to use our tools to improve the map in your area. You can add your favorite restaurant or comic book store, a local school or hospital. During the map-a-thon we’ll walk you through the process of finding your area, creating an account, and making your first edit. With that foundation, you can go on to make an impact by adding tons of information relevant to you and your community!

Attend the Map-a-thon April 20th and 21st at 1871 on the 12th floor of the Merchandise Mart, 222 Merchandise Mart Plaza from 12 PM to 6 PM. Participants will enjoy food and drinks thanks to Smart Chicago Collaborative.

For more information about the map-a-thon and to RSVP, please visit the Meetup page for the event.

OpenStreetMap Hack Weekend

If you know your way around a compiler, feel comfortable with JSON and XML, or know the difference between an ellipsoid and a geoid, then the Hack Weekend is for you. We’re looking for those with technical know-how to help make a difference in OpenStreetMap’s core software by writing patches and new software to help make mapping faster and easier. Special thanks to Knight-Mozilla OpenNews for their support and sponsorship.

The hack weekend will be held April 27th and 28th at 1871 from 9 AM to dinner time each day.

For more information about the hack weekend, please visit the OSM wiki page for the event. Two MapBox staffers will be here. MapBox is awesome; they make TileMill which makes my iOS app possible.

BikeSpike has major potential impact for data collection

This is a pretty hilarious video showing the main reason one would get a BikeSpike: to catch a thief. 

Bill Fienup emailed me in December or January asking to meet up to talk about their bike theft tracking device (that does a whole lot of other stuff) but I couldn’t meet until February as the transition from Grid Chicago to Streetsblog Chicago was occupying my brain time. Bill’s part of Team BikeSpike.

The BikeSpike in hand. It’s very small and weighs 3.1 ounces.

It was convenient that they were at 1871 on a Tuesday night; I was there for Hack Night, they for one of the other myriad events that occurs on the 12th floor of the Merchandise Mart. They showed me a 3D-printed mockup of the BikeSpike, and told me what it was capable of doing. They seem to have a good programmer on their team in Josh Billions – yes, that’s his real last name.

I came to their lab near Union Park to talk in depth about BikeSpike with Bill, Josh, Harvey Moon, and Clay Neigher, garner more information, and provide them with some more insight into how the product can be useful to the transportation planning work I do as a Streetsblogger, advocate, and programmer. I brought my friend Brandon Gobel and he became interested to hear about how it could help him manage the future fleet of Bullitt cargo bikes he’s now selling and renting at Ciclo Urbano.

Beside the fact that BikeSpike can show law enforcement workers the EXACT LOCATION OF STOLEN PROPERTY, I like its data collection aspects. Like many apps for iOS (including Moves and Google Latitude), BikeSpike can report its location constantly, creating opportunities for individuals to track training rides and urban planners to see where people ride bikes.

Cities should know where people are riding so they can build infrastructure in those places! Many cities don’t know this until they either count them frequently and in diverse locations, or when they ask. But neither of these methods are as accurate as hundreds, or thousands of people reporting (anonymously) where they ride. I’ve got three examples below.

I imagine the BikeSpike will produce a map like this, which was created by Google Latitude constantly tracking me. 

Team BikeSpike: Clay, Bill, Ben Turner (I didn’t meet him), Josh, and Harvey.

1. Want to see if that new buffered bike lane on South Chicago Avenue actually encourages people to ride there and wasn’t just an extra-space-opportunity? Look at BikeSpike data.

2. The number of people biking on Kinzie Street shot up after a protected bike lane was installed. How many of these new Kinzie riders switched from parallel streets and how many were new to biking? Look at BikeSpike data.

3. Given relatively proximal origins and relatively proximal destinations, will people bike on a buffered bike lane (say Franklin Street or Wabash Avenue) over a protected bike lane (say Dearborn Street)? Look at BikeSpike data.

There are many other things BikeSpike can do with its GPS and accelerometer, including detect if your bike was wiggled or you’ve crashed. I want a BikeSpike but you’ll have to back the project on Kickstarter before I can get one! They need $135,000 more pledged by April 9.