extras/location - geoplugin_regionAbbreviated

76 views
Skip to first unread message

vasili...@gmail.com

unread,
Nov 22, 2018, 12:13:52 PM11/22/18
to geoPlugin
Hi!

I’m making a following request: http://www.geoplugin.net/extras/location.gp?lat=54.93083&long=43.32352&format=xml . What does “geoplugin_regionAbbreviated” mean? If it’s a unique identifier for geoplugin_region, where can I get a full list at least for Russia?

Thank you, Vasily

geoPlugin Support

unread,
Nov 22, 2018, 12:29:31 PM11/22/18
to geop...@googlegroups.com
Hi Vasily,

We try when possible to map the region code to abbreviation, but when
not possible, we simply display the region code. Unfortunately we have
no data mappings for anything in russion to give the abbreviation, so
all is output as the region code. Here are the values

88 Jaroslavl
86 Voronezj
85 Vologda
84 Volgograd
81 Ulyanovsk
80 Udmurtiya
77 Tverskaya
76 Tula
73 Tatarstan
72 Tambov
70 Stavropol'skiy
69 Smolensk
67 Saratov
65 Samara
62 Rjazan
61 Rostov
60 Pskov
90 Perm
57 Penza
56 Orjol
55 Orenburg
52 Novgorod
68 North Ossetia
50 Nenetskiy Avtonomnyy Okrug
49 Murmansk
48 Moscow
47 MO
46 Mordoviya
45 Mariy-El
43 Lipetsk
42 Leningrad
66 St.-Petersburg
41 Kursk
38 Krasnodarskiy
37 Kostroma
34 Komi Republic
33 Kirov
28 Republic of Karelia
27 Karachayevo-Cherkesiya
25 Kaluga
24 Kalmykiya
23 Kaliningrad
22 Kabardino-Balkariya
21 Ivanovo
19 Ingushetiya
51 Nizjnij Novgorod
17 Dagestan
16 Chuvashia
12 Chechnya
10 Brjansk
09 Belgorod
08 Bashkortostan
07 Astrakhan
06 Arkhangelskaya
01 Adygeya
83 Vladimir
87 Yamalo-Nenetskiy Avtonomnyy Okrug
78 Tjumen
79 Tyva
75 Tomsk
71 Sverdlovsk
54 Omsk
53 Novosibirsk
40 Kurgan
91 Krasnoyarskiy
32 Khanty-Mansiyskiy Avtonomnyy Okrug
31 Khakasiya
29 Kemerovo
03 Altai Republic
13 Chelyabinsk
04 Altai Krai
63 Sakha
59 Primorskiy
30 Khabarovsk Krai
20 Irkutsk
89 Jewish Autonomous Oblast
05 Amur
11 Respublika Buryatiya
64 Sakhalin
44 Magadan
92 Kamtsjatka
15 Chukotskiy Avtonomnyy Okrug
93 Transbaikal Territory
> --
> You received this message because you are subscribed to the Google
> Groups "geoPlugin" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to geoplugin+...@googlegroups.com.
> To post to this group, send email to geop...@googlegroups.com.
> Visit this group at https://groups.google.com/group/geoplugin.
> For more options, visit https://groups.google.com/d/optout.

vasili...@gmail.com

unread,
Nov 22, 2018, 2:46:44 PM11/22/18
to geoPlugin
Thank you very much! That’s what I needed.

I’ve compared the GPS data (http://www.geoplugin.net/extras/location.gp?lat=54.93083&long=43.32352&format=xml) with the data by IP (http://www.geoplugin.net/xml.gp?ip=212.22.67.1&lang=en) and added the ‘geoplugin_regionCode’ field (from the http://www.maxmind.com database), hope it would be useful for you too.

01               AD               Adygeya
03               AL               Altai Republic
04               ALT               Altai Krai
05               AMU               Amur
06               ARK               Arkhangelskaya
07               AST               Astrakhan
08               BA               Bashkortostan
09               BEL               Belgorod
10               BRY               Brjansk
11               BU               Respublika Buryatiya
12               CE               Chechnya
13               CHE               Chelyabinsk
15               CHU               Chukotskiy Avtonomnyy Okrug
16               CU               Chuvashia
17               DA               Dagestan
19               IN               Ingushetiya
20               IRK               Irkutsk
21               IVA               Ivanovo
22               KB               Kabardino-Balkariya
23               KGD               Kaliningrad
24               KL               Kalmykiya
25               KLU               Kaluga
27               KC               Karachayevo-Cherkesiya
28               KR               Republic of Karelia
29               KEM               Kemerovo
30               KHA               Khabarovsk Krai
31               KK               Khakasiya
32               KHM               Khanty-Mansiyskiy Avtonomnyy Okrug
33               KIR               Kirov
34               KO               Komi Republic
37               KOS               Kostroma
38               KDA               Krasnodarskiy
40               KGN               Kurgan
41               KRS               Kursk
42               LEN               Leningrad
43               LIP               Lipetsk
44               MAG               Magadan
45               ME               Mariy-El
46               MO               Mordoviya
47               MOS               MO
48               MOW               Moscow
49               MUR               Murmansk
50               NEN               Nenetskiy Avtonomnyy Okrug
51               NIZ               Nizjnij Novgorod
52               NGR               Novgorod
53               NVS               Novosibirsk
54               OMS               Omsk
55               ORE               Orenburg
56               ORL               Orjol
57               PNZ               Penza
59               PRI               Primorskiy
60               PSK               Pskov
61               ROS               Rostov
62               RYA               Rjazan
63               SA               Sakha
64               SAK               Sakhalin
65               SAM               Samara
66               SPE               St.-Petersburg
67               SAR               Saratov
68               SE               North Ossetia
69               SMO               Smolensk
70               STA               Stavropol'skiy
71               SVE               Sverdlovsk
72               TAM               Tambov
73               TA               Tatarstan
75               TOM               Tomsk
76               TUL               Tula
77               TVE               Tverskaya
78               TYU               Tjumen
79               TY               Tyva
80               UD               Udmurtiya
81               ULY               Ulyanovsk
83               VLA               Vladimir
84               VGG               Volgograd
85               VLG               Vologda
86               VOR               Voronezj
87               YAN               Yamalo-Nenetskiy Avtonomnyy Okrug
88               YAR               Jaroslavl
89               YEV               Jewish Autonomous Oblast
90               PER               Perm
91               KYA               Krasnoyarskiy
92               KAM               Kamtsjatka
93               ZAB               Transbaikal Territory

geoPlugin Support

unread,
Nov 22, 2018, 2:51:44 PM11/22/18
to geop...@googlegroups.com
Hi Vailsy,
Thanks for that list - I'll try very much to get that incorporated so
that all can benefit.
That said, can you point me to the mm database where you connected codes
to abbreviations? If this is a single global flatfile, I'll have
geoplugin use that so that it's global for everyone.
If not a flatfile, if you can point me to the db (geolite2??) and which
sections permitted you to get your RU list, I can see if I can do the
same for all countries

Thanks
Andy
> body,div,table,thead,tbody,tfoot,tr,th,td,p { font-family:"Liberation
> Sans"; font-size:x-small }

vasili...@gmail.com

unread,
Nov 22, 2018, 4:14:02 PM11/22/18
to geoPlugin
https://dev.maxmind.com/geoip/geoip2/geolite2/
GeoLite2 Country
http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
GeoLite2-City-Locations-en.csv

I’ve been comparing names with column "subdivision_1_name", the codes are from column "subdivision_1_iso_code". But I had to do it manually, because names differ, f.e. "Nizjnij Novgorod" and "Nizhniy Novgorod" is the same city, and "MO" is short for "Moscow Oblast"

geoPlugin Support

unread,
Nov 22, 2018, 4:41:11 PM11/22/18
to geop...@googlegroups.com
Thanks - that is useful
So you're saying we should update our region names to the region codes
given in MM?
I will do checks, but I've nothing against that, since our actual region
codes are based on a lgeacy Geonames db that MM now uses in their
Geolite2 databases. If the mappings are now in their CSV, we can update
our mappings to suite.

geoPlugin Support

unread,
Nov 23, 2018, 2:54:42 PM11/23/18
to geop...@googlegroups.com
Hi Vasily,
I've given it a thorough look over as a possibility to lookup region
codes via region name, but this won't work for our vast traffic for the
following reasons:
- we handle not far from 1/10th of google's global traffic, therefore
*every* lookup we do needs to really well optimised. Something taking
1ms more than before when you're handling 4k requests a second creates a
4 second backlog in processing requests coming after (ok, those 4k
aren't location.gp traffic, but you get the idea)
- we would need to create fuzzy lookups on a varchar(255) mysql field,
rather than an int(2) in mysql, which is 1. mysql intensive, 2. 3ms
longer on non-cached mysql lookups (live tests on MM csv imported into
mysql)
- the region name lookup actually results in a 2% no return because of
the mismatch in region names (accents, no accents, different spellings
etc like you pointed out)

For us handling this amount of lookups, these slowdowns to return an
abbreviation for countries we don't hold abbreviations for in the actual
live data is too much of a trade-off to be fully 100% global.

So unfortunately, for these countries (like RU), we will push the onus
onto the end user to map these. It sounds like you were able to.
Hopefully others in your situation can do the same!

Sorry I couldn't find a simple solution for this - I did honestly try!

Best
Andy
Reply all
Reply to author
Forward
0 new messages