Tuesday, December 23, 2014

Milestones achieved

Right on time with the Christmas holidays and the New Year around the corner, I finally finished three major milestones in my data collection - the work which kept me busy the last months and ate away the time I normally used to write postings here. Each of the milestones would be worth a blog posting on its own, but as the final posting of this year I give a short overview of what was completed recently. A big thank you to my co-worker, without his contributions I would be still another two months short of completing these tasks.
  • For each of the local administrative units, the subdistricts which are covered by them completely or partially are now listed in the XML files. The penultimate statistics I published a month ago, when there were still about 1200 of 7700 entities still missing.
  • Now all the administrative villages are in the province XMLs as well. The latest official number of Muban I have is 74956 for 2012, but in the XMLs I have 75202 Muban - the excess 200 are probably Muban which were declared obsolete because of being in town or city municipalities.
  • Last but not least, all of the Royal Gazette announcements defining the boundaries of the subdistricts are now processed and translated in one XML file. This was an important tool to complete the Muban list, both to notice mistakes due to missing Muban in my previous lists, as well as confirming odd Muban names or finding names not found elsewhere. Though not all Tambon had been listed in these announcements, and there were several odd mistakes in the announcements as well, these were and will be a good reference now they are much easier accessible.
One long-running task is almost done as well, collecting the dates of the local elections. Especially since the military junta stopped all local elections, I "only" have to catch up - though in fact most of those missing in my data are those which are not published on any provincial Election Commission website, so it needs much more time for searching than the actual data editing.

But there are still more than enough further tasks I plan to do with the XMLs. Adding the locations of the administrative buildings, this will then help to add geographical data to the Wikipedia/Wikidata entries. And I just recently started to encode the neighboring entities into the XML files as well, something I should write in more details into a separate posting.

I wish all my readers happy holidays and good new year, no longer neglecting this blog like I did the last months is one of my New Years resolutions.

Friday, December 19, 2014

Subdistrict to be reassigned in Uttaradit

In the cabinet meeting last Tuesday, one of the issues discussed was the reassign of the subdistrict Tha Faek (ตำบลท่าแฝก) from Tha Pla district to Nam Pat in Uttaradit province. To quote from the transcript of the cabinet meeting. Hopefully my translation is not totally wrong.
คณะรัฐมนตรีมีมติเห็นชอบร่างพระราชกฤษฎีกาเปลี่ยนเขตอำเภอท่าปลากับอำเภอน้ำปาด จังหวัดอุตรดิตถ์ พ.ศ. …. ที่สำนักงานคณะกรรมการกฤษฎีกาตรวจพิจารณาแล้ว ตามที่กระทรวงมหาดไทย (มท.) เสนอ แล้วให้ดำเนินการต่อไปได้

มท. เสนอว่า เนื่องจากตำบลท่าแฝก รวม 9 หมู่บ้าน ประชากรรวม 4,441 คน 1,355 หลังคาเรือน อยู่ห่างอำเภอท่าปลา 116 กิโลเมตร ทำให้ประชาชนได้รับความเดือนร้อนไม่สะดวกในการเดินทางไปติดต่อราชการและขอรับบริการงานต่าง ๆ แต่หากเปลี่ยนแปลงเขตการปกครองท้องที่โดยนำตำบลท่าแฝกไปขึ้นกับอำเภอน้ำปาด ซึ่งมีระยะทางห่างเพียง 59 กิโลเมตร อันเป็นการแก้ไขปัญหาความเดือดร้อนดังกล่าวให้แก่ประชาชน จะทำให้ประชาชนได้รับความสะดวกในทุก ๆ ด้าน ทั้งนี้ การโอนตำบลท่าแฝก อำเภอท่าปลา ไปขึ้นกับอำเภอน้ำปาด จังหวัดอุตรดิตถ์ ได้ผ่านความเห็นชอบจากราษฎรในตำบล สภาองค์การบริหารส่วนตำบล ที่ประชุมหัวหน้าส่วนราชการประจำอำเภอทั้งสองอำเภอ สภาองค์การบริหารส่วนจังหวัด และที่ประชุมหัวหน้าส่วนประจำจังหวัดแล้ว
The cabinet has approved the draft decree to change the area of Tha Pla and Nam Pat district, Uttaradit. The Office of Juridical Council has already reviewed the proposal. The Ministry of Interior (MOI) then continued to propose this draft decree.

MOI states that Tha Faek subdistrict covers 9 administrative villages and 4441 citizen in 1355 household. It is located 116 kilometer from Tha Pla district [office] which causes the citizen inconvenience. Nam Pat district [office] is only 59 kilometer away, which will make it more convenient for the people in every aspect. The transfer of Tha Faek from Tha Pla to Nam Pat was already approved by the citizen in the subdistrict, the council of the subdistrict administrative organization, a conference with the section chief of the government offices of both districts, the council of the provincial administrative organization and the heads of the provincial government.
I first read about this proposal in July last year, when it was first discussed in the Board to consider draft laws [Meeting Transcript]. To become effective, this draft decree must be published in the Royal Gazette first, I am not sure whether it needs the formal approval by parliament as well - but given that this parliament is filled with people selected by the same junta choosing the cabinet members I don't expect any larger delays and guess it will come into effect early next year.

Looking at the map, the reason for this change becomes obvious - since the creation of the Sirikit dam in 1974 the area of Tha Faek became even more disconnected from the center of Tha Pla district than it already was before, actually it is surprising it took 40 years to adjust the administration to the changed traffic situation.

Wednesday, November 19, 2014

Local government units covering more than one subdistrict

About half a year ago, a discussion on the best outline of the Amphoe articles on the German Wikipedia raised the question how many of the subdistrict administrative organizations (SAO/TAO) don't cover the same area as the corresponding subdistrict. I couldn't answer back then, I only knew that the about 900 subdistrict municipalities created in 1999 usually cover only parts of a subdistrict, so the TAO covers the remaining parts; and I knew that especially in Ayutthaya province, several adjoining subdistricts are merged together to one single TAO. However, I could not give the actual numbers for each category of TAO.

In order to be able to give these numbers, I started to add a new XML tag to my data files, but only did this for a few provinces at first. Luckily, my fellow Wikipedian hdamm came to help and also added these tags to many of the XML files, so right now the central and southern provinces are completely tagged, as well as most of the northern provinces and some of those in the northeast. Though there are still 1285 local government missing, I think it is worth to give a partial answer now - at least to show that this blog isn't dead, I just was too busy with other tasks and thus haven't found the time to writeup good postings here.

Right now, there are 7852 local governments, of which the 76 provincial administrative organization and Bangkok are special cases which are out of this statistics. Those considered are
  • 30 cities (Thesaban Nakhon, เทศบาลนคร)
  • 175 towns (Thesaban Mueang, เทศบาลเมือง)
  • 2235 subdistrict municipalities (Thesaban Tambon, เทศบาลตำบล)
  • 5334 subdistrict administrative organizations (องค์การบริหารส่วนตำบล)
  • 1 special administrative area (i.e. Pattaya)
For 1285 of these 7775 the data isn't entered yet, but those which have a coverage defined fall into the following three categories.
  • 4497 (69%) cover exactly one subdistrict
  • 1509 (23%) cover one subdistrict partially
  • 485 (7%) cover more than one subdistrict at least in part (118 of these are TAO)
  • 125 (2%) cover more than one subdistrict, and all of them completely (71 of these are TAO)
I'll post an update of this statistics once I have it for all of the local governments.

Tuesday, September 9, 2014

Area definition for Nong Khanan subdistrict municipality

After a long time of inactivity due to the political lock of the country, the Royal Gazette contains a new announcement by the Ministry of Interior, by which the area of the subdistrict municipality Nong Khanan (เทศบาลตำบลหนองขนาน) [Wikidata] was modified. The municipality was created in August 2012 by upgrading the TAO Nong Khanan, and though the municipality covers the whole subdistrict Nong Khanan there seem to have been problems with the exact boundaries. In March this year, the boundaries of the subdistrict were revised by a publication in the Royal Gazette, updating the original definition from 1998 [Gazette] for the subdistricts Nong Khanan and Hat Chao Samran. Since none of the subdistrict area definitions contains a map, I only have the map embedded with the current announcement showing the current boundaries of the subdistrict and municipality.

As the municipality boundaries were not well-defined, the Election Commission did not prepare any constituencies for the municipality council yet, so there was no election for either the municipal council or the mayor since 2012 - and as the coup junta stopped all local elections until further notice, there will be an appointed council sometime soon (or maybe there is already and I just did not find anything on the web about it yet), whereas the permanent secretary will continue to be acting mayor as long as the junta sees the country not ready to have any elections.

Friday, July 4, 2014

New ccaatt geocodes

Yesterday DOPA updated their website describing the ccaatt geocodes, those codes on which the Thai standard TIS 1099 as well as ISO 3166:2 are based. Though just published yesterday, the codes are dated from March 19. As there have been no new Amphoe or Tambon, the only real changes were within the RCode table, which gives codes to several of the municipalities.
  1. Ban Klang (เทศบาลตำบลบ้านกลาง), Mueang Pathum Thani district, Pathum Thani getting code 1381.
  2. In Chonburi, the codes 2065 to 2069 were readded - they were removed in the previous list from 2013, but were present in 2012 already.
  3. Nong Wa (เทศบาลตำบลหนองหว้า), Kumphawaphi district, Udon Thani getting the code 4158.
  4. Mueang Bua (เทศบาลตำบลเมืองบัว), Kaset Wisai district, Roi Et readded as 4578. The code was missing in 2013, and in 2012 marked as obsolete.
  5. The same happened for San Pu Loei (5046) and Fa Ham (5059) in Chiang Mai province. Also, the codes 5045 and 5047 to 5049 are re-added, but still marked as obsolete.
  6. Mae Yao (เทศบาลตำบลแม่ยาว), Mueang Chiang Rai, Chiang Rai getting code 5764.
  7. Nai Mueang (เทศบาลตำบลในเมือง), Sawankhalok district, Sukhothai getting code 6484.
All other changes are status upgrades of already existing and numbered municipality, or name changes of such municipalities.

Thursday, July 3, 2014

Local governments and Tambon

On the German Wikipedia, there was recently a little discussion on how to better organized the administration section of the articles on the districts. Following the outline used on the English Wikipedia, first it listed the numbers of Tambon and Muban, then the local governments, and finally a table listing all the Tambon in the district. The Thai Wikipedia separates the two classes of subdivisions, it moves all the information on the local governments into a separate subsection. It seems that I am to blame for the original outline in the English Wikipedia, though I cannot remember exactly I think this was caused by the fact that I didn't know much about the local governments when starting the the districts, and only later started to add the local governments into the text of the administration section. Now the two German Wikipedians doing a lot of the work for articles around Thailand are migrating the articles into the new format, but having to work on nearly 900 articles will obviously take quite some time.

Since the local governments aren't always straight-forward one Tambon one local government - the municipalities existing before the year 2000 usually covered only parts of a Tambon, thus there are TAO which have to share the area of a Tambon with a municipality. On the other hand, there are TAO which have responsibility over more than one adjoining Tambon - especially in 2004 several smaller TAO were merged together, as well as the remaining Tambon Councils were merged into already existing TAO. Which Tambon is covered by which local government can be found in the Thai Wikipedia articles, but that's of course not easy to read for most non-Thai. I was asked whether I can supply a list of the TAO which are not responsible for exactly one Tambon, but sadly I did not have this information at hand.

I have now added some more optional data into my XML, defining a structure in the XSD to allow to add a list of Tambon covered by a local government together with the information whether it is a complete or a partial coverage. Without any special reason - I was just adding the Wikidata links to the Tambon there - I picked Mae Phrik district of Lampang province, where the newly added lines in the XML look like the following.

  <entity type="Amphoe" name="แม่พริก" english="Mae Phrik" geocode="5209"> 
    <entity type="Tambon" name="แม่พริก" english="Mae Phrik" geocode="520901">
      <office type="TAOOffice">
        <areacoverage>
          <entity geocode="520901" coverage="partially" />
          <entity geocode="520902" coverage="completely" />
        </areacoverage>
      </office>
    </entity>
    <entity type="Tambon" name="ผาปัง" english="Pha Pang" geocode="520902" />
    <entity type="Tambon" name="แม่ปุ" english="Mae Pu" geocode="520903" />
    <entity type="Tambon" name="พระบาทวังตวง" english="Phra Bat Wang Tuang" geocode="520904">
       <office type="MunicipalityOffice">
        <areacoverage>
          <entity geocode="520904" coverage="completely" />
        </areacoverage>
      </office> 
    </entity>
  </entity> 
  <entity type="ThesabanTambon" name="แม่ปุ" english="Mae Pu" geocode="5288" parent="5209">
    <office type="MunicipalityOffice">
      <areacoverage>
        <entity geocode="520903" coverage="completely" />
      </areacoverage>
    </office>
  </entity>
  <entity type="ThesabanTambon" name="แม่พริก" english="Mae Phrik" geocode="5287" parent="5209">
    <office type="MunicipalityOffice">
      <areacoverage>
        <entity geocode="520901" coverage="partially" />
      </areacoverage>
    </office>
  </entity>
 
With 7775 local governments (not counting the PAO as for those the area of coverage is obvious), I won't be able to fill this information to all any time soon, so this is yet another data item prepared and filled on demand, and it could be a nice task for any potential contributor to my XML to add this data more systematically. While the XML look quite technical, especially for anyone who has a bit of background in programming it should be very easy to contribute to them. Having the data structure defined, I guess my next step should be to add some code using this data to help Wikipedia editors...

Monday, June 30, 2014

What happened to Mu 9 and 10 of Nong Khanak

When someone created the Wikipedia article on Nong Khanak TAO in Ayutthaya province - however just by copying content from the TAO website and thus the article should be deleted soon as being a copyright violation - I nevertheless created the Wikidata item and checked if I have all data up to date in my XML. At first it just seemed that I had the two administrative villages 9 and 10 missing, maybe area covered by a municipality and thus not included in the Muban list of the TAO.

So I checked with the website which has both the postal codes as well as the most complete list of the Muban (as far as  know), but to my surprise this also lacks Mu 9 and 10 [Source]. This might still be possible if these two Muban are part of a town or city, and thus have been abolished altogether. Next step was to check the Royal Gazette - end of the 1990s the boundaries of every Tambon were defined in  announcements by the Ministry of Interior, and these contain both the description of the boundary as well as the names of the Muban. The 1997 announcement for Tha Ruea district lists 10 Muban for Nong Khanak, thus ends with the two names I was looking for.

However, this isn't the end of the story, because the TAO covers the whole Tambon, so there is no municipality which could have led to the abolishment of these two Muban. The TAO website even includes a map, which clearly shows no trace of these two Muban. Taking a look at the names of these two Muban is also interesting: Mu 9 was named Khok Khram (บ้านโคกคราม), and the postal code list names Mu 11 as Khok Khram with the alternative name of Bo Rae (บ้านบ่อแร่), whereas the TAO website names Mu 11 just Bo Rae. Similar for Mu 9, in 1997 named Nong Muang (บ้านหนองม่วง), the same name is listed for Mu 12 in the postal code list, and the TAO names it Nong Buang (บ้านหนองบ่วง).

It thus looks like as if these two Muban were renamed and received new numbers, something I never seen before - normally Muban don't change their number if they change name, the only occasion when Muban changed numbers were when a Tambon was split and the Muban in the remaining area are changed to be consecutive again.Thus, if anyone can explain me this special case, I'd appreciate it.

In my XML I have encoded this oddity by marking Mu 9 and 10 as obsolete, this way it will not look like these numbers are really missing, but will still calculate the number of Muban as 10.

<entity type="Muban" geocode="14020909" name="บ้านโคกคราม" english="Ban Khok Khram" obsolete="1" />
<entity type="Muban" geocode="14020910" name="บ้านหนองม่วง" english="Ban Nong Muang" obsolete="1" />
<entity type="Muban" geocode="14020911" name="บ้านบ่อแร่" english="Ban Bo Rae" />
<entity type="Muban" geocode="14020912" name="บ้านหนองบ่วง" english="Ban Nong Buang" />

Tuesday, May 13, 2014

Local elections 2014

For the last years I had found Excel sheets or PDF files which listed all the local administrative units which have a term end in the respective year, which helped me a lot to get a complete coverage of the local governments and their elections. Though I knew this year is a rather quiet year with only relative few term ends, I was hoping to find the same list again. However, in yet another redesign of their website, the Election Commission removed the page which collected the links to these files, and I wasn't able to find any new source. With lots of other sources I was however able to fill in all the election dates in 2010, except one I could not find anywhere - the subdistrict municipality Tha Kham (เทศบาลตำบลท่าข้าม) in Phetchabun. The Election Commission only had the confirmation of the 2010 election results which listed all the names of the elected councilors and the mayor, but not the date of the election. Also the source where I get most of the local government election data, a database by the Department of Local Administration, omits the councilors and mayor in this case.

Though I had done several attempts with Google before, this time I finally stumbled on a document database of the Election Commission containing many of announcements - interestingly named "OldDocList" even though it is still actively used, the latest document is dated May 12th, just one day old. I tried my luck to search for the words "local term ends" (ท้องถิ่นที่ครบวาระ), and to my surprise there was one PDF for 2014 together with the old one I already knew, the document I failed to find for months. Sadly a PDF again, and only a scan of a PDF, so no way to convert it into a Excel sheet to be easier processed, but since I only needed one of the dates that is no problem. So finally could add the missing election to be dated October 3rd.

Though the year is already half over, the little statistics from the first page is worth noting. There are 690 local elections scheduled this year, 524 in municipalities, 145 in TAO, 2 PAO chairmen elections, and one the Bangkok council elections someday in October. Last year there were 3596, and 2012 a total of 3116 elections - and I am still working through the backlog from these years to get the XML up to date.

Friday, March 21, 2014

Wikidata lists and categories

Wikipedia Infobox
On his blog "Words and what not", Gerard Meijssen is showing and advocating the many possible uses of Wikidata beyond what most Wikipedia users know so far. By collecting the actual data in a structured way, it allows queries which would be very difficult to do by extracting data from the infoboxes in the Wikipedias, or simply impossible since the data isn't complete on Wikipedia.

If you are familiar with the articles on the administrative units on the English Wikipedia, you might have encountered the corresponding categories, which help to sort together related items. For example, all the districts of Surat Thani province are within the category Amphoe of Surat Thani Province, and this category like (almost) all Wikipedia pages has a corresponding Wikidata item. Following Gerard's idea that categories are almost the same as a list, and thus using the property "is a list of" in this case as well, Resonator as the smart viewer of Wikidata items is then able to create a list of all the items which should belong to the category - in this case not surprisingly the same 19 entries. Well, almost, the English Wikipedia article on Ko Samui and Ko Pha Ngang are mainly on the island and thus not linked to the data item of the district, someone still has to split the two topics into two separate articles - e.g. in German the two topics have two separate articles.

The categories for the districts are on several language editions already, for the other types of entities (Tambon, Thesaban, TAO) the Thai Wikipedia has the best coverage, but still far from a complete category tree. And of course to use the auto-created list the Wikidata item must be set accordingly, something I have done only for a handful of categories so far. For example, the Tambon of Surat Thani right now show 98 entries, I simply haven't added items for all 131 subdistrict yet. When done, it will in fact show 132 entries, because Tambon Kraison dissolved 1986 because most of its area was submerged by Chao Lan lake. Another interesting category are the Thesaban of Nakhon Ratchasima, because an anonymous editor at the Thai Wikipedia adds article on them from time to time, so unless I create the item before you could see the above list slowly growing from its current value of 75.

