Showing posts with label Geocode. Show all posts
Showing posts with label Geocode. Show all posts

Friday, December 4, 2020

GADM subdivisions geocodes

A month ago I noticed that a new external identifier was added to some of the Thai provinces, taken from the GADM subdivision maps. From the rudimentary info on the GADM website - which even does not explain what the acronym is supposed to mean - this seems to be a project to provide maps for the country subdivisions up to the 2nd level. For Thailand it even goes down to the 3rd level, the subdistricts (Tambon). Additionally to the maps, it also defines a unique code for each subdivision. At first look an interesting project.

However - the website does not state any author of these maps, nor gives any sources. And they are only free to be used for non-commercial use, so not really free. But it got even worse.

In order to avoid wrong codes assignments in Wikidata, I had a look into the subdivision codes for Thailand - adding them to my XML files so I can easily add them by bot later. Starting to look at the alphabetically first province Amnat Charoen I noticed a big mess.

  • Chanuman district: all four subdistrict which are listed in GADM are in fact subdistricts of Hua Taphan district, none of the real five subdistricts has any code
  • Hua Taphan district: all Tambon correct in GADM
  • Lue Amnat district: all five subdistrict listed in GADM are in fact from Mueang Amnat Charoen district, none of the real seven subdistricts has any code
  • Mueang Amnat Charoen: only 11 of the 19 subdistricts have a code
  • Pathum Ratchawong district: 1 subdistrict correct, 4 non-existing subdistricts in GADM, and 6 real subdistrict missing
  • Phana district: 2 subdistrict correct, other two merged into one code
  • Senangkanikhom: all Tambon correct in GADM
Not mentioned in the above - the romanization in GADM does not follow the recommended RTGS transcriptions. Sometimes it the outdated old RTGS like Muang instead of Mueang, sometimes it totally random. All this would have made me ignore these geocodes as they look totally unusable, but in order to avoid wrong data inserted in Wikidata I picked up the task and worked though all provinces and added them into my XMLs. In fact Amnat Charoen was one of the worst provinces, in many other it was just codes missing. Most often the codes for subdistricts created after around 1990, but other recent one are present, so its not just very outdated data. Another hint which indicates outdated data - the minor districts (King Amphoe), which were all upgraded in 2007, are still present as minor districts in GADM. On the other hand, the newly created province Bueng Kan is present.

In total, out of the 7256 Tambon, 1772 are missing in GADM. Since there are a total of 5927 subdistrict codes in GADM, this means 443 entries are total bogus like the one in Amnat Charoen,  or dummy entries indicating a district has no subdistrict codes, or a incomplete list. Only nine of the 77 provinces had no problem.

One month later I completed them in my XML, and can now start the bot to add all these codes to Wikidata, and probably forget about these codes. My attempt to contact the GADM team wasn't answered yet, and new version announced on the website of April 2020 did not show up yet. And if the maps are the same quality as the codes, I can only assume they are sadly totally unusable.

Tuesday, May 19, 2020

ccaatt geocode list updated

About two years since the last update, the geocode lists at stat.dopa.go.th have been changed again. Both the central administrative list as well as the registration codes have been modified.

The changes to the ccaatt list are the biggest, however this is only because the new list only contains the subdistricts now - provinces, districts and all of the subdivisions of Bangkok have been removed. Apart from these, there is only one real change - the subdistrict Wat Sai in Nakhon Sawan is now spelled วัดไทรย์ instead of วัดไทร. It seems like that old spelling was in fact a mistake in the ccaatt table never spotted till now, as already in 1998 there was a Royal Gazette announcement which uses the name with the silent letter at end, and even the 1970 census codebook has it that way. In the 1937 census however, it was spelled with it. I haven't found any Royal Gazette announcement officially changing the spelling, so it's just a guess that the spelling has changed long time ago.

