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...

No comments: