What is Google's internal mapping of countries to sub-region codes?

5,086 views
Skip to first unread message

Matt Nuttall

unread,
Dec 14, 2011, 8:58:18 PM12/14/11
to google-visua...@googlegroups.com
Hi Google geochart Development;

Your API provides the following region options:
  • 005 - (South America)
  • 013 - (Central America)
  • 021 - (North America)
  • 002 - (All of Africa)
  • 017 - (Central Africa)
  • 015 - (Northern Africa)
  • 018 - (Southern Africa)
  • 030 - (Eastern Asia)
  • 034 - (Southern Asia)
  • 035 - (Asia/Pacific region)
  • 143 - (Central Asia)
  • 145 - (Middle East)
  • 150 - (Europe)
  • 151 - (Northern Asia)
  • 154 - (Northern Europe)
  • 155 - (Western Europe)
  • 039 - (Southern Europe
I've seen references to support of resolution: "continents". So, if a user clicks on a continent we have no region code that will allow us to display the countries on that continent. Or as a second choice, is there any way we can use this list of regions to divide the world into unique regions: for example, let's say I display my world map, and if a user clicks on Brazil, they get to see map 005 for South America. That works nicely, as would a click on Malawi and a display of 002 for all of Africa. Europe is okay too, I think. However, once we move into Asia, I have no way of knowing which of these regions would be appropriate for displaying a map based upon a click anywhere on the Asian continent. At the very least, if Google published their mappings of the subregions, I could readily figure them out myself. Thanks! Matt 

Matt Nuttall

unread,
Dec 16, 2011, 12:33:48 PM12/16/11
to google-visua...@googlegroups.com
For what it's worth, I worked through this manually and created the following arrays. Note that Oceana, 009, is not currently documented as being supported, but it seems to work just fine. I also opted to place all Caribean zone countries into the Central America region because this made the most sense from a map display/visual standpoint?? Basically, you can display a world level map of all countries, then use these arrays to select for the subregions to display as end users "drill down".
Google development: let me know if I've made any errors or incorrect assumptions in my development of these regional country mappings.
Thanks for the great API -- Matt

  arr145 = ["AE","AM","AZ","BH","CY","GE","IL","IQ","JO","KW","LB","OM","QA","SA","SY","TR","YE"] /* western asia, middle east, south west asia */
  arr034 = ["AF","BD","BT","IN","IR","LK","MV","NP","PK"] /* southern asia */
  arr013 = ["AG","BB","BS","BZ","CR","CU","DM","DO","GD","GP","HN","HT","JM","KN","LC","MX","NI","PA","PR","SV","TT","VC"] /* central america - including all Caribean */
  arr150 = ["AL","AT","BA","BA","BG","BY","CH","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HR","HU","IE","IS","IT","LT","LU","LV","MA","ME","MK","MT","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"] /* europe */
  arr002 = ["AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","DZ","EG","EH","ER","ET","GA","GH","GM","GN","GQ","GW","KE","KM","LR","LS","LY","MA","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RW","SC","SD","SL","SN","SO","ST","SZ","TD","TG","TN","TZ","UG","ZA","ZM","ZW"] /* africa */
  arr005 = ["AR","BO","BR","CL","CO","EC","GF","GY","PE","PY","SR","UY","VE"] /* south america */
  arr009 = ["AU","CK","FJ","KI","NR","NU","NZ","PG","PW","SB","TO","VU","WS"] /* oceana */
  arr021 = ["US","CA","BM","GL"]  /* north america - including Bermuda and Greenland */
  arr035 = ["BN","ID","KH","LA","MM","MY","PH","SG","TH","VN" ]  /* south eastern asia, asia pacific */
  arr030 = ["CN","JP","KP","KR","MN","TJ"] /*eastern asia */
  arr143 = ["KG","KZ","TJ","TM","UZ"] /* central asia */

Matt Nuttall

unread,
Dec 18, 2011, 1:12:57 PM12/18/11
to google-visua...@googlegroups.com
I may just be talking to myself on this forum, but I noticed the Caribbean really has been implemented on Google Charts. So, here is a set of array variables with the Caribbean 029 regions separated from Central America. Hopefully somebody will someday find this mapping helpful:

  arr145 = ["AE","AM","AZ","BH","CY","GE","IL","IQ","JO","KW","LB","OM","QA","SA","SY","TR","YE"] /* western asia, middle east, south west asia */
  arr034 = ["AF","BD","BT","IN","IR","LK","MV","NP","PK"] /* southern asia */
  arr013 = ["BB","BZ","CR","HN","MX","NI","PA","SV"] /* central america */
  arr029 = ["AI","AG","AW","BS","BB","BQ","VG","KY","CU","CW","DM","DO","GD","GP","HT","JM","MQ","MS","PR","BL","KN","LC","VC","SX","TT","TC","VI"]; /* Caribbean */

EZChart

unread,
Dec 19, 2011, 8:28:05 AM12/19/11
to google-visua...@googlegroups.com
Nice effort! Sorry we didn't answer sooner...

First of all, here's a complete list of the regions we support, and their hierarchy (our documentation will be updated soon).
This hierarchy is based (with some exceptions) on http://unstats.un.org/unsd/methods/m49/m49regin.htm.

      world
          002: Africa
              015: Northern Africa
              011: Western Africa
              017: Middle Africa
              014: Eastern Africa
              018: Southern Africa
          150: Europe
              154: Northern Europe
              155: Western Europe
              151: Eastern Europe
              039: Southern Europe
          019: Americas
              021: Northern America
              029: Caribbean
              013: Central America
              005: South America
          142: Asia
              143: Central Asia
              030: Eastern Asia
              034: Southern Asia
              035: South-Eastern Asia
              145: Western Asia
          009: Oceania
              053: Australia and New Zealand
              054: Melanesia
              057: Micronesia
              061: Polynesia


And here's the mapping of the regions to their countries:

  005: AR BO BR CL CO EC FK GF GY PE PY SR UY VE
  011: BF BJ CI CV GH GM GN GW LR ML MR NE NG SH SL SN TG
  013: BZ CR GT HN MX NI PA SV
  014: BI DJ ER ET KE KM MG MU MW MZ RE RW SC SO TZ UG YT ZM ZW
  015: DZ EG EH LY MA SD TN
  017: AO CD ZR CF CG CM GA GQ ST TD
  018: BW LS NA SZ ZA
  021: BM CA GL PM US
  029: AG AI AN AW BB BL BS CU DM DO GD GP HT JM KN KY LC MF MQ MS PR TC TT VC VG VI
  030: CN HK JP KP KR MN MO TW
  034: AF BD BT IN IR LK MV NP PK
  035: BN ID KH LA MM BU MY PH SG TH TL TP VN
  039: AD AL BA ES GI GR HR IT ME MK MT CS RS PT SI SM VA YU
  053: AU NF NZ
  054: FJ NC PG SB VU
  057: FM GU KI MH MP NR PW
  061: AS CK NU PF PN TK TO TV WF WS
  143: TM TJ KG KZ UZ
  145: AE AM AZ BH CY GE IL IQ JO KW LB OM PS QA SA NT SY TR YE YD
  151: BG BY CZ HU MD PL RO RU SU SK UA
  154: GG IM JE AX DK EE FI FO GB IE IM IS LT LV NO SE SJ
  155: AT BE CH DE DD FR FX LI LU MC NL


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/mCu5AcZQffAJ.

To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.

Matt Nuttall

unread,
Dec 19, 2011, 8:00:49 PM12/19/11
to google-visua...@googlegroups.com
Hi EZChart

Thanks -- that helps! I'd left out a few, it seems. Only thing I noticed is "IM" is listed twice in your 154 list.

Next, do you guys provide access to an ISO-3166-2 region code to city mapping database? This would complete my database soooooo nicely.

Thanks again -- Matt

EZChart

unread,
Dec 20, 2011, 12:45:15 AM12/20/11
to google-visua...@googlegroups.com
We don't really have a region code to city database. When we want to position a marker based on a city name (or any address) we use Google's Geocoding API (http://code.google.com/apis/maps/documentation/geocoding/) to find its latitude/longitude.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.

RainMan

unread,
Feb 14, 2012, 2:42:00 PM2/14/12
to Google Visualization API
Why is North and South America 1 continent? It's the only thing
holding me up right now. Technically Europe and Asia = Eurasia as
well. But, to not have separate continents for the America's is
killing me. If I could mix subcontinents with continents using the
same resolution, I would be good. Or combine batches of subcontinents
so they showed as one. Anyone know how I can create a geochart with
North America, South America, Africa, Oceania/Australia, Asia, and
Europe as the main data points?

Thanks!

On Dec 20 2011, 12:45 am, EZChart <ezch...@google.com> wrote:
> We don't really have a region code to city database. When we want to
> position a marker based on a city name (or any address) we use Google's
> Geocoding API (http://code.google.com/apis/maps/documentation/geocoding/)
> to find its latitude/longitude.
>
> On Tue, Dec 20, 2011 at 3:00 AM, Matt Nuttall <mattenutt...@gmail.com>wrote:
>
>
>
> > Hi EZChart
>
> > Thanks -- that helps! I'd left out a few, it seems. Only thing I noticed
> > is "IM" is listed twice in your 154 list.
>
> > Next, do you guys provide access to an ISO-3166-2 region code to city
> > mapping database? This would complete my database soooooo nicely.
>
> > Thanks again -- Matt
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Google Visualization API" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/google-visualization-api/-/PDkJ_vYtklsJ.
>
> > To post to this group, send email to
> > google-visua...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-visualizati...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-visualization-api?hl=en.- Hide quoted text -
>
> - Show quoted text -

EZChart

unread,
Feb 15, 2012, 4:22:30 AM2/15/12
to google-visua...@googlegroups.com
The best you can do is use the 'subcontinents' resolution and assign the same data and name to sub-continents that you want to treat as a single continent.

RainMan

unread,
Feb 15, 2012, 10:35:23 AM2/15/12
to Google Visualization API
That is what I thought.... I started to implement the subcontinents as
a work around. Considering the days if not weeks Google geocharts has
saved me so far, I guess I can't complain. :)

Thank you!

On Feb 15, 4:22 am, EZChart <ezch...@google.com> wrote:
> The best you can do is use the 'subcontinents' resolution and assign the
> same data and name to sub-continents that you want to treat as a single
> continent.
> For example:http://savedbythegoog.appspot.com/?id=04ad2052af3850379f7f97df5f21cce...

Matt Nuttall

unread,
Apr 4, 2012, 7:00:33 PM4/4/12
to google-visua...@googlegroups.com
Hi EZChart;

Can I ask one more question on this topic? Do you provide a mapping of what ISO-31622 region names you are actually using fore each country with geochart? I purchased a country to region to city database from CommonDatahub, but it has a poor match up to what geochart uses. For example, look at Malawi: http://en.wikipedia.org/wiki/ISO_3166-2:MW. The ISO 3166-2 standard defines regions and districts subdivision. Take a city such as Nkhotakota. Datahub puts Nkhotakota in subdivision MW-NK while geochart uses subdivision MW-C. Or, let's choose something less esoteric: what ISO 3166-2 region would the city of London, England, be located in according to geochart?

Ideally I'd like to buy a database that already has these geochart country to region mappings. If you don't have one, do you at least of a list of what ISO 3166-2 region names you actually support for each of your supported countries? I've created this awesome mapping engine courtesy of you guys, but now I need to make it function with my database a little better.

Many thanks -- Matt
> > > > google-visualization-api@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-visualization-api+unsub...@googlegroups.com.
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-visualization-api?hl=en.-Hide
> > quoted text -
>
> > > - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Visualization API" group.
> > To post to this group, send email to
> > google-visualization-api@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-visualization-api+unsub...@googlegroups.com.

EZChart

unread,
Apr 5, 2012, 2:24:24 AM4/5/12
to google-visua...@googlegroups.com
Hi Matt,
What we have is a list of provinces we support per country (attached as a csv). We don't know the mapping between different levels of regions (e.g, MW-NK being part of MW-C), or between cities and regions.

Let me know if this helps,
EZChart
ProvincesByCountry.csv

Matt Nuttall

unread,
Apr 5, 2012, 1:43:19 PM4/5/12
to google-visua...@googlegroups.com
Hi EzChart;
That is exactly what I needed! Many, many thanks -- Matt

conualfy

unread,
Apr 6, 2012, 5:57:39 PM4/6/12
to google-visua...@googlegroups.com
I can confirm that at least for Romania it has our counties, the official administrative subdivisions of the country (not regions, as we see regions being larger, usually containing more counties/parts of counties, on historical basis).

F.
Message has been deleted

Jérôme

unread,
Apr 7, 2012, 3:54:15 PM4/7/12
to google-visua...@googlegroups.com
quite surprising to see that you have 5 provinces listed for Andorra or some other micro states, and none for Finland, Lithuania, Latvia, Estonia !!

You lack of East Europe experts obviously

Erez Bixon

unread,
Apr 8, 2012, 6:29:54 AM4/8/12
to google-visua...@googlegroups.com

The baltic countries are supposed to be getting their province maps in the next release, which should be out in less than a month.

On Apr 7, 2012 10:54 PM, "Jérôme" <jerome.b...@gmail.com> wrote:
quite surprising to see that you have 5 provinces listed for Andorra or some other micro states, and none for Finland, Lithuania, Latvia, Estonia !!

You lack of East Europe experts obviously

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/KQIPU69wdj4J.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.

Matt Nuttall

unread,
Apr 21, 2012, 9:22:55 AM4/21/12
to google-visua...@googlegroups.com
Hi EZChart;

I'm putting the map engine through its paces testing and it's working great! There is a discrepancy in Bangladesh. The mapping CSV file you sent shows:
BD,Bangladesh,BD-1;BD-2;BD-3;BD-4;BD-5;BD-6
This doesn't quite match anything with ISO:
http://en.wikipedia.org/wiki/ISO_3166-2:BD
Because my database maps cities to regions, I need to make sure I understand what ISO regions you are using.

Thanks -- Matt




On Sunday, April 8, 2012 3:29:54 AM UTC-7, EZChart wrote:

The baltic countries are supposed to be getting their province maps in the next release, which should be out in less than a month.

On Apr 7, 2012 10:54 PM, "Jérôme" <jerome.b...@gmail.com> wrote:
quite surprising to see that you have 5 provinces listed for Andorra or some other micro states, and none for Finland, Lithuania, Latvia, Estonia !!

You lack of East Europe experts obviously

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/KQIPU69wdj4J.
To post to this group, send email to google-visualization-api@googlegroups.com.
To unsubscribe from this group, send email to google-visualization-api+unsub...@googlegroups.com.

Matt Nuttall

unread,
Apr 23, 2012, 12:31:24 PM4/23/12
to google-visua...@googlegroups.com
And, EZChart;

In addition to the Bangladesh ambiguity, Serbia is listed with regions RS-SR and RS-VO. I couldn't find evidence that RS-SR is a valid Serbian region?

Thanks again -- Matt

Sam S

unread,
Mar 25, 2020, 1:43:22 PM3/25/20
to Google Visualization API
Is there an up-to-date version of this csv or a way to query an up-to-date version? 
> > > > To unsubscribe from this group, send email to
> > > > google-visualization-api+unsub...@googlegroups.com.
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-visualization-api?hl=en.-Hide
> > quoted text -
>
> > > - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Visualization API" group.
> > To post to this group, send email to
Reply all
Reply to author
Forward
0 new messages