Property talk:P8714

From Wikidata
Jump to navigation Jump to search

Documentation

GADM ID
identifier in the Global Administrative Area database
[create Create a translatable help page (preferably in English) for this property to be included here]
Format “[A-Z]{3}(\.\d+)*(_\d+)?: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P8714#Format, SPARQL
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P8714#Type Q56061, Q15324, SPARQL
Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P8714#Unique value, SPARQL (every item), SPARQL (by value)
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Mirabel (Q141921)
List of violations of this constraint: Database reports/Constraint violations/P8714#Single value, SPARQL
Scope is as main value (Q54828448), as reference (Q54828450): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P8714#Scope, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P8714#Entity types

Related queries[edit]

Test and comments[edit]

Hi @99of9:,

I tried and started the matching for places in France. I noticed some things that might help or not :

  • the oversea parts of France are apparently not considered as being in France and are considered as "country" (not unusual but always strange)
  • the automated matchs ares sometimes very strange (a lot of links to disambig pages for instance :/ )
  • apparently there seems to be a heriarchy in these codes, maybe we can built a complex constraint to check that... I'll look into that (see below).
  • For French arrondissement, GADM apparently use the old frontiers before 2015, see arrondissement of Dinan (Q701131) for instance. For the régions, it is the current ones (reformed in 2016), should we put a qualifier for that ?

Meanwhile, I'll keep going.

Cdlt, VIGNERON (talk) 19:39, 29 October 2020 (UTC)[reply]

#Identifiers on an administrative territorial entity not matching the idenfier of the entity above (only based the first 3 characters for now, some false-positive for oversea territories)
SELECT ?q1 (GROUP_CONCAT(DISTINCT ?id1) as ?id1s) (GROUP_CONCAT(DISTINCT ?q2) as ?q2s) (GROUP_CONCAT(DISTINCT ?id2) as ?id2s) WHERE {
  ?q1 wdt:P8714 ?id1 .
  ?q1 wdt:P31/wdt:P279* wd:Q56061 .
  ?q1 wdt:P131 ?q2 .
  ?q2 wdt:P8714 ?id2 .
  FILTER (!REGEX(?id1,CONCAT(substr(?id2,1,IF(strlen(?id2)>3,strlen(?id2)-2,3)),"(\\.\\d*)(","_1",")?")))
}
GROUP BY ?q1
Try it!
Thanks @VIGNERON:. The description "country" was my bad. It didn't come from the data and won't matter once the matching is done. Yes, I was also disappointed by a lot of the automatching. The hierarchy has been used to help with the matching by User:Mahir256 (and User:1-Byte?). Complex constraints are also a good idea - your query is useful. Similarly some Australian areas changed in 2016, and this set uses the old areas. I suggest just attaching the ID to the former entities if that's what it was. I believe the GADM intends to release later revisions which will have different codes. --99of9 (talk) 22:47, 29 October 2020 (UTC)[reply]
I've improved the query above. It shows up quite a few possible hierarchy problems. --99of9 (talk) 07:49, 30 October 2020 (UTC)[reply]
@Salgo60, 1-Byte, VIGNERON: --99of9 (talk) 07:50, 30 October 2020 (UTC)[reply]
Thank you for the query. I was able to use it to fix some errors. In Switzerland, I noticed that some GADM IDs don't follow the hierarchy and will probably remain "broken". --1-Byte (talk) 16:08, 2 November 2020 (UTC)[reply]

SWE[edit]

@Larske: can you understand why we get the follow errors in Sweden with the above query

- Salgo60 (talk) 23:16, 6 November 2020 (UTC)[reply]

@Salgo60: The reason is that these three municipalities have changed county, but seem to have a GADM-ID according to their previous county belonging:
I notice that there are some gaps, i.e. some counties and municipalites in Sweden do not yet have a value for GADM ID (P8714). I guess that at least all present counties and municipalities should have a value.
  • Link to query giving a list of all current counties and municipalites.
As can be seen from the above list, right now GADM ID (P8714) is missing for 7 out of 21 counties and for 10 out of 290 municipalites.
Unfortunately the web site indicated with source website for the property (P1896) for GADM ID (P8714) is not very responsive, so I can't find and add the missing codes.
Is this a good source? It says "@2018" and "Version 4 will be released in April 2020.".
--Larske (talk) 04:39, 7 November 2020 (UTC)[reply]
@Larske: many thanks Larske, my brain is to slow for things like this. My guess is that its good that we connect with them but maybe they should update the data they have with what we have in Wikidata for countries that are well maintained see my comment below "Odd labels". My understanding this import is a project by 99of9 the same user who created Wikidata:Entity_Explosion and I think lesson learned is as you say and Toby says above Similarly some Australian areas changed in 2016, and this set uses the old areas. that they use old data and maybe we can give them feedback... - Salgo60 (talk) 08:46, 7 November 2020 (UTC)[reply]
The reason I think this set is worth it, even for old administrative areas, is that it is used in the GBIF which is a very serious player in the biodiversity field. Not many properties can link places with the species in those places. So I think it's worth it, even if they never do update their regions. But of course it would be great if they did. --99of9 (talk) 13:38, 8 November 2020 (UTC)[reply]

Odd labels[edit]

@99of9: I feel the labels in the data could be better maybe the numbering scheme is our friend

Maybe this list will help Wikidata:WikiProject_Country_subdivision/List_of_subdivisions - Salgo60 (talk) 10:33, 30 October 2020 (UTC)[reply]

  • Agreed. Unfortunately I didn't think of that in advance, and it's not easy to change the descriptions after set creation. But now that you know the structure you can hover over the link when matching to see if it is level 2 or 3. --99of9 (talk) 11:11, 30 October 2020 (UTC)[reply]
Best would be if we could give them feedback. I think I have matched everything in Sweden now
- Salgo60 (talk) 09:42, 1 November 2020 (UTC)[reply]