Category Archives: Open Data

Accessing HSR open data

Screenshot 2014-07-30 at 23.39.00


A friend of mine recently asked about how to get at the HSR open data used during the HSR real-time data hackathon. Great question, and I’ve copied the response from Open Hamilton below for whoever else is curious:

You can access the HSR open data here:

You can read about the Realtime GTFS file format here:

The data is in Google’s “protocol buffers” format. You can read about that here:


Also, check out this cool real-time map that shows you where every busy in the city is currently!


Open data hackathon a major step forward

Yesterday Open Hamilton (@OpenHamilton) held a hackathon at the 1280 pub inside McMaster University. The event was attended by about 50 developers, designers, students, makers and others in the local community. The motivation to hold the hackathon was the release of real-time data by the HSR (scheduled to occur on July 31st). Open Hamilton was given access to this data in some form by the city so that attendees could begin to create open data apps to utilize this data.

The organizers did not direct the participants to develop particular types of apps, but instead facilitated access to the data and let the participants decide what to create.




Teams formed around different project ideas and spent the day working on the apps – for example a real-time visualization of average bus late times per line, and an app to receive bus time data via text messages. Talking to the teams it looks like many plan to continue their work after the event to complete these apps, so it looks like we’ll be seeing some apps taking advantage of real-time HSR data available soon! When these apps are released I’ll provide updates as to how to access them.

Interestingly, mayor Bob Bratina spoke at the beginning of the event. Bratina acknowledged that Hamilton was behind regarding open data and gave the attendees encouraging remarks that were well received (at least from the participants I spoke with). Towards the end of the event city manager Chris Murray came by – carrying boxes of donuts! It would be wonderful to see this co-operation with and encouragement of the local open data community continue.




This hackathon felt like a major step forward for open data in Hamilton. There’s been a lot of enthusiasm around open data advocacy for years now, but in the absence of actual open data, it has been very difficult for this enthusiasm to be translated into hackathons that would galvanize developers and apps that would provide value for citizens.

What this hackathon showed was that if you release useful open data like real-time HSR data in an accessible manner (API, etc.), then local developers will absolutely step up to create apps. I saw groups of people at this event that I have never seen at a Hamilton tech event before, many of them students looking to build portfolios, other groups of people were just looking to build something cool. When I asked them why they came out, they said it was because of what they would get to work on.




So again, it goes to show – when useful open data is released, the community will step up to create apps.

Speaking to the organizers, another hackathon is tentatively being planned for November of this year. I suspect it could be much bigger!

Great job on the part of Open Hamilton organizers Anand Sinha (@AnandSHamilton), Joey Coleman (@JoeyColeman) and Matt Grande (@MattGrande), and the sponsors Microsoft Canada. Open Hamilton has been pushing this issue for years (with Joey Coleman leading the charge) and this hackathon felt like a major step forward. I’m sure there’s a lot more steps to be taken. But I remember a few years ago open data in Hamilton seemed stagnant, whereas now the city is releasing key open data, apparently more data will be released in the future, developers are getting to build apps, and even the mayor is acknowledging and encouraging the community. That’s pretty awesome.




HSR Real-Time Data Hackathon Announced!



Calling all designers, programmers, city staff, and other civic-minded problem-solvers looking for a challenge!

Join us on July 26 to hack the HSR real-time data into slick apps.


Hamiltonians will be able to know where their bus is starting on July 31st and Open Hamilton is planning a hackathon to build the apps to make it possible.

Our hackathon is schedule for July 26th and you can register here.


Real-Time HSR Open Data now in Alpha

The Hamilton Street Railway is releasing real-time public transit open data to the public on July 31.

Open Hamilton members Joey Coleman, Matt Grande, and Anand Sinha met with the City Manager’s Office during the past few months to work with City staff and Council to negotiate access.

Anand and Matt lead Open Hamilton’s efforts, presenting to City Council on April 2, 2014.

Their delegation secured clear Council support for open data development, and funding to ensure the release of HSR real-time data.

Councillors Brad Clark and Brian McHattie worked with us to encourage the HSR to release the data, and lead efforts to ensure support from all of City Council for this release.


Limited Developer Access to Alpha Test

Open Hamilton has limited access to real-time open data for development and testing of apps prior to the public launch.

Developers are invited to work with this data to build applications for public release on July 31st.

The only conditions the HSR is attaching to our use of the data is that it be used solely for development (they do not yet have the capacity or stability for public consumption) and developers provide feedback to improve the data.


Development Goals

It is our hope to see apps developed and released for all major mobile platforms in time for the public launch. We also wish to see developers able to build applications for businesses along public transit routes. In other cities, businesses have promoted specials to transit users based upon the amount of time until the next bus.

Imagine, the next time your bus is running 10 minutes late, having the opportunity to grab a quick bite to eat (with a special for transit riders) while staying out of the elements instead of standing outside wondering what’s happened to your bus.


Hackathon Day – July 26, 2014

Open Hamilton will host a hackathon day (Free Food!) on July 26 to create applications and submit them to various app stores for public use.

We’re working to organize the event, and will announce the venue in the coming week. We’re budgetting $5,000 to the event to ensure all participants are well-fed and have prizes available to be won.

Visit our Eventbrite page to register, and help us determine our number as we confirm the event venue.


Why should I join a Hackathon?

This Creative-Commons Licensed Infographic by Code for America will help you decide if you wish to attend:


Poster: Why should I go to a hackathon?

Nationwide open data hackathon announced



In case you missed it Joey Coleman (@JoeyColeman) did a live stream video of Tony Clement’s (@TonyClementCPC) announcement of the Canadian Open Data Experience (CODE) at Mohawk College (@MohawkCollege) earlier this week. See the live stream video and press release about CODE below.



TORONTO, Jan. 9, 2014 /CNW/ - Hosted by the creators of Canada’s largest competitive hackathon, XMG Studio Inc., and supported by the Government of Canada, the Canadian Open Data Experience (CODE) aims to inspire an entire generation of developers and designers to develop apps based on open data. From February 28th to March 2nd creative do-ers, movers and shakers are invited to participate in this race against the clock and liberate the data available on All teams that successfully submit an application compete for Gold Sponsor OpenText’s $25,000 Grand Prize, as well as a $5,000 second place prize and a $1,000 third place prize.

“The potential economic impact of open data once innovators start putting it to use and begin distributing their applications to the public is immense,” said Ray Sharma, President, mobile games developer XMG Studio Inc. “The opportunity for developers is most obvious, but the potential impact on Canadian citizens who stand to benefit from the increased economic productivity is incredibly exciting.”

To encourage the meaningful and productive use of the released datasets CODE will begin with a day of inspirational quick-fire speeches from renowned technology and open data industry leaders at the official CODE VIP HUB in Toronto on February 28th, 2014. The Inspiration Day will be live-streamed on the CODE website and will officially end with the announcement of a theme that participants will need to adhere to in order to guarantee all participants begin on common ground.

“Our Government is excited to see Government Open Data, a previously untapped resource, fueling the development of apps that will help Canadians in their day-to-day lives,” said the Honourable Tony Clement, President of the Treasury Board. “Innovations like the apps created at CODE will ensure Canada remains at the forefront of the global Open Data movement.”

OpenText, Canada’s largest software company, is providing the $40,000 Gold level sponsorship contribution to the event of which $25,000 will go to the winning developer.

“OpenText’s continuing commitment to innovation is in sync with the CODE initiative and we are pleased to support application development for the benefit of Canadians,” said OpenText President and CEO Mark Barrenechea. “We are inspiring application development through our latest software development and hope to impact the opportunity for innovation using government data sets that were previously unavailable.”

CODE is open to all who are interested in developing applications with the goal of bettering the lives of Canadians, regardless of digital prowess. The specially developed matchmaking tool on the CODE website allows anyone to find the team members needed to take an idea from concept to completion. Participants can take part in CODE in two ways: they can apply to attend the centralized VIP HUB in Toronto or they can participate remotely from their homes, schools or their local coffee shop. At the end of the CODE hackathon, participants submit their completed applications online to be evaluated. In Addition to OpenText, IBM will provide Silver Level Sponsorship of $20,000.

CODE will start at 5:00 p.m. (local time) on February 28th, 2014 and continue for 48 hours, ending at 5:00 p.m. on March 2nd, 2014. Following the event, the winning applications will be evaluated on criteria such as the degree of innovation, usefulness to the Canadian public, the level of art and design polish as well as stability and how well open data sets were implemented. The top 15 teams will be invited to pitch their apps during the CODE Grand Finale – a live judging event – to a panel of industry experts and potential investors. The goal is to connect the Canadian entrepreneurs directly to investment firms and venture capitalists to ensure their apps (or ideas) are brought to market. The winning applications may go on to be released commercially either independently by the participants or in co-operation with a third party.

For more information about the event including supported platforms, team registrations and rules and regulations please visit

About XMG Studio:

XMG Studio Inc. is an award-winning developer and publisher of mobile games. Founded in late 2009, XMG has developed a track record for innovation excellence in mobile gaming including the release of critically acclaimed games downloadable on your iOS, Android, and Windows Phone devices. Based in Toronto, XMG is one of the largest indie mobile game studios in Canada. Named as one of the top global mobile games developers to watch by popular media, XMG is focused on providing creative expression through gameplay for all fans of fun.