The registration codes have a few new municipalities with a code.
  • 1379 for Lat Sawai town (เทศบาลเมืองลาดสวาย), Pathum Thani province
  • 2059 for Prok Fa town (เทศบาลเมืองปรกฟ้า), Chonburi province
  • 3464 for Kham Nam Saep subdistrict municipality (เทศบาลตำบลคำน้ำแซบ), Ubon Ratchathani province
  • 3463 for Kut Chomphu subdistrict municipality (เทศบาลตำบลกุดชมภู), Ubon Ratchathani province
  • 7265 for Pak Nam subdistrict municipality (เทศบาลตำบลปากน้ำ), Suphanburi province

Friday, September 7, 2018

ccaatt geocode list updated

The Department of Provincial Administration has uploaded a new version of their ID lists, dated from August 30. Comparing them with the previous version from December last year only shows two differences
As no new administrative units were created, its not surprising there were almost no changes. And apparently those new districts in planning did not receive a code yet - unlike in past when many of planned minor districts already had IDs but then weren't created.

Wednesday, January 3, 2018

New geocodes

When I yesterday mentioned the geocodes missing in the October update of the ccaatt spreadsheet, I forgot to check whether there is a new version of these spreadsheet online already. Sadly there is now no text-only website anymore which indicates the last update of the tables, so I cannot rely on the web-browser app to automatically check for a new version, but have to download the Excel sheets and check them each time.

It turns out that on December 21st, both the ccaatt and the rcode files were updated, adding the missing geocodes for the new subdistricts of Bangkok and assigning a code to one further municipality.

Thursday, October 19, 2017

New ccaatt geocodes

Not only did the DOPA statistics page get a facelift - including a double spelling mistake "Official Statstics Registration Sytstems" - but also the geocode lists were updated a second time this year. Now the new subdistrict of Bangkok are included - funnily all the codes I added temporarily into my XML were actually the final ones - and also some further municipalities now have a code. Unlike the previous update, the codes deleted in the ccaatt table were all added again.

Central administrative codes

From ccaatt Excel sheet
Oddly, the two new subdistricts of Saphan Sung were forgotten. There are also no codes prepared for planned new districts in Yala yet.
the

Local administrative codes

From rcode Excel sheet
My usual comment to these municipal codes - the current coding scheme cannot cover all the municipalities, internally in my software I already use the one I proposed some years ago, and it works fine.

Friday, August 25, 2017

ccaatt lists of 2017

Earlier this month, DOPA uploaded a new version of their geocode lists, this time changing the format to XLS files. Whereas the rcode file (containing codes for the municipalities) shows no changes compared to the list from last year, there is only one changes in the ccaatt list - it now only contains the Tambon, all the provinces, districts as well as the subdistricts in Bangkok were removed. I have no idea ifr this was intentionally, or a mistake when changing to the XLS format. When comparing it my list of tambon, only two spelling variants show up:
  • Ba Rue Si (บุฤๅษี) wrongly spelled บุฤาษี
  • Su-ngai Kolok (สุไหงโกลก) spelled with hyphen as สุไหงโก-ลก
and I noticed I myself had two misspellings in my spreadsheet, copied from some old erroneous lists and long corrected in the XML version.

Thus the only thing interesting at these new files is what they don't contain - no numbers yet for the two districts in planning in Yala province. As I haven't found anything official about them for quite some time, it seems it still needs quite some time till those get created.

Monday, December 5, 2016

New ccaatt geocodes

Somehow I haven't noticed that on November 2 the geocode lists from the Department of Provincial Administration were updated. There were no changes in the codes for the central administrative units - not even preliminary codes for the two districts planned in Yala - and only very few new codes for the local administrative units. Thus still most of the municipalities have no code assigned, which would anyway be impossible in the current numbering schema. The new codes are as follows:
And finally, the name change of Phrom Buri subdistrict municipality (เทศบาลตำบลพรหมบุรี) - till September 2015 named Pak Bang (เทศบาลตำบลปากบาง) - is the only remaining difference in these lists.

Thursday, August 6, 2015

New ccaatt list

