Pages

2013-04-15

Converting principal subdivision names in Japan

When handling data sets, Japanese characters are almost always a pain in the neck because of garbled text in data-processing software such as R.
Replacing Japanese characters with Roman notations manually is a very tedious task that many people may not want to do.
Commonly used names like principal subdivisions, or prefecture (the United States' counterparts are states), among others, would be handy if you can get their Roman notations quickly.
So I made a script to convert names of Japan's principal subdivisions between Japanese (Kanji) and Roman.

iso3166-2jp (Google Apps Script. I don't know why, but Google sign-in is required to view the code though I'm sharing it for anonymous access.)

If you make a copy of the above script and include it as a library, you can use its functions in your Google Sheets.



Japan's principal subdivisions:
http://en.wikipedia.org/wiki/ISO_3166-2:JP
http://ja.wikipedia.org/wiki/ISO_3166-2:JP

No comments: