When a huge metal hinge landed next to my shoe as I was leaving London's Whitechapel station on Monday, 8 August 2011, I realized how serious the situation was.
I got home, turned on BBC News, lunched twitter and as my jaw was dropping lower and lower in disbelief of what is going on with the city I happened to love, I thought I could do something about all the data that was coming through.
Twitter was exploding. #LondonRiots hashtag was trending globally, it seemed like everyone had an update about what is going on in their neighborhood. At the same time, it was very difficult to get up to date information from live news, because a) news crews couldn't be everyhwere, b) they were simply scared of the chaos that hit London that night.
So, I decided to set-up a map-focused website to show the hot-spots of the riot on the map, for worried Londoners. The map that could be updated by anyone.
liveriots.com is powered by Google Maps API, Twitter API and a bespoke PHP & MySQL back-end. I wanted to keep things simple, so my database has only one table with information about saved markers.
Application heavily relies on JavaScript and Ajax. Data of each point is retrived from database and then PHP object is converted into 'browser-friendly' JSON format so it can be displayed on the map. Ajax request is also used to save the data in MySQL database.
I utilized Google's Geolocation API, so when user enters the name of the street/place script automatically finds approporiate spot on the map. User can then drag&drop his point around to select the closest spot, to pin-point the location of the events he/she witnessed.
And that's it really! It took me about 7 hours to finish everything. It was definitely one of these sleepless nights, but I think it was worth it.
I'm thinking of modifying that website, so it can be easily used when the unfortunate event of riots happens again. Not necessarily in UK, but anywhere in the world people could use it to warn local residents of riots or any other significant disturbance.
I need to think about it, but I know it would not be that difficult to extend current functionality so website has multiple dashboards where visitors can select which event they want to track.
I'll keep you posted!