Last month, the Department of Provincial Administration issued a new version of the geocodes based on the TIS 1099 standard - or actually other way round, the list on which the TIS 1099 standard was based. This time they changed to publish Excel sheets instead of plain text files, making it a bit easier for normal users to use these lists, but for me to look for the changes it adds a little extra work to convert to the old format. Sadly, the meta data or version history of the Excel files don't show any internal information on the way these lists are compiled...

As there was just one administrative change for the central administrative units - the reassign of Tha Faek subdistrict in Uttaradit province - there is just one new code in the ccaatt list and the new code is no surprise.
Sadly, the planned new districts in Yala did not receive a code yet with this update, so if they become official before another update of this list I have a 50% chance of guessing the right codes to use in my XML file for Yala - in fact I have already made my guess as I prepared the two entries, so if anyone from DOPA is reading - please choose 9509 for Lam Mai and 9510 for Kota Baru.

A few more changes are in the rcode list which contains all the registration offices and thus both district and municipalities. While the districts are of course the same as in the ccaatt list, this time nine municipalities received a new four digit code.
There are still a lot of municipalities which did not receive a four digit code yet - and it is simply impossible that all can receive such a code as there are provinces which have more districts and municipalities than fit into the 99 possible codes. Thus to assign a unique code to every municipality the code scheme has to be changed.

The code 1681 was in past ccaatt lists used with the name "อ.บ้านเช่า จ.ลพบุรี" (Ban Chao district, Lopburi province), but marked as obsolete. It is both a strange code for a district, as well I am not aware of any district with that name ever planned in Lopburi. Interestingly, the district Ban Mi was named Ban Sao (บ้านเซ่า) from 1917 till 1939, so it might even be a misspelled obsolete geocode entry. But now it has been overwritten by Kok Ko.

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.

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.

Monday, May 27, 2013

New Thesaban geocodes

Last month, the CCAATT table with the geocodes of the central administrative units, and the RCODE table of geocodes for the registration offices were updated. While there were no changes in the CCAATT table - except that obsolete codes were once again removed from the file - a few municipalities were added to the RCODE table. But since it is impossible to assign a TIS:1099 compatible code to every municipality as long as the municipality codes are at the same level as the district codes, these newly added codes don't reduce the number of municipalities without code significantly. The only other changes in the table to its previous version from March 2012 were several municipal status changes and a few name changes. Interestingly, in Roi Et the strange codes 4568 and 4567 referring to no valid municipality were not re-used, though there were removed from the list in this update. Also, as can be seen be the dates when the municipalities were created, sometimes a municipality created more recently got a code while other upgraded before still have received no code.

Monday, April 16, 2012

New ccaa file

On March 9, the Department of Provincial Administration updated their ccaa lists of geocodes, the most current version of the TIS1099 standard last updated in 2005. There are however only very few changes to the last version - in the ccaa list with the districts and subdistricts, only four subdistricts had their name change.
  • Thung Pi subdistrict, Chiang Mai (50220200) changed spelling from ทุ่งปี้ to ทุ่งปี๊ [Announcement].
  • Kham Rian (ขามเรียน), Maha Sarakham (44110600) renamed to Sang Saeng (ขามเรียน) [Announcement].
  • Nong Kheng (หนองเข็ง), Bueng Kan (38010300) renamed to Non Sawang (โนนสว่าง) [Announcement].
  • Huai Khayung, Ubon Ratchathani (34152400) changed spelling from ห้วยขะยูง to ห้วยขะยุง. It seems this was a long time error in the DOPA data, as the municipality was already spelled with the short u, and also in all Royal Gazette documents the subdistrict was spelled with short u. I already stumbled on the same issue while processing the 2011 population data.
The RCode list, which contains the codes for registration offices, and therefore most notably the codes for the municipalities, has some more changes, however most (eight) are simply municipal upgrades. The other changes in the list are the following.
  • Bang Len (เทศบาลตำบลบ้านเลน), Ayutthaya province (1486) renamed to Bang Pa In (เทศบาลตำบลบางปะอิน) [Announcement].
  • Na Wa Yai (เทศบาลตำบลนาหว้าใหญ่), Amnat Charoen province (3798) renamed to Pathum Ratchawongsa (เทศบาลตําบลปทุมราชวงศา) [Announcement].
  • Nong Kheng (เทศบาลตําบลหนองเข็ง), Bueng Kan province (3888) renamed to Non Sawang (เทศบาลตําบลโนนสว่าง) [Announcement].
  • Nong Ko (เทศบาลตำบลหนองโก), Khon Kaen province (4082) renamed to Kranuan and upgraded to town municipality (เทศบาลเมืองกระนวน).
