Last modified: 2012-09-11 19:34:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41891, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39891 - Adm1 contains incorrect iso codes for Italy
Adm1 contains incorrect iso codes for Italy
Status: RESOLVED FIXED
Product: Wiki Loves Monuments
Classification: Unclassified
Sources (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Maarten Dammers
http://wlm.wikimedia.org/api/api.php?...
:
: 39873 (view as bug list)
Depends on:
Blocks: 39882
  Show dependency treegraph
 
Reported: 2012-09-01 13:21 UTC by Maarten Dammers
Modified: 2012-09-11 19:34 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Maarten Dammers 2012-09-01 13:21:40 UTC
http://wlm.wikimedia.org/api/api.php?action=adminlevels&format=json&admtree=it contains 01-20, should be it-01 - it-20. See https://en.wikipedia.org/wiki/ISO_3166-2:IT for the list
Comment 1 Maarten Dammers 2012-09-01 17:08:36 UTC
Fixing.
Comment 2 Maarten Dammers 2012-09-01 17:15:56 UTC
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)
Comment 3 Max Semenik 2012-09-05 00:14:51 UTC
*** Bug 39873 has been marked as a duplicate of this bug. ***
Comment 4 Arthur Richards 2012-09-06 17:30:22 UTC
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?
Comment 5 Maarten Dammers 2012-09-06 17:40:54 UTC
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?
Comment 6 Effeietsanders 2012-09-06 17:53:37 UTC
I guess Frieda would know who to poke :)
Comment 7 Frieda Brioschi 2012-09-07 08:08:30 UTC
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..
Comment 8 Cristian Consonni 2012-09-07 17:53:45 UTC
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
Comment 9 Arthur Richards 2012-09-07 19:14:05 UTC
(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.
Comment 10 Cristian Consonni 2012-09-07 19:20:20 UTC
(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
Comment 11 Cristian Consonni 2012-09-08 20:41:20 UTC
(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
Comment 12 Maarten Dammers 2012-09-09 13:50:08 UTC
I think we have fixed it.
* Comune field renamed to comune-id (the one with the number)
* New field regione-iso for https://en.wikipedia.org/wiki/ISO_3166-2:IT#Regions (adm1)
* New field prov=iso for https://en.wikipedia.org/wiki/ISO_3166-2:IT#Provinces (adm2)
* New field comune filled with the name of the comune (adm3)

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
Comment 13 Cristian Consonni 2012-09-11 07:57:29 UTC
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
Comment 14 Arthur Richards 2012-09-11 19:34:03 UTC
We now have human readable Italian regions showing up in the app :D Thanks for updating the data!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links