Property talk:P10280
Documentation
category containing the honorary citizens of a settlement (administrative unit, country). Honorary citizens may or may not be citizens of the country
List of violations of this constraint: Database reports/Constraint violations/P10280#Target required claim P971, SPARQL
if [item A] has this property (category for honorary citizens of entity (P10280)) linked to [item B],
then [item B] should also have property “category combines topics (P971)” linked to [item A]. (Help)
List of violations of this constraint: Database reports/Constraint violations/P10280#inverse, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P10280#single best value, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P10280#Unique value, SPARQL (every item), SPARQL (by value)
List of violations of this constraint: Database reports/Constraint violations/P10280#Type Q618123, Q2221906, Q15642541, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P10280#Item P17, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P10280#Scope, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P10280#Entity types
List of violations of this constraint: Database reports/Constraint violations/P10280#Target required claim P971, SPARQL
(Help)
Violations query:
SELECT DISTINCT ?item ?hc WHERE { ?hc wdt:P279+ wd:Q987080; wdt:P910 ?item. MINUS { [] ps:P10280 ?item } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#potential values (from subclass of honorary citizenship)
todo: check if category can be added to place with P10280 (Help)
Violations query:
SELECT DISTINCT ?item ?place WHERE { ?item wdt:P971 wd:Q987080. MINUS { _:b6 ps:P10280 ?item. } ?item wdt:P971 ?place. ?place wdt:P625 ?loc. FILTER NOT EXISTS { ?item wdt:P971/wdt:P31 wd:Q24571886 } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#potential values (from category combines topic = honorary citizenship) with coordinates, version 2
todo: determine place (Help)
Violations query:
SELECT ?item (SAMPLE(?l) as ?sample) (lang(?sample) as ?lang) (COUNT(?l) as ?count) WHERE { ?item wdt:P971 wd:Q987080 . FILTER NOT EXISTS { ?item wdt:P971/wdt:P31 wd:Q24571886 } MINUS { [ ] ps:P10280 ?item } ?item rdfs:label ?l . FILTER NOT EXISTS { ?item wdt:P971/wdt:P625 [ ] } FILTER NOT EXISTS { ?item wdt:P971 wd:Q13406463 } FILTER (?item NOT IN (wd:Q32624889, wd:Q32466008)) } GROUP BY ?item
List of this constraint violations: Database reports/Complex constraint violations/P10280#potential values (from category combines topic = honorary citizenship), version 2
fix label or adjust regex for language at Property:P10280#P1552: complex constraint value label (Q100884525) (Help)
Violations query:
SELECT ?item ?lang ?l ?value ?v ?t WHERE { hint:Query hint:optimizer "None". wd:P10280 p:P1552 [ ps:P1552 wd:Q100884525 ; pq:P8770 ?t ] BIND( lang(?t) as ?lang) ?item wdt:P10280 ?value. OPTIONAL { ?item rdfs:label ?l . FILTER(lang(?l) = ?lang) } ?value rdfs:label ?v . FILTER(lang(?v) = ?lang) FILTER ( !REGEX(str(?v), str(?t) ) ) } # ORDER BY ?lang ?v
List of this constraint violations: Database reports/Complex constraint violations/P10280#value label (1: should match regex)
determine a regex and add it at Property:P10280#P1552: complex constraint value label (Q100884525) (Help)
Violations query:
SELECT ?item ?lang (COUNT(*) as ?count) (SAMPLE(?l) as ?sample_l) (SAMPLE(?s) as ?sample_s) (SAMPLE(?value) as ?sample_value) WHERE { hint:Query hint:optimizer "None". ?s wdt:P10280 ?value . ?value rdfs:label ?l . BIND(lang(?l) as ?lang) OPTIONAL { wd:P10280 p:P1552 [ ps:P1552 wd:Q100884525 ; pq:P8770 ?t ] FILTER( lang(?t) = ?lang) } FILTER( !BOUND(?t) ) ?item wdt:P424 ?lang ; wdt:P305 [] . } GROUP BY ?item ?lang HAVING ( ?count > 4) ORDER BY DESC ( ?count)
List of this constraint violations: Database reports/Complex constraint violations/P10280#value label (1: languages lacking a regex)
compares label of value with label of subject per regex for language at Property:P10280#P1552: complex constraint value label template (Q100883797) (Help)
Violations query:
SELECT ?item ?lang ?l ?value ?v ?t ?check WHERE { hint:Query hint:optimizer "None". wd:P10280 p:P1552 [ ps:P1552 wd:Q100883797 ; pq:P8770 ?t ] BIND( lang(?t) as ?lang) ?item wdt:P10280 ?value . FILTER (?item != wd:Q65619919) . ?item rdfs:label ?l . FILTER(lang(?l) = ?lang) ?value rdfs:label ?v . FILTER(lang(?v) = ?lang) BIND ( REPLACE(str(?l), "^(.+)$", str(?t)) as ?check) FILTER ( !REGEX(str(?v), ?check) ) } LIMIT 350
List of this constraint violations: Database reports/Complex constraint violations/P10280#value label (experimental)
todo: add P1753 statement on the relevant category; P2354 on item for citizenship or, at last, P2354 on the item for the city (Help)
Violations query:
SELECT ?item ?article ?category ?wiki WHERE { hint:Query hint:optimizer "None". ?cat wdt:P971 wd:Q987080, wd:Q13406463 . [] schema:about ?cat ; schema:isPartOf ?part ; schema:name ?catname . BIND( strbefore(strafter(str(?part), "//"),"/") as ?wiki) BIND( str(?catname) as ?category) SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint ?wiki; wikibase:api "Generator"; mwapi:generator "categorymembers"; mwapi:gcmtitle ?category ; mwapi:gcmprop "title"; mwapi:gcmlimit "max". ?article wikibase:apiOutput mwapi:title. ?item wikibase:apiOutputItem mwapi:item. } FILTER(bound(?item)) FILTER NOT EXISTS { [] wdt:P2354 ?item } FILTER NOT EXISTS { [] wdt:P1753 ?item } FILTER NOT EXISTS { ?item wdt:P279 wd:Q987080 } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#lists possibly to be associated with categories
todo: add missing P301 (Help)
Violations query:
SELECT DISTINCT ?item ?hc WHERE { [] ps:P10280 ?item . ?hc wdt:P910 ?item . MINUS { ?item wdt:P301 ?hc } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#categories lacking "category's main topic" (P301), but are values of "topic's main category" (P910)
todo: TBD (Help)
Violations query:
SELECT DISTINCT ?item ?hc WHERE { _:b2 ps:P10280 ?item. ?hc wdt:P2517 ?item. MINUS { ?item wdt:P301 ?hc. } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#categories lacking "category's main topic" (P301), but are values of "category for recipients of this award" (P2517)
todo: TBD (Help)
Violations query:
SELECT DISTINCT ?item ?hc WHERE { [ ] ps:P10280 ?item. ?item wdt:P301 ?hc. MINUS { ?hc wdt:P279 wd:Q987080 } MINUS { ?hc wdt:P279 wd:Q110713305 } MINUS { ?hc wdt:P279 wd:Q16687686 } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#categories with "category's main topic" (P301)-value that lacks relevant P279
todo: TBD (Help)
Violations query:
SELECT DISTINCT ?item ?hc ?country WHERE { ?place wdt:P10280 ?item ; wdt:P17 ?country. ?item wdt:P301 ?hc. MINUS { ?hc wdt:P17 ?country } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#categories with "category's main topic" (P301)-value that lacks "country" (P17)
add P2354 statement (Help)
Violations query:
SELECT DISTINCT ?item ?hc ?list WHERE { [] wdt:P10280 ?item . ?item wdt:P301 ?hc ; wdt:P1753 ?list . MINUS { ?hc wdt:2354 ?list } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#categories with "list related to category" (P1753)-value not also on item for citizenship with "has list" (P2354)
add P2354 statement (Help)
Violations query:
SELECT DISTINCT ?item ?hc ?list WHERE { [] wdt:P10280 ?item . ?item wdt:P301/wdt:P2354 ?list . MINUS { ?item wdt:P1753 ?list } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#categories for honorary citizenship with "has list" (P2354), but not as "list related to category" (P1753)-value
todo: TBD, if there is s category: link it (Help)
Violations query:
SELECT DISTINCT ?item ?c { ?item wdt:P279+ wd:Q987080. FILTER NOT EXISTS { ?item wdt:P910 [ ] } FILTER NOT EXISTS { ?item wdt:P2517 [ ] } OPTIONAL { ?item wdt:P17/wdt:P297 ?c } }
List of this constraint violations: Database reports/Complex constraint violations/P10280#subclasses of honorary citizenship without a category
see Property talk:P10280#Putting categories to use; for model A, see Property_talk:P10280#Model_for_Q5 (Help)
Violations query:
SELECT ?item ?article ?cat ?category ?wiki ?hc WHERE { hint:Query hint:optimizer "None". ?place wdt:P10280 ?cat ; wdt:P17 wd:Q191 . [] schema:about ?cat ; schema:isPartOf ?part ; schema:name ?catname ; schema:inLanguage "et" . BIND( strbefore(strafter(str(?part), "//"),"/") as ?wiki) BIND( str(?catname) as ?category) SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint ?wiki; wikibase:api "Generator"; mwapi:generator "categorymembers"; mwapi:gcmtitle ?category ; mwapi:gcmprop "title"; mwapi:gcmlimit "max". ?article wikibase:apiOutput mwapi:title. ?item wikibase:apiOutputItem mwapi:item. } FILTER(bound(?item)) ?item wdt:P31 wd:Q5 . ?cat wdt:P301 ?hc . FILTER NOT EXISTS { ?item p:P166/ps:P166 ?hc } } LIMIT 100
List of this constraint violations: Database reports/Complex constraint violations/P10280#missing honorary citizenships (country: Estonia, categories: etwiki, model A only)
see Property talk:P10280#Putting categories to use; for model B, see Property_talk:P10280#Model_for_Q5. Check for existing statements may be incomplete (Help)
Violations query:
SELECT ?item ?article ?cat ?category ?wiki ?place WHERE { hint:Query hint:optimizer "None". ?place wdt:P10280 ?cat ; wdt:P17 wd:Q191 . [] schema:about ?cat ; schema:isPartOf ?part ; schema:name ?catname ; schema:inLanguage "et" . BIND( strbefore(strafter(str(?part), "//"),"/") as ?wiki) BIND( str(?catname) as ?category) SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint ?wiki; wikibase:api "Generator"; mwapi:generator "categorymembers"; mwapi:gcmtitle ?category ; mwapi:gcmprop "title"; mwapi:gcmlimit "max". ?article wikibase:apiOutput mwapi:title. ?item wikibase:apiOutputItem mwapi:item. } FILTER(bound(?item)) ?item wdt:P31 wd:Q5 . FILTER NOT EXISTS { ?cat wdt:P301 ?hc } FILTER NOT EXISTS { [ ] wdt:P2517 ?cat } FILTER NOT EXISTS { ?item p:P166 [ps:P166 wd:Q987080 ; pq:P642 ?place ] } FILTER NOT EXISTS { ?item p:P166 [ps:P166 wd:Q987080 ; pq:P1027 ?place ] } } LIMIT 100
List of this constraint violations: Database reports/Complex constraint violations/P10280#missing honorary citizenships (country: Estonia, categories: etwiki, model B only)
see Property talk:P10280#Putting categories to use; for model A, see Property_talk:P10280#Model_for_Q5 (Help)
Violations query:
SELECT ?item ?article ?cat ?category ?wiki ?hc WHERE { hint:Query hint:optimizer "None". ?place wdt:P10280 ?cat ; wdt:P17 wd:Q37 . [] schema:about ?cat ; schema:isPartOf ?part ; schema:name ?catname ; schema:inLanguage "lt" . BIND( strbefore(strafter(str(?part), "//"),"/") as ?wiki) BIND( str(?catname) as ?category) SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint ?wiki; wikibase:api "Generator"; mwapi:generator "categorymembers"; mwapi:gcmtitle ?category ; mwapi:gcmprop "title"; mwapi:gcmlimit "max". ?article wikibase:apiOutput mwapi:title. ?item wikibase:apiOutputItem mwapi:item. } FILTER(bound(?item)) ?item wdt:P31 wd:Q5 . ?cat wdt:P301 ?hc . FILTER NOT EXISTS { ?item p:P166/ps:P166 ?hc } } LIMIT 100
List of this constraint violations: Database reports/Complex constraint violations/P10280#missing honorary citizenships (country: Lithuania, categories: ltwiki, model A only)
see Property talk:P10280#Putting categories to use; for model A, see Property_talk:P10280#Model_for_Q5 (Help)
Violations query:
SELECT ?item ?article ?cat ?category ?wiki ?hc WHERE { hint:Query hint:optimizer "None". ?place wdt:P10280 ?cat ; wdt:P17 wd:Q37 . [] schema:about ?cat ; schema:isPartOf ?part ; schema:name ?catname ; schema:inLanguage "de" . BIND( strbefore(strafter(str(?part), "//"),"/") as ?wiki) BIND( str(?catname) as ?category) SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint ?wiki; wikibase:api "Generator"; mwapi:generator "categorymembers"; mwapi:gcmtitle ?category ; mwapi:gcmprop "title"; mwapi:gcmlimit "max". ?article wikibase:apiOutput mwapi:title. ?item wikibase:apiOutputItem mwapi:item. } FILTER(bound(?item)) ?item wdt:P31 wd:Q5 . ?cat wdt:P301 ?hc . FILTER NOT EXISTS { ?item p:P166/ps:P166 ?hc } } LIMIT 100
List of this constraint violations: Database reports/Complex constraint violations/P10280#missing honorary citizenships (country: Lithuania, categories: dewiki, model A only)
see Property talk:P10280#Putting categories to use; for model A, see Property_talk:P10280#Model_for_Q5 (Help)
Violations query:
SELECT ?item ?article ?cat ?category ?wiki ?hc WHERE { hint:Query hint:optimizer "None". ?place wdt:P10280 ?cat ; wdt:P17 wd:Q28 . [] schema:about ?cat ; schema:isPartOf ?part ; schema:name ?catname ; schema:inLanguage "de" . BIND( strbefore(strafter(str(?part), "//"),"/") as ?wiki) BIND( str(?catname) as ?category) SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint ?wiki; wikibase:api "Generator"; mwapi:generator "categorymembers"; mwapi:gcmtitle ?category ; mwapi:gcmprop "title"; mwapi:gcmlimit "max". ?article wikibase:apiOutput mwapi:title. ?item wikibase:apiOutputItem mwapi:item. } FILTER(bound(?item)) ?item wdt:P31 wd:Q5 . ?cat wdt:P301 ?hc . FILTER NOT EXISTS { ?item p:P166/ps:P166 ?hc } } LIMIT 100
List of this constraint violations: Database reports/Complex constraint violations/P10280#missing honorary citizenships (country: Hungary, categories: dewiki, model A only)
Discussion/Notes
editTypes of categories and single value constraint
editWhen trying to find values, I noticed there are three or four different types of categories:
- 1. current: categories for people who received the honorary citizenship of the place. Sample: Q182872#P10280 = Q106626312.
- 2. former: categories for people who once received the honorary citizenship of the place, but which was revoked. Sample: Q64#P10280 = Q41821371
- 3. of former city/under a past government: categories for people who received the honorary citizenship of the place sometimes in the past. Sample: [1]
- 4. of a place within a region/country: categories for people who received a honorary citizenship of a place within a region. The problem with these is that people don't hold the citzenship of the region. Sample: Q16#P10280 = Q104903811
- 5. a combination of some of the above
Despite the single value constraint, I think all of the above can be added with this property. I used preferred rank for (1), if it coexists with (2) or (3). Sample: Q16#P10280.
(1) and also (2) and (3) can be used to add statements to items for persons more or less directly, but this is more complicated with (4). --- Jura 08:32, 31 January 2022 (UTC)
Complex constraints
editTo identify elements that could be added, there are a series of complex constraints.
Some are more useful than others and the bot has/had problems with queries that do work when run manually. --- Jura 08:32, 31 January 2022 (UTC)
Types of "honorary citizenship"
editSee Talk:Q16687686 for some discussion.
Also note Q987080#P1889 --- Jura 08:32, 31 January 2022 (UTC)
Types of statements on items for people
editModel for Q5
editIt seems there are two models in use:
- (a) There is an item for a place's honorary citizenship. Sample: honorary citizen of Tartu (Q18626251). This can be added to a person's item directly, ideally with some reference and the date it was granted. See Special:WhatLinksHere/Q18626251
- (b) There is no item for a place's honorary citizenship. In that case, honorary citizenship (Q987080) is used [2]. Alternatively, more specific items are used, sample: Worthy of the City (Q110713305). The place is added with some qualifier (e.g. "of").
The advantage of P10280 seems to be that it can work with the second. --- Jura 08:32, 31 January 2022 (UTC)
World map
editHere a query that places all people on a world map:
- Items used: honorary citizenship (Q987080)
- Properties used: subclass of (P279) , conferred by (P1027) , facet of (P1269) , coordinate location (P625) , image (P18) , date of death (P570) , date of birth (P569) , award received (P166) , of (P642)
- Features used: map (Q24515275)
#title:World Map of honorary citizens
#defaultView:Map{"hide":["?coordinates", "?layer"]}
SELECT DISTINCT
?site ?siteLabel
?coordinates
?p ?pLabel ?pDescription
?born ?died
?image
?layer
WHERE
{
{ ?st ps:P166/wdt:P279? wd:Q987080 . ?st (pq:P642 | pq:P1027) ?site . ?p p:P166 ?st }
UNION
{ ?hc wdt:P279/wdt:P279? wd:Q987080 . ?p p:P166/ps:P166 ?hc . ?hc ( wdt:P1027 | wdt:P1269 ) ?site }
?site wdt:P625 ?coordinates.
OPTIONAL { ?p wdt:P18 ?image }
OPTIONAL { ?p wdt:P570 ?dod .
BIND(YEAR(?dod) as ?died)
BIND(CONCAT(str(FLOOR(YEAR(?dod)/100)),"th century") as ?l) }
OPTIONAL { ?p wdt:P569 ?dob . BIND(YEAR(?dob) as ?born) }
BIND(COALESCE(?l, "") as ?layer)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,es,pl,cs,de,ru,be,uk" }
}
--- Jura 08:32, 31 January 2022 (UTC)
Stray categories with few members
editIt seems that dewiki has a large number of categories for this. Partially because the concept is or was widely used in Germany, but it also includes categories for places in other countries, some with a few or just 1 member. These "translated categories" may or may not be very reliable to find statements to add to people items.
Sample: Q19473334. The two articles in that category mention honorary citizenship without any reference. Also similar text in enwiki doesn't have any reference. I added {{Fact}}
for one [3]. --- Jura 08:32, 31 January 2022 (UTC)
Putting categories to use
editMaybe a good sample to show how we can put these to use is: et:Kategooria:Eesti linnade aukodanikud.
The categories seem to be reasonably maintained and the Wikipedia is written in the language these were granted.
I linked the relevant categories to the cities and the citizenship items from the categories.
This query finds people in the categories without corresponding award received (P166) statements. It can be adapted to other languages.
Here some that could be added: Special:WhatLinksHere/Q18626251. --- Jura 08:32, 31 January 2022 (UTC)
Summary above
editAbove, I added a few notes from my experiments in the field. Don't hesitate to correct/fix/expand.
@Palotabarát, Infovarius, Silesianus, Арсенич, Krassotkin: @Taravyvan Adijene, Jklamo, Arbnos, Lectrician1, MasterRus21thCentury: --- Jura 08:33, 31 January 2022 (UTC)
- Well, I just wish You could add example of complex constraint value label (Q100884525) for use in Belarusan (classical orthography) language ;) (to the has characteristic (P1552)). --Taravyvan Adijene (talk) 09:56, 31 January 2022 (UTC)
- "Катэгорыя:Ганаровыя грамадзяне .+" should work.
- For most values a "value label template" constraint could also be made to work: "Катэгорыя:Ганаровыя грамадзяне $1?.*" --- Jura 16:55, 31 January 2022 (UTC)