Comparing the response on Twitter to the July 22 and July 28 black rainstorm alerts in Hong Kong

Last week, I did a quick graph of the number of tweets after the black rainstorm alerts. I repeated the procedure for the second black rainstorm alert in a week called by the Hong Kong Observatory. The tweets are grouped in intervals of five minutes and plotted over a course of four hours around when the alert is announced by HKO.

Nb of tweets found on searches for “black rainstorm” (vertical axis maximum is 30 tweets)

July 28nd black rainstorm alert (at 3:35PM)

July 28nd black rainstorm alert (at 3:35PM)

July 22nd black rainstorm alert (at 5:30PM)

July 22nd black rainstorm alert (at 5:30PM)

Of course, the graphs could mean a lot of things… One of my hypotheses (and perhaps most obvious answer) is that the first rainstorm of the season is always more captivating, tweet-worthy, than the second, let alone the third or fourth.

According to the HKO, a black rainstorm alert means: “Very heavy rain has fallen or is expected to fall generally over Hong Kong, exceeding 70 millimetres in an hour, and is likely to continue.”


Yesterday’s black rainstorm alert in Hong Kong on Twitter

Tweets containing “Black rainstorm”

A simple graph showing the number of tweets with search key BLACK RAINSTORM after the black rainstorm alert in Hong Kong (5-minute interval)
At 5-minute interval

A simple graph showing the number of tweets with search key BLACK RAINSTORM after the black rainstorm alert in Hong Kong (2-minute interval)
At 2-minute interval

This is the evolution of the words “black rainstorm” on Twitter, following yesterday’s black rainstorm alert given by the Hong Kong Observatory, something that occurs a handful of times per typhoon season. I got the data from the Twitter Search API, parsed it with a Python script and made a graph using Google Chart API.

It was done in a hurry, but I will try to generalize this method (for future events) when I have the time to do it.


Traffic accidents in Hong Kong in 2009 (a few charts)

This is a project that I am currently working on with Masato Kajimoto, faculty member at the JMSC. A few months ago, we contacted the Hong Kong Transport Department to get some data on road safety in the city.

I originally wanted to get location data on every single accident in Hong Kong, but what we did manage to obtain was all the data for 2009. It is non-personalised data, so all it has was a location, the date-time and the severity (on a scale of 1 to 3).

While TD had the location data for every single accident (fatal or not), it came directly from police reports. Without a standardized way of naming the place of the accident, it has therefore become a nightmare to try and correlate a name of a place with actual coordinates using conventional methods. You have places like Fung Tak Road at the junction of Ying Fung Lane or the slightly better Texaco Road at the junction of Tsuen Wing Street TW New Territories.

(In fact, the location of an accident was often referenced using only with a “chainage” or lamppost identification… Masato asked Highway Department for geo-coded lamppost information and actually obtained it.)

But the easiest visualisations that I am able to make so far have simply been the result of aggregating the data in regular intervals of time, whether to look at the variation per week (more accidents on weeks with public holidays), or at sums per day of the week and time of the day (more accidents later at night, as we approach or are in the weekend).

(Technical note: I wrote a python script that reads my database, and generates links for the Google Chart API.)

Traffic accidents in Hong Kong in 2009 (breakdown per week)

Traffic accidents in Hong Kong in 2009 (breakdown per day)

Traffic accidents in Hong Kong in 2009 (per time of day and day of week)

The last graphic was inspired by this cool project made for visualising the time/day at which tweets are made for any given Twitter account. I found out later that a horizontal scroller could be used to change the date at which the tweets are being observed (and the graphic is regenerated automatically by changing the link of the Google Charts image. Clever!).


China Media Map on Google Fusion Tables

http://tables.googlelabs.com/DataSource?snapid=68215

I just discovered Google Fusion Tables. Ten minutes later, I imported the China Media Map and it produced this map. Info windows can even be customized by the user!