Only the last one was news to me, as it wasn't announced in the Royal Gazette yet, nor was it mentioned in the Excel sheet I found at DOLA. Also, some new codes were added.
2177 เทศบาลตำบลพลา
2178 เทศบาลตำบลเนินฆ้อ
4062 เทศบาลตำบลเมืองเก่า
4665 เทศบาลตำบลจุมจัง
5040 เทศบาลตำบลสันปูเลย
6485 เทศบาลตำบลป่ากุมเกาะ
7266 เทศบาลตำบลท้าวอู่ทอง
7267 เทศบาลตำบลกระจัน
7381 เทศบาลตำบลบางกระทึก
Strange is only the case of San Pu Loei, which already has the code 5046, but marked with an asterisk as an obsolete entry, and now added again with the code 5040.

Monday, January 9, 2012

FIPS 10-4 code for Bueng Kan

The US Standard FIPS 10-4 contains codes for the country subdivisions all over the world, thus also including Thailand. However, in 2008 the standard was withdrawn, so I this was off my radar since then - I only occasionally try find the first two versions of this standard (FIPS 10-1 and FIPS 10-2) to see how a few oddities with the codes could be explained.

Anyway, just today the page on the Thai provinces at statoids was updated, adding one sentence to it.
Update 6 to "Geopolitical Entities and Codes" is dated 2011-11-30. For Thailand, it assigns a FIPS code to Bueng Kan province.
It turns out that the National Geospatial-Intelligence Agency of the US military - the same agency which was responsible for maintaining the FIPS 10 standard - continues to maintain the codes of this former standard under the name Geopolitical Codes. In fact, without the bureaucracy of the National Institute of Standards, it issues many more updates in a more timely manner. The latest update 6 from November 2011 now adds the code for Bueng Kan, 10 months after it was created.
THAILAND (FNC 369)
Add :
TH81 Bueng Kan
Unlike the previous changes in the FIPS codes, this time the province which was split did not receive a new code - e.g. Udon Thani changed from TH19 to TH76 with the creation of Nong Bua Lamphu. So I would have expected to see Nong Khai receiving the new code TH82 with this change.

The latest newsletter with updates of the ISO 3166-2 list from December 2011 still has no mention of Bueng Kan however, even though they just need to copy the code from TIS 1099. Or to be more exact the working copy by the Ministry of Interior, as there was no update for the Thai standard since 2005.

Update 2010-01-10:
I sent an email to the National Geospatial-Intelligence Agency if the retaining of the code for Bueng Kan was intentionally or not, and today received the answer that it was in fact intentionally and a change in the policy of handling the splitting of subdivisions.

Wednesday, August 17, 2011

Geocodes for Bueng Kan

Somehow I totally missed that DOPA had updated their list of numerical codes already to include the codes for Bueng Kan province and its subdivisions. Though I already guessed that the province will get the code 38, and quite logically the Mueang Bueng Kan district will get the 3801, I had to wait for the list to have the codes for all other districts, subdistricts and the municipalities.

Before starting with the long table, I will already mention the general scheme used in the transfer of the codes from Nong Khai to Bueng Kan. The districts are in the same order as they were in Nong Khai, only obviously the numbers now run continuously from 1 to 8. The same holds for the subdistricts, the old order was used again, only the holes in the previous codes from the creation of new districts were omitted. The only strange thing is the code for the municipality Bueng Kan, which did not get the 3899 I would expect, but 3898. Maybe 3899 is left free for a new municipality to be created including the site of the yet to be built province hall?

