Friday, June 26, 2009

DOLA local administrative entities database

Some months ago I discovered a Excel sheet with numeric codes for the local government units - PAO, TAO and municipalities (thesaban). I did not discover the reason for creating these codes or any uses of them back then.

Now while I was added several weblinks into the XML, mostly for TAO websites, I noticed a strange link on the website of Don Kha (ตำบลดอนคา), pointing to the website of the Department of Local Administration (DOLA). The numeric code in the URL made me curious and I faintly remembered that Excel sheet.

And - it turned out this link pointed directly into a database of the local government units, and the numeric code is used to identify the correct entry. Out of the many items which are stored in the database, those which are most interesting to my needs are on the first page, i.e. the URL of the website, the postal address, the name and end of term of the chairman (or mayor), area and population. The other pages are on infrastructure, economy, temples and schools, public health, disaster prevention, environment and taxation.

Just sad that apparently the webpage is the only way to access the data, getting the data directly in XML form would be perfect to do more processing. I'm tempted to write a parser to convert the HTML into such a XML myself and then being able to leech all the data, but right now I am way to busy with other things.

Now I know that these codes are actually used I have started to add them into my spreadsheet (by the way, for those not able to open the OpenOffice file, there's also a less-frequenty updated Excel version), and will write up more a more detailed analysis of these codes once finished.

No comments: