Building an Open311 application

TweetMy311Earlier this year, I had an idea to build a Twitter application that would allow a citizen to start a 311 service request with their city.

At the time, there was no way to build such an application as no municipality had yet adopted a 311 API that would support it (although the District of Columbia did have a 311 API in place, it did not – at the time – support the type of application I envisioned).

That changed recently, when San Francisco announced the deployment of their Open311 API. I quickly requested an API key and began trying to turn my idea into reality.

My idea resulted in an application that I soft launched last week. TweetMy311 is now live and can be used in the City/County of San Francisco to report 311 service requests. The project website has a detailed description of how it works, but its very close to my original idea.

More good news on the Open311 front came recently when it was announced that San Francisco and the District of Columbia had come to agreement on a shared Open311 standard. This means that apps built to work with the San Francisco 311 API will also work with the 311 API in Washington DC. I’m working on enabling TweetMy311 for Washington DC now, and hope to have this service live there in a few weeks.

Ultimately, I hope people use my application, that they like it, and that it makes it easier to report an issue to their municipality. I did, however, have some other motives in developing this application that I think are equally important.

Are you experienced?

Since 311 APIs are rare, and (right now) applications that use 311 APIs are also rare, I think there is value in being able to capture the experience of developing an Open311 application from scratch. This information can provide tremendous value to the governments that deploy 311 APIs (what works, what doesn’t, what can be improved, etc.), and for developers thinking about building an Open311 application.

I hope to use TweetMy311 to provide feedback to governments that deploy 311 APIs (and to those thinking about deploying one) so that they can get a sense of how the experience works from a developer that has used one. At the end of the day the ease of use of an API, the quality of documentation, the ability to test applications in a meaningful way and a number of other factors will determine how many developers decide to take the step and become a “civic coder” by building an Open311 application.

Getting to Open

For me, the use of open source technologies in TweetMy311 was important. This project provided a great opportunities to learn more about a technology that I have become fascinated with of late – CouchDB. TweetMy311 is a NoSQL application that uses CouchDB at its core. It runs on Ubuntu Linux with Apache and was built with the PHP scripting language (I guess that makes it the CLAP stack – CouchDB, Linux, Apache, PHP)

Building with open source technologies was important because I hope to be able to share the code I have developed with interested governments that want to learn how an Open311 application is put together. I also believe it’s important because I think the Open311 initiative can be a great mechanism for encouraging the use of open source technologies.

Leading up to this project, I developed a small PHP library for interacting with the San Francisco Open311 API. I make use of this library in TweetMy311 and any other developer that wants to use it in their project is free to do so. I plan on branching this library soon so that it can work with the new version of the Open311 standard.

Give it a twhirl

So if you live in San Francisco and you want to give TweetMy311 a twhirl, check out the description on the project website. I’d appreciate any feedback – positive or negative – because ultimately I think it will make the project better.

I had a great experience developing TweetMy311, and I learned a lot. I’m looking forward to sharing my experience with interested governments and other developers.

About Mark Headd

Mark Headd is the former Chief Data Officer for the City of Philadelphia, serving as one of the first municipal Chief Data Officers in the United States, and was also Director of Government Relations at Code for America. He currently works with civic technologists and open data advocates as a Developer Evangelist for Accela, Inc. A coder and civic hacking veteran, he has worked as both a hands-on technologist and as a high-level policy advisor. Self taught in programming, he holds a Master’s degree in Public Administration from the Maxwell School of Citizenship and Public Affairs at Syracuse University, and is a former adjunct instructor at the University of Delaware’s Institute for Public Administration teaching a course in electronic government.

5 Responses

  1. Wow – just found out about @fixmystreet.

    This is an eerily similar application in the UK (although there do appear to be some differences in how the application works compared to TweetMy311).

    Would love to connect with the folks that built it and share technical notes.

  2. Dan

    Mark–this is really neat. I work for NYC 311 and manage our web 2.0/ new media initiatives. We’re still a way off from being able to develop an API (and the Open311 is even farther in the distance), but this seems like a really simple way to do our business. Part of our problem is that we’re still using multiple intake systems. Many of the larger infrastructure agencies that were using their own ticketing and asset management systems long before 311 was born are resistant to integrating with our CSMS as a front end. Some of that resistance is legitimate, some isn’t. In any case, I think this model is something we really need to aim for.

    One element of your system that seems a bit rough is having to view a list of hashtags available for reporting problems. Is it possible to create a function that allows the user to tweet a specially hashtagged @reply with keywords to tweetmy311 to return hashtags relevant to the keywords? Sorry if this question is confusing. Here’s an example: the user tweets something like “@tweetmy311 #returntagsfor street defects” and tweetmy311 returns “@user #potholestreet; #potholebikelane; #plateshift”

    Anyway, great job on the tool.

  3. @Dan Sorry for the length of time it took to respond. (I should have been watching for responses more closely.)

    I totally understand what you are asking for, and am considering adding that functionality in the next release.

    Several people have asked for that very feature, and it really shouldn’t be all that hard to implement.

    Actually, one of the most challenging things about the application is having the interact with the Twitter API. As an application platform, Twitter is indeed a strange beast. ;-)

    Stay tuned for enhancements to the service that will be announced in the next few weeks.

    Thanks for the feedback!


This site uses Akismet to reduce spam. Learn how your comment data is processed.