NameTypeOld codeNew code
Bueng KanProvince38
Mueang Bueng KanDistrict43033801
Bueng KanSubdistrict430301380101
Non SombunSubdistrict430303380102
Non SombunSubdistrict430303380102
Nong Kheng1Subdistrict430304380103
Ho KhamSubdistrict430305380104
Nong LoengSubdistrict430306380105
Khong KongSubdistrict430307380106
Na SawanSubdistrict430310380107
Khai SiSubdistrict430311380108
ChaiyaphonSubdistrict430314380109
WisitSubdistrict430316380110
Kham Na DiSubdistrict430318380111
Pong PueaiSubdistrict430319380112
Phon CharoenDistrict43043802
Si ChomphuSubdistrict430401380201
Don Na YangSubdistrict430402380202
Phon CharoenSubdistrict430403380203
Nong Hua ChangSubdistrict430404380204
Waeng ChomphuSubdistrict430405380205
Pa FaekSubdistrict430406380206
Si SamranSubdistrict430407380207
So PhisaiDistrict43063803
SoSubdistrict430601380301
Nong Phan ThaSubdistrict430602380302
Si ChumphuSubdistrict430603380303
Kham KaeoSubdistrict430604380304
Bua ThumSubdistrict430605380305
Tham CharoenSubdistrict430606380306
Lao ThongSubdistrict430607380307
So PhisaiDistrict43063803
SekaDistrict43093804
SekaSubdistrict430901380401
SangSubdistrict430902380402
Tha Kok DaengSubdistrict430903380403
Ban ThongSubdistrict430906380404
Pong HaiSubdistrict430907380405
Nam ChanSubdistrict430908380406
Tha Sa-atSubdistrict430909380407
Nong ThumSubdistrict430912380408
Sok KamSubdistrict430913380409
Pak KhatDistrict43103805
Pak KhatSubdistrict431001380501
Nong YongSubdistrict431002380502
Na KangSubdistrict431003380503
Non SilaSubdistrict431004380504
Som SanukSubdistrict431005380505
Na DongSubdistrict431006380506
Bueng Khong LongDistrict43113806
Bueng Khong LongSubdistrict431101380601
Pho Mak KhaengSubdistrict431102380602
Dong BangSubdistrict431103380603
Tha Dok KhamSubdistrict431104380604
Si WilaiDistrict43123807
Si WilaiSubdistrict431201380701
Chumphu PhonSubdistrict431202380702
Na SaengSubdistrict431203380703
Na SabaengSubdistrict431204380704
Na SingSubdistrict431205380705
Bung KhlaDistrict43133808
Bung KhlaSubdistrict431301380801
Nong DoenSubdistrict431302380802
Khok KwangSubdistrict431303380803
Ho KhamMunicipality43773887
Nong KhengMunicipality43793888
WisitMunicipality43803889
Si WilaiMunicipality43833890
Bueng Khong LongMunicipality43843891
Pak KhatMunicipality43853892
Si PhanaMunicipality43863893
Tha Sa-atMunicipality43873894
So PhisaiMunicipality43903895
Phon CharoenMunicipality43923896
Don Ya NangMunicipality43933897
Bueng KanMunicipality43943898
1 Renamed to Non Sawang on March 3 2011, but still named Nong Kheng in the DOPA list

Monday, February 21, 2011

Number of Chumchon in large municipalities

Whereas most of the municipalities have just a handful of boroughs (Chumchon, ชุมชน), when I had a look at the website of Ubon Ratchathani recently I was surprised to find that there are quite a lot of boroughs in that city. On their map subpage, it has a map and list of 106 boroughs, and even detail maps for (almost) all of them. As the city has a population of about 85,000, this means each of the boroughs has about 800 citizen. Sadly I cannot find a table with the data for each borough, only other information piece is area which is written into each of the details map, e.g. for Chumchon 106 named Wat Burapha 2 (วัดบูรพา 2) the value is 1,436,513.09. The unit is missing, but as the whole city covers 29.04 km² it seems this is square metre and not square wa (ตารางวา).

While I already knew that Chiang Mai has a similar number of borough - 90 split between four subdistricts - the number exceeding 100 poses an interesting problem for the geocodes of the boroughs. Though they are hardly found, and I haven't yet found any complete list of these codes, it seems that they follow the system of the administrative villages (Muban) by using the last two digits of the 8 digit code. Thus the first borough Ban Kan Lueang School 2 (โรงเรียนบ้านก้านเหลือง 2) would have the code 34990001, and the last allowed code would be the 99 for Wat Si Pradu 1 (วัดศรีประดู่ 1). The final 7 borough however have no space in this system anymore.

It would only fit in case there is another level of subdivision in between - the two zeros could be used in case there are Khwaeng in Ubon Ratchathani same as in Chiang Mai, and though I have found nothing which would prove any like this the map on the Thai Wikipedia shows four areas with distinct colors. Even if these aren't official city subdivisions, using such would allow to fit in all the codes. Another possible escape would of course to use something inspired hexadecimal notation, after 99 continue with A0. The least preferred escape would be to use the last four digits for the boroughs and give borough 106 the code 34990106, as that would break the hierarchical structure of the codes.

Friday, January 28, 2011

Model province and district

The RCode list of municipality, province and district codes contains two additional codes which seem to make no sense at first look.
9700|จังหวัดจำลอง|
9701|อำเภอเมืองทดสอบ|
There is no province which has the code 97 assigned - Bueng Kan will receive the 38, so it cannot be meant here either - and even more the name of the Mueang district does not match the name of the province.

They only start to make sense once one translates the names of the two entities, then the province becomes "Example province" and the district "Test capital district". As the R in the RCode probably stands for "registration office" I suppose these codes are used for internal tests to avoid bickering with the real registration data.

Monday, January 10, 2011

Chumchon geocode confusion

I am now completely confused with the numerical codes for the Chumchon (ชุมชน, best translation might be "borough"), the subdivisions of the municipalities. Some time ago, I found that in Ang Thong the codes follow a simple rule, using the municipality code as the basis and then adding 00xx. Except that there's of course the problem with the lack of codes for all the municipalities, this makes perfect sense as the Chumchon are at a similar administrative level as the villages, which has a similar coding scheme.

However, now I took a look at the website of Warin Chamrap town, adjoining to the south of Ubon Ratchathani city. The page which shows the map of the town, including the full boundaries of all the Chumchon, also includes a list with the names and codes (รหัสชุมชน) of all 28 subdivisions. To my surprise, the codes there are from 34150101 to 34150128, which would be normally the code range for administrative villages (Muban) in Warin Chamrap subdistrict. Since this subdistrict is completely covered by the town municipality (it was upgraded to a town in 1995), it has no Muban anymore, so these codes are free. But nevertheless, I would have expected the codes to be 34980001 to 34980028 instead.

The pages on the Warin Chamrap website all have the possibility to add comments, so I tried my luck and posted this question there as well - though I have not much hope I will get any answer.

Wednesday, December 8, 2010

New municipality geocodes

When DOPA redesigned their website in spring this year, the pages which contain the population statistics were reset to the 2009 state, and also the last update of the geocode list was reverted. When I now took yet another look at the website, there was a link to the statistics, but not using the www.dopa.go.th server name but instead simply an IP address. To my surprise at that address it not only had the latest population statistics, but also the geocode list was there, and even this was even last updated in October. Thus it is interesting to compare the changes within the last year.

While the only change in main file, ccaatt containing the codes for Changwat, Amphoe, Tambon, are the codes for Galyani Vadhani district, the rcode file which contains the municipality codes is more interesting. Most of the changes in that are the deletion of the obsolete codes, for example those of the Sakha Tambon and a few municipality codes assigned but not used yet. Then there are upgrades of municipalities and name changes, yet the only really new ones are the following codes.
It's also interesting to look at how long it took from the creation of these municipalities until they were listed with a code. Krathum Lom dates from 2007, Thap Ma from 2009, and all others from 2008, so about 2 years until they assigned the code. Note that most of the other new municipalities created in the last 4 years have no code yet, and especially in the case of Nakhon Ratchasima and Chiang Mai there are not enough codes free for all of them.

