2014.02.26

open data day

Last Saturday, February 22, was Open Data Day, a collection of independent hackathons organized around the globe. Fortunately for us, John Huang from Code For Tomorrow contacted Chiang Mai Creative City with interest in supporting Open Data Day activities in Chiang Mai, in collaboration with Code For Tommorrow. Though the collaboration didn't come together, his email spurred us into getting ourselves organized. And we had a great time. I'd guess Code For Tommorrow did so as well.

Opendream hosted the activities. Aware provided for snacks and refreshments. Around 20 people came to hack on and/or learn about open data.

Prior to the event we chose two broad areas to work on: air quality data, and OpenStreetMap. Within each area we sketched out a few projects for participants to select from. Below is a summary of what we did.

can you see the mountain

One of the themes we discussed in regard to air quality data was alternative sources of data. The Thai Pollution Control Department is, for the majority of people, the only source of air quality data. It's great to have data available. There are other countries in the region where there is none. However, arguments have been made against the accuracy of the data. It isn't made available in the most useful of ways. And, more varied data sources would be good in any case.

Can you see the mountain is a project to crowd source air quality data. It's a simple mobile web application which asks the user if they can see Doi Suthep. The app logs the user's location, a timestamp, and their response. Then displays information about the current data for that day. As a side effect, it generates a visibility data set for the large mountain on the west side of Chiang Mai.

I'm hopeful that we get enough people to use it to make that data set interesting to work with in conjunction with other indirect air quality metrics. But, I think that the usefulness of the data set is probably secondary to providing a way to raise awareness about air quality issues, and offer people a casual way to engage the subject.

Alas, the app wasn't finished in a day. It's close. I expect a first version should be available by the end of the week.

pollution control department data

The Pollution Control deparment does have quite a bit of data. The data set covers the date range from 1998 to 2014, and can be found in two different locations: http://pcd.go.th (1998 - 2012), and http://aqmthai.com (2012 - 2014). Both sites do have some graphing and reporting tools. Though, there isn't a way to look at the whole range of data. And, an always up-to-date machine readable data set isn't available in a convenient fashion.

I had been working on fixing that over the last while. But, I didn't think I would be able to get the software in any workable order in time for the event. Instead, I manually gathered up all the data on the legacy pcd.go.th site in the week before, for use during open data day.

A couple different angles on the air quality data were explored. Importing and persistence, and visualization using R.

The chart here displays carbon monoxide levels for 17 regional sensors in Thailand. You can see that while there is data for some sensors and some metrics that stretches back to 1998, in this case It only begins at 2004. And in the case of some sensors, not until 2008.

The good news is that this old data set is reflective of the improvements the Pollution Control Department has made over the years. The data available on the new site is hourly, not daily. It includes many more sensors and metrics, and has less incontinuity than previous efforts.

We were better able to make this comparison because we also made some progress on finishing an api that will provide up to date data from both sources, in machine readable format. That remains a slightly longer term project. Perhaps it'll be usable in another month or so of intermittent evening/weekend hacking.

thai national parks

The Royal Gazette contains hand drawn maps of Thai National Parks. Most of the day was spent investigating ways to use that data in OpenStreetMap. There were some technical hurdles involved in transforming handwritten maps in a pdf into map data. Those were overcome without too much difficutly. But, uncertainty about the legal status of the resulting map data kept the task from completion. With any luck that might be resolved at a later date.

We didn't manage to complete anything during the hackathon. But, substantial progress was made, everyone learned a lot in the process, and it was great fun. I look forward to doing it again.

Thanks to the fine bunch of folks who came together to work on this stuff. Simon, Blair, Nat, Alvin, Keng, Arthit, Johnny, Simon, Bob, Lillian, Jan, Pruet, Tim, Russ, Tom, Dave, Mishari, Seen, Pharsit, Parinya, Sonchai, Stephan, peter and the others I've likely missed.