It’s hard to believe that it’s been over six months since we released Next Stop. During these six months we’ve received a fair share of suggestions and improvements which we have taken into consideration. We’ve heard you, and have just submitted an update to Apple which should appear on the App Store in the next little while.
In this update, we’ve included an exciting new maps feature which should help you find nearby stops! Speaking of maps, I spent a few hours over this weekend experimenting with some interesting data that we’ve gathered from Next Stop.
Since we’ve set up Next Stop to query a server which we’ve set up to hold the data provided to us from Calgary Transit, I recently realized that it has allowed me to peek into some metrics of the app. One of these metrics is the frequency of which bus stops (by their 4 digit code) gets requested the most from the server logs (for upcoming bus and train times). After realizing that this data was available for me to work with, I decided the other week to set up a log which would record this for a week.
From June 6-13, 2011, I set up the server to generate a separate log which contained the four digit stop number and the number of upcoming time requests it received (Note: We do not store any other data which may be tied to you. The only data which is stored on this server is provided by Calgary Transit and nothing else.). Fortunately in the GTFS data set provided to us from Calgary Transit, it also contained other useful data, such as latitude and longitude coordinates for each of those stops.
After some careful scripting and table joining from the database (fueled by lots of coffee) for the 8000+ entries , I was able to successfully map which bus stops were located where and output it into a CSV file. Afterwards, it was just a matter of massaging this data into a format which could be recognized by Google Maps.
After importing the raw coordinates into Google Maps, it was clear there was still more work to be done in order to make a more useful visualization. Above is an image which only shows a flat representation of which bus stops were used and where they were located, but not how often they were searched through our app.
In the past I recalled seeing a heat map overlaid on a Google Map and it seemed like the perfect solution to visualize that last part — the frequency of searches for each stop.
After I managed to generate a heat map with the data, the first result was kind of underwhelming. It turned out that the raw data didn’t generate a very good heat map because despite having multiple location entries for each stop to represent each search, these location coordinates were overlapping each other. I thought to try adding very very small offsets to these overlapping coordinates and see what happens.
A much better result. It’s easier to see from this version the areas of Calgary which got average usage while it looks like stops near the Crowfoot LRT station, the Downtown core and Somerset LRT station get a lot of searches through our app.
For reference, here are the ten most popular stops searched by the app for that week in tabular format:
|Stop Code||Stop Name||Searches|
|8668||WB SHAWVILLE GA@SOMERVALE CO SW||74|
|9879||WB @CROWFOOT LRT TERMINAL||65|
|9878||WB @CROWFOOT LRT TERMINAL||56|
|4001||SB @DALHOUSIE STN||44|
|9880||EB @CROWFOOT LRT TERMINAL||42|
|5833||NB 1 ST@8 AV SW||41|
|9876||EB @CROWFOOT LRT TERMINAL||41|
|6154||WB RANCHLNDS BV@RANCHERO RI NW||36|
|5872||EB MRLBRGH DR@36 ST NE||35|
|4994||EB SHAWVILLE GA@SHAWVILLE LI SE||35|
Below is the heat map visualization which you can interact with. If you would like the raw data used for this experiment, feel free to download it in CSV format.