While the above is done behind the surface by Resonator creating a database query from the property, one can query Wikidata directly as well. The above Tambon of Surat Thani visualized with the query maker is a start, but only allows a subset of the query API. But somehow I wasn't successful to build a working query to show only those Tambon having an Wikipedia article, maybe this is all not yet fully implemented. But of course the basis of all this is to have complete and good data in Wikidata, and I continue to work on that, just recently I could add the first population data with my bot...

Monday, March 10, 2014

Population census data since 1960

While working on adding the census 2010 data into my spreadsheet, I noticed that for many provinces I already had the exact population numbers since 1960, however not for all yet. Some of the PDF files with the census results for each province published after the 2000 census had the population history listed. So I tried the same trick which helped me to find the 2010 results - simply put a few of the numbers into Google together with the Thai province name and see if it has some hits.

What I found were some data pages from a Chulalongkorn university study, which listed data on elderly people from the censuses, including the total population. For example with the page on Surat Thani - one of the provinces where I did not have the exact data before - showed the total population in the 1960 census was 324,784, and grew to 747,049 in 1990. The more recent datapoints were then taken from the registration data. Once I filled all the holes, the sum however did not match with the total number, which took some time to finally spot those provinces where I had entered the number wrongly in past - or where the PDF had a mistake, I did not verify back with that one.

Just one thing did not add up correctly - 1960 and 1960 there were still the two provinces Phra Nakhon and Thonburi, which were merged into the special administrative area Bangkok in the early 1970s. The Chulalongkorn data had separate data for Thonburi and Phra Nakhon, but the numbers don't add to the value listed at the NSO as the regional sum.
YearPhra NakhonThonburiSumNSO
19601,577,003559,3762,136,3792,136,435
19702,157,303920,0333,077,3363,077,361
It is just a difference of 56 and 25 respectively, so the numbers are really close. Sadly, this final step I wasn't able to find on the net, so I have to wait until I can visit the National Library in Bangkok to check out the corresponding issues of the NSO publication - I only have the 1960 Chiang Mai issue depicted above. If anyone has access to these publication and can find it for me it'd be nice. But since Thonburi had no TIS1099 geocode, I cannot get this into my XML style anyway.

For the older censuses I wasn't able to find the data for each province - while Statoids has numbers listed, the sum 17,256,840 given there is not the same as found in the NSO table, according to that the total population in the 1947 census was 17,442,689.

Thursday, March 6, 2014

Population data 2013

Though I try to check the caption of each Royal Gazette publication, somehow the announcement listing the population for each province as of December 31st 2013 nearly slipped through. Luckily I spotted it being added as a reference to the population data of the province articles on Thai Wikipedia, just one day after it was published in the Royal Gazette.

As of this announcement, the registered population grew from 64,456,695 one year ago to 64,785,909, and increase of 329,214 or 0.5%. Ranong has the biggest population decrease with 4.5%, the biggest gain with 2.3% was Phuket. As the publication is in Thai with only Thai numerals, I have made the data into a little spreadsheet embedded below, including the 2012 data for comparison. In case anyone prefers it in XML, its within my Tambon project now as well.

While writing this posting, this population data is not yet available on the DOPA website, but I expect it to show up soon at stat.bora.dopa.go.th. The full population data down to subdistrict level and including the municipalities will also show up soon I guess.

In January the new datatype number was added to Wikidata, and I have already added some population data points to a few entities manually to try it out, of course most notably for my favourite province Surat Thani. And since I am also currently working on transferring the census data into my XML structure, I now really have to start to program the automatic editing of this kind of data in the TambonBot.

Wednesday, March 5, 2014

Phimon Rat town created

Yesterday, the upgrade of the TAO Phimon Rat (องค์การบริหารส่วนตำบลพิมลราช) to a town municipality (เทศบาลเมืองพิมลราช) was announced in the Royal Gazette. As the upgrade was effective February 22, this announcement came rather fast compared to other municipal upgrades - many of them still not published though many years effective already. Today, the constituencies were announced as well, so the election for the municipal council and the mayor won't take long.