I don't the reason why the codes aren't assigned directly when the municipality is created, yet my guess is that it receives a code once they have the municipal registration office running - this list is named RCode, so the R may stand for registration, and also in the DOPA population statistics most of the new municipalities don't show yet as well, so maybe the numbers are still those reported by the Amphoe registration office.

Monday, July 19, 2010

Bueng Kan province - geocode and constituencies

While there's no news yet on the Bueng Kan province proposal, which is supposed to be discussed in cabinet next, there are a few smaller things to note while the proposal is in the waiting loop.

On the main Thai webforum pantip.com I found a thread which was around the geocode, or actually more the postal code, for the new province, only strangely it was removed few hours after I discovered it and is now a 404. But anyway the author wondered which code will be assigned to the new province, and since he knew that the only number free in the number range of the North-Eastern provinces is the 38 he actually answered his own question directly. But then he wondered why it is this number which is free - something which I could find the explanation when I discovered about the regions in the 1950s, which were simply numbered from 1 to 9. While there are now 7 provinces in the original region 3, the region 4 has now 11 province, so the 39 has been used instead. Bueng Kan will be the 12th province of region 4, filling the last hole in the number range. Any further province in the northeast then probably should get the 29...

Since I just discovered how to calculate the number of constituencies for each province, it's interesting to check what effect the creation of the new province will have on the constituency numbers. It's not necessarily so easy that the six constituencies of Nong Khai province will simple be split between the two provinces, since it depends a lot on the residue population after the first round of constituencies are spread. Using the numbers as of December 31 2009, Nong Khai gets three constituencies in the first round, while Bueng Kan is the 31st of 34 provinces to get an additional seat in the second round. When calculating without Bueng Kan, then Nong Khai get 5 seats in first round and is the 20th of 34 to get an additional seat. So while it looks that the 6 constituencies were simply split, this is in fact more of a coincidence that it turns out to give this result.

Monday, April 26, 2010

Chumchon geocodes

Municipalities are subdivided into communities (chumchon), a subdivision I know hardly anything about. But since it roughly corresponds to the villages (muban), I had anticipated that they should have numerical codes similar to the villages.

Now I just tried to google for the Thai word "รหัสชุมชน" (Chumchon code), and to my surprise I found quite a lot of hits. Among the first was a forum entry at the website of Ang Thong town municipality (เทศบาลเมืองอ่างทอง),
ชุมชนศาลเจ้าพ่อกวนอูเป็นชุมชนใหม่เกิดขึ้นตามประกาศเทศบาลเมืองอ่างทอง เรื่อง การกำหนดพื้นที่ชุมชน ณ วันที่ 19 พฤษภาคม 2552
มีจำนวนครัวเรือน 255 ครัวเรือน
ประชากร 513 คน
รหัสชุมชน 15990014
[...]
It says, that on May 19 2009 the new community "San Chao Pho Kwan U" was established, having 255 households and 513 citizen, and the geocode 15990014. Exactly the kind of code I was expecting, since Ang Thong municipality has the code 1599, and to get to the same hierarchical level as the villages two zeros are added between the chumchon number and the municipality code. The forum entry then continues with a short description of the boundary.

Now continuing with this code, as well as with the code for Chumchon 13, I then found two Excel sheets, both from the SML program, the fund to support the Muban and chumchon originally started by the populist Thaksin government.

The first named Angthong.xls dates from August 2008, and contains only the codes 1 to 13 for Ang Thong town. The second, named chumchon.xls is from August 2009 and lists 4421 chumchon from all over the country. For Ang Thong it has 22 chumchon, including the one mentioned above. Thus it seems Ang Thong created 9 new chumchon in 2009, however only one is mentioned in the forum. Sadly, this chumchon.xls is definitely not a complete list, those few municipalities where I added chumchon to the XML files before are all not covered there. I have no idea how many chumchon it has altogether, none of the annual statistics I know of lists them. Only the news report I linked above for the SML program says there are 3414 in 2008.