A day in Hamilton transit

Originally posted on


Over the past couple days, in the evenings, I’ve been working on a small project.

Frequent readers of my blog (ha!) know that I enjoy map making and things of that nature. I decided to do a more local project, this time, using Hamilton’s transit data.

All the routes

The script I’ve created takes a transit schedule (in GTFS format) and either places all the routes on one image, or creates thousands of images and turns them into frames in a video.

Here’s a quick overview of how it works:

  1. Determine “significant” trips (in this case, I’m only looking at weekday trips).
  2. Generate a list of stops with their times and latitudinal / longitudinal co-odrdinates.
  3. Convert the lat/long into x/y.
  4. Plot to an image.

If you want to take a deeper look into the code, here it is on github. If you want to see the image again, feel free to click here. If you’re all about the videos, maybe give this link a click?



Drupal to be adopted for new city website

Editor’s note: I received this e-mail just now about the public consultation the City of Hamilton has done regarding the city website and am re-producing it here. I’m assuming it’s OK to share it publicly since it’s about a public consultation process and the content is relevant to the local development community…


Hello, I’m writing to you as a participant in the City of Hamilton’s public consultation activity that took place on April 29th, facilitated by IBM.  The public consultation was part of a Web Technology Assessment that the City undertook, prior to making significant investments in new web technology. At that meeting there was a commitment that when this phase of the City’s work was completed, that we would share information with you.

I would like to provide you with an update on the results of this assessment, so that you are aware of how your feedback has contributed to the project.  City Staff presented the public consultation feedback to the Web Redevelopment Sub-Committee of Council in May.  IBM submitted a final report with recommendations to the City at the end of June.  City Staff have reviewed those recommendations and made final decisions related to the adoption of web technology for the City’s new website – specifically the web technology (CMS) platform, hosting model and development framework.

The City heard clearly from the participants in the consultation that there is a strong desire to see the City adopt an open source software solution for the City’s new web platform.  Further, there was a strong desire to see the City adopt an open collaboration model, with codebases developed by the City made available back out into the community under an open source license – provided that there are assurances that the City’s network security and citizens’ privacy are fully protected.

We are pleased to share with you that the City has made a decision to adopt the open source platform Drupal 7 for the City’s future website.  Drupal 7 is being used extensively by governments of all levels throughout North America, including the Government of Canada, the Province of Ontario and many municipalities.

In addition, IBM has recommended that the City participate in the Web Experience Toolkit (WET) collaboration, facilitated by the Treasury Board of Canada.  This collaboration is fully open, and includes a Github resource, with open codebases that are validated as usable and accessible, which are important criteria for the City of Hamilton.  The City will be assessing the feasibility of leveraging and contributing to this open source collaboration framework, which is also open to members of the local development community who wish to participate.

Further recommendations were made by IBM to the City and after deliberation, the City has accepted a number of those recommendations.  See the attached Executive Summary detailing the recommendations provided by IBM. Also attached is an Information Update that was provided to members of Council, detailing the process followed during the assessment and decisions made.  The one area you will note in our information update where staff differed with IBM is the hosting model.  Although staff agree with IBM’s rationale for recommending an in-house hosting model, staff have recommended that the production website initially be hosted externally in order to provide a stable platform during the redevelopment, while staff in IT acquire the necessary familiarity and skill with supporting the new environment.

The City is excited by the opportunity to use open source software for its web platform.  In addition, Staff are eager to participate in open collaborations with the local development community as well as with others from around the globe.  We hope that these decisions will also please members of the development community who have asked the City to adopt an open strategy for the website redevelopment.

As the Web Technology Assessment is now complete and Staff have confirmed the general feasibility of the recommended model, the City will be commencing the procurement process this summer and early fall to implement the new platform, hosting and development.  If you wish to be notified of future bid opportunities related to the City’s website, please register through the City’s procurement service, Biddingo.  By registering, you will be notified of all bid opportunities within your chosen categories.  In order to register, visit and follow the instructions.  Registration is free.  Please contact Angela Mastandrea at if you have questions regarding our procurement process.  Please note that we expect initial bid opportunities will commence before the end of August, 2013.

If you have any questions or comments related to the City’s web redevelopment project, or the information above, please do not hesitate to contact me.


Jay Adams

Service Delivery Experience Advisor
City of Hamilton
905-546-2424 ext. 2221


Launching Hamilton’s modified Change By Us

Originally posted on Open Hamilton


Two weeks ago, Hamiltonians gathered at think|haus, our local makerspace, and built an alpha version of Change By Us for our city.

Bringing together developers, designers, city leaders, and citizens, the event was a unique partnership that showed local talent can achieve local solutions.

Since our meet-up, the Open Hamilton team has worked to get the project ready for final polish and launch.

Led by the efforts Alex Wagner and James Arlen, the source code of Change By Us has been modified and launched on the OH server.

Our citizen contributors have created a list of improvements and modifications to Change By Us that will enable our city to better measure feedback and suggestions as we all work to improve civic engagement.

On Thursday, we need to finalize local graphics and start the next phase of the project – Hamilton improvements that can be returned to the source code.

The Change By Us project is now in its third phrase of development and we are in a position to build Hamilton’s reputation as a locale with a strong web development sector that international powerhouses should local in.

Join us Thursday at 7pm at think|haus, 25 Dundurn St North (Hamilton), for our launch hackfest.

Please RSVP on Eventbrite here:

Event participant Dave Heidebrecht blogged about the event, read his take here.


HamOntFire – Visualizing @HFS_Incidents

Originally posted on


Awhile back, I came across the @HFS_Incidents twitter account. It broadcasts all of the calls that Hamilton Fire Services responds to.

Being an Open Data guy, I was pretty happy to see this, but I thought Twitter wasn’t the best format. If I see an event, I might have no idea where it refers to. “0 Block GERTRUDE ST” isn’t helpful unless you already know where Gertrude Street is. I also thought that this might be a good opportunity to get my hands dirty with Google Maps, Web Sockets, the Twitter API, and image generation.

The format of the tweets was pretty easy to parse, so I decided to throw together a few services and map the data out. And with that, HamOntFire was born.

At a high level, here’s what’s happening:

  • SuperWebSocket is constantly polling the Twitter API for new tweets
  • When new tweets are found…
    • I parse the data into an object (mostly to get the address into a Google-appropriate format)
    • I geocode the location using Google’s Geocoding API
    • I store the data in RavenDB
    • The event is pushed to the browser
  • The browser displays the tweets using Google Maps.

This was all fairly easy, with one exception: Both RavenDB and SuperWebSocket are dependent on Json.Net (Newtonsoft’s fantastic Json parser which has become the de facto standard), but each required very different versions (=4.0.8 and & >4.5.4, respectively). After some research, I discovered that this was easy to take care of in .Net, thanks to binding redirects:

<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="" newVersion="" />

This says “For any versions of Newtonsoft.Json between v0.0.0.0 and, just use version”

Once that was taken care of, everything else was a piece of cake.

You can check out the site for yourself here, and check out the code on BitBucket here.

Post Script: I’m also trying to come up with other statistics to display on the Stats page. If you can think of any, please let me know!


Random Hacks of Kindness returns to Hamilton in June


Random Hacks of Kindness (@RandomHacks) is a joint initiative from Google, Microsoft, Yahoo, NASA, and the World Bank aimed at creating a volunteer community of innovators who use their skills to make the world a better place by tackling real world problems. The first event took place in November 2009 at the Hacker Dojo in Mountain View, California, one of the projects that came out of that evening was Tweak the Tweet. Tweak the Tweet repurposed tweets with a syntax that allowed them to be used to connect people in need with service providers during disaster situations, it was notably used during the 2010 Haiti earthquake. Since then the event format has spread to cities all over the world.



Hamilton’s first RHoK event took place in December of 2011 at The Staircase (pictured above), you can read the coverage of the event by The Spectator here. The participants worked on building software that would allow you to send a text with a bus stop number, and receive a text back telling you when your next bus should arrive. I was able to attend the opening of the event and the weekend itself for a few hours. The passion in the room was wonderful, and I noticed in particular that the participants seemed to be learning new skills as they worked on the project together.



Sign up for the June 2nd Random Hacks of Kindness here!


The event organizer is Joey Coleman (@JoeyColeman), project lead of Open Hamilton (@OpenHamilton). With contributions from great local developers like Gavin Schulz (@GSMaverick) the Open Hamilton group has been able to create apps like Skate Hamilton to allow citizens to find out where they can skate using a very friendly user interface. Whether it’s local transit signs or representing Hamilton at the Creative Commons Salon on Open Data (see video below), Joey himself has been a tireless advocate for the usage of open data and open source for social good:



Hamilton is one of the smallest communities to host a Random Hacks of Kindness event. Though we may be a relatively smaller tech community, being able to punch above our weight and conduct a noteworthy event such as this grows and strengthens our community as participants collaboratively share, learn and build. Communities like Ottawa that have contests such as Apps4Ottawa give the development community and their good work a great spotlight. Random Hacks of Kindness lets us show the outside world what we can do here in Hamilton. I encourage anyone in the area interested in building apps and technology for social good to participate in the June 2nd Random Hacks of Kindness.


« Older Entries