Page MenuHomePhabricator

Adm1 contains incorrect iso codes for Italy
Closed, ResolvedPublic

Details

Reference
bz39891

Related Objects

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:56 AM
bzimport set Reference to bz39891.

CONCAT('it-',regione) AS adm1, should fix this.

mysql> SELECT DISTINCT(adm1) FROM monuments_all WHERE country='it' AND lang='it' AND adm0= 'it';
+-------+

adm1

+-------+

it-07
it-18
it-01
it-03
it-04
it-05
it-06
it-08
it-11
it-09
it-10
it-12
it-15
it-13
it-14
it-02
it-16
it-17
it-19
it-20

+-------+
20 rows in set (0.00 sec)

  • Bug 39873 has been marked as a duplicate of this bug. ***

This does not actually solve the problem, as those adm1 regions are NOT ISO-3166-2 codes. Compare against: http://en.wikipedia.org/wiki/ISO_3166-2:IT

adm2 codes also appear to be only digits, although perhaps that was actually intended?

Oh, right, this is a mess. The source data should be fixed and than we can pick it up in the database. Lodewijk, can you contact the right people?

I guess Frieda would know who to poke :)

ubifrieda wrote:

We're not using simile digits, we're using Istat codes (look for "codice ISTAT" for instance here http://it.wikipedia.org/wiki/Lombardia). Those are the official code for geopolitical entities in Italy. Same kind of codes are used for towns..

That codes (it-01, it-02, it-03, ..., it-20) should be mapped to region names. In fact they are displayed in the WLM app on Android, which is of little use.

I don't know if this is the right place to point this out, but in
Also, the monuments in the list are shown by ID number and not with their names.

Cristian

(In reply to comment #8)

That codes (it-01, it-02, it-03, ..., it-20) should be mapped to region names.
In fact they are displayed in the WLM app on Android, which is of little use.

Agreed. At this point in the game, we unfortunately cannot add support for other standards like ISTAT. Most if not all other campaigns are using ISO-3166-2, and that is what is currently supported.

Without switching to ISO-3166-2 codes, Italian regions will not be human-readable in the android app, and additionally might cause confusion for others using the APIs who, by convention, expect to that the topmost adm levels be ISO-3166-2 codes.

(In reply to comment #9)

(In reply to comment #8)

That codes (it-01, it-02, it-03, ..., it-20) should be mapped to region names.
In fact they are displayed in the WLM app on Android, which is of little use.

Agreed. At this point in the game, we unfortunately cannot add support for
other standards like ISTAT. Most if not all other campaigns are using
ISO-3166-2, and that is what is currently supported.

Well, having ISTAT codes displayed in the WLM app wouldn't help much. I think Frieda misunderstood the question.

Without switching to ISO-3166-2 codes, Italian regions will not be
human-readable in the android app, and additionally might cause confusion for
others using the APIs who, by convention, expect to that the topmost adm levels
be ISO-3166-2 codes.

strong +1.

Cristian

(In reply to comment #10)

Well, having ISTAT codes displayed in the WLM app wouldn't help much. I think
Frieda misunderstood the question.

Actually it was me that misunderstood the point. I'll correct the template with iso codes for Italian region. But I'm wonderig what I have to do for municipalities codes.

Cristian

I think we have fixed it.

Data looks good:

mysql> SELECT DISTINCT(CONCAT(regione-iso, ' - ', prov-iso, ' - ', comune)) FROM monuments_it_(it) WHERE NOT regione-iso=''lIMIT 10;
+--------------------------------------------------------------+

(CONCAT(regione-iso, ' - ', prov-iso, ' - ', comune))

+--------------------------------------------------------------+

IT-25 - IT-PV - [[Pavia]]

+--------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> SELECT DISTINCT(CONCAT(adm1, ' - ', adm2, ' - ', adm3)) FROM monuments_all WHERE lang='it' AND country='it' AND adm0='it' AND NOT adm1=''lIMIT 10;
+-------------------------------------------------+

(CONCAT(adm1, ' - ', adm2, ' - ', adm3))

+-------------------------------------------------+

IT-25 - IT-PV - [[Pavia]]

+-------------------------------------------------+
1 row in set (0.04 sec)

The rest of the entries will be populated this weekend

Due to the changes in the Momuments template (see bug 38325[*]) the list in the WLM Android app should be fixable now.

Cristian
[*]https://bugzilla.wikimedia.org/show_bug.cgi?id=38325

We now have human readable Italian regions showing up in the app :D Thanks for updating the data!