What is the most interesting part of this new municipality is however its boundary, as one can see on the last page of announcement. The municipality was originally a TAO which covered the area of the Tambon not covered by any other municipalities, and in this case the Tambon Phimon Rat was already covered by parts of the town Bang Bua Thong. And not just parts of the Tambon were cut away, in fact the remaining area consists of two chunks without any connection, approximately one third east of bang Bua Thong and two third west of it.
Also interesting is the population development of the Tambon and the TAO, I have taken the registration data from DOPA into a little sheet to visualize how much the population did grow from 1993 (6946 in whole Tambon) to 2012 (39620 in TAO). Quite a clear indication of how much the suburbs of Bangkok grow.

Thursday, February 27, 2014

New Muban in Galyani Vadhana district, Chiang Mai

Today the Royal Gazette published the announcement of the creation of a new administrative village in Mae Daet subdistrict, Galyani Vadhana district, Chiang Mai, increasing the number of Muban in the subdistrict to eight and for the whole district to 22. The announcement became effective on January 14, and was signed on the same day by the deputy governor (ปลัดจังหวัด) Chokdi Omrawat (โชคดี อมรวัฒน์) as the acting province governor. It was previously approved by the Ministry of Interior in its ministerial order ๐๓๑๐.๑/๑๕๔๔๐ dated December 24.

The new villages has been split off from village number 7 named Ban Tala Mong (บ้านแม่ตะละม้ง), and received the name Ban Tala Mang Mai (บ้านแม่ตะละม้งใหม่) - meaning simply "new Tala Hmong village". From the description of the boundaries listed in the announcement, the division between the two administrative villages goes right through the actual main settlement itself, with the new village covering the southern part of the settlement and what is left of village 7 the northern parts. Since the village is located within forests, most parts of the two administrative villages are uninhabited land.

Friday, February 21, 2014

ISO 3166-2 code for Bueng Kan

When the province of Bueng Kan was created in 2011, it quite quickly got the code 38 assigned by the Department of Provincial Administration - which was the obvious choice anyway as there was no other free number in the number range for the northeastern provinces. While there was no official new version of the TIS1099 national standard - the latest is still from 2005 - this list maintained by DOPA is in fact the current working copy of the national standard. The ISO 3166-2 standard, giving codes for the first-level subdivisions of all countries, uses the same codes prefixed with a TH-, but none of the updates since 2011 covered Thailand so far.

Today, ISO announced that they have changed the system of updating these codes named "Online Browsing Platform", instead of the newsletters it now has live updates on their website, to which one can subscribe - for free but one has to register. But actually thanks to the update scanner plugin in Firefox I will get notified whenever the page on Thailand will be updated, without having to register with ISO.

Anyhow, though none of the newsletters announced the code for Bueng Kan yet, with the change to the new platform the code for Bueng Kan is now also included, and without any surprise it is TH-38.

Thursday, January 30, 2014

Old municipal upgrades announced

On Monday, a set of 25 announcements were published in the Royal Gazette, 24 of them giving the official confirmation of the upgrade of subdistrict administrative organizations to subdistrict municipalities, and one [Gazette] was about the upgrade of Ko Samui municipality to the highest municipal state (Thesaban Nakhon, เทศบาลนคร). The interesting part - all of these upgrades already happened in 2011 and 2012, so it took one to two years to make them into announcements in the Royal Gazette. The announcements itself were all signed before the date they became effective, so the first page of each of the PDF files cannot be the reason why the publication took so long. But since they all include the description of the municipal borders as well as a map, it must the preparation of this appendix which delayed the announcement - and which made several 100 further still announcements still pending to be published. In case you want to have details on all those announcements, best look at the XML file - I guess listing them all here would be too much detail.

As an example I have added the map from the upgrade of Ban Krang TAO (เทศบาลตำบลบ้านกร่าง), Si Prachan district in Suphanburi, because in this case the boundaries are more interesting than for most of the other ones which covers a complete Tambon. The subdistrict municipality Si Prachan (เทศบาลตำบลศรีประจันต์) covers the small town around the district office, and though the district office is located on the other side of the Tha Chin river in Si Prachan subdistrict, most of the municipality is located within Ban Krang subdistrict. Thus Ban Krang municipality only covers the remaining parts of the subdistrict, and to make it even more confusing, the municipality has two parts not connected with each other. In some cases, the boundaries between TAO and municipality were changed to avoid splitting the area in two disconnected parts, but I have no idea if the small part south of Si Prachan municipality will be transferred to it someday. The main information I can find with these maps is the location of the municipal office, and since this area already had been visited by the Streetview car I can embed the view of the office building below. As the car passed there in August 2012, the same month the upgrade became effective, the big sign still shows Ban Krang TAO - by now it must have been updated. By the way: Wikidata has an item on Ban Krang municipality already, and I have filled it with a lot of statements already.
View Larger Map

Wednesday, January 22, 2014

TambonBot on Wikidata

It took quite some time, but some days ago my automatic Wikidata editing bot has been approved, and it already did 12,000 edits on the 2428 administrative entities which have a corresponding Wikidata item. So far I have done only the trivial things which don't necessarily includes the addition of sub-statement to statements or sources. The activities done so far were
  • Normalize the item names not to include the type, e.g. Bueng Kan Province became Bueng Kan, both for English and for German.
  • For Thai however, the name always includes the type, thus Bueng Kan Province is labeled จังหวัดบึงกาฬ.
  • Give a description with the full hierarchy to be avoid any potential ambiguities, e.g. "district in Bueng Kan province, Thailand". For German I haven't implemented it yet as the Grammar makes it a little bit more complicate, for English and Thai it was simple string concatenation.
  • Every item now has the link to the country Thailand
  • Every item now is linked to the one in which it is located, except for the TAO and Thesaban - I am not sure if I should link the province, the district or every (partially) covered Tambon.
  • The type of the entity is also linked, for some reasons twice, once as "instance of" and once as "type of administrative unit".
  • Those entities which have a corresponding boundary item on OpenStreetMap are now linked as well.
As both the parent unit as well as the type could have changed in past, adding the historical values with the corresponding start and end dates is still an open task to be programmed.

A property to hold the geocode of the entity has been created by now as well - when I saw that it received the property id 1067 I realized I should have waited a bit longer to catch the number 1099 - as this code is related with the TIS 1099 standard. The code to add these identifiers is nearly finished, still need some polishing to add the references to the corresponding source of the code - TIS 1099:2535, TIS 1099:2548 or the full code list from DOPA. While waiting for this property to be created, I finally wrote down an article on Wikipedia about this Thai standard - copyreading or translation is welcome...

Also almost completed is the code to fill the list of subdivisions, in this case clearly leaving out the TAO and municipalities, as these are no real subordinate of any of the central administrative units. There are several other edits which are easiest done by a bot, I am collecting my ideas on the bot userpage. The item on Bueng Kan is kind of my test item, having the biggest number of statements of all the Thai subdivisions now, and already takes quite long to load in a Webbrowser.

I still learn more about what Wikidata can do - like discovering more properties which can be applied to the administrative unit I work with, as well as discovering of what it will be able to do in future once developing progresses - e.g. the data value for the population number is not yet available. But I also had my first negative experience there: As Phuket is the province with the smallest number of subdivisions, I added all those items which have no Wikipedia article yet as more-or-less blank items to be filled by my bot later (except the PAO, those are a really special thing). As the idea behind Wikidata is to be more than just a repository of data for Wikipedia articles, these items were perfectly fine to be added. But since there was no Wikipedia link as well as no link from any other item, one admin thought them to be unused orphans and deleted them, without notifying me or asking whether these were correct or not. So I had to do the same work twice, the only positive thing was that now all of these items contain the list of neighboring items, to make sure none looks like an unused orphan anymore.