Property talk:P6720

From Wikidata
Jump to navigation Jump to search

Documentation

interwiki prefix at Wikimedia
prefix used for the website on Wikimedia Foundation wikis. Qualify with "formatter URL" (P1630) from Special:Interwiki. If the URL changes, add the qualifier "end date" and create a new statement with new formatter.
Data typeExternal identifier
Domainwebsite (Q35127), Wikimania (Q483279), organization (Q43229), persistent identifier (Q420330), work (Q386724) or Wikidata property (Q18616576)
Usage notesDon't include the colon (":"). Qualify with formatter url (P1630). Don't use for/confuse with interlanguage links (sample: "en:").
ExampleWikimedia Meta-Wiki (Q1063116)meta
Wikidata (Q2013)d
English Wikipedia (Q328)wikipedia
English Wikipedia (Q328)w
Wikimedia Commons (Q565)c
Sourcehttps://meta.wikimedia.org/wiki/Special:Interwiki
https://www.mediawiki.org/wiki/Special:Interwiki
https://meta.wikimedia.org/wiki/Interwiki_map/detailed_table/former
https://sal.toolforge.org/production?p=0&q=interwiki
https://meta.wikimedia.org/wiki/Interwiki_map/detailed_table
https://meta.wikimedia.org/wiki/Talk:Interwiki_map
https://noc.wikimedia.org/conf/highlight.php?file=interwiki.php
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikimediaMaintenance/+/refs/heads/master/dumpInterwiki.php
https://meta.wikimedia.org/wiki/Interwiki_map
Formatter URLhttps://www.wikipedia.org/wiki/Special:Search/$1:
Lists
Proposal discussionProposal discussion
Current uses
Total676
Main statement66898.8% of uses
Qualifier50.7% of uses
Reference30.4% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
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/P6720#allowed qualifiers, SPARQL
Required qualifier “formatter URL (P1630): this property should be used with the listed qualifier. (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/P6720#mandatory qualifier, SPARQL
Required qualifier “start time (P580): this property should be used with the listed qualifier. (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/P6720#mandatory qualifier, SPARQL
Scope is as main value (Q54828448): 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/P6720#Scope, SPARQL
Item “official website (P856): Items with this property should also have “official website (P856)”. (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/P6720#Item P856, SPARQL
Label required in languages: en: Entities using this property should have labels in one of the following languages: en (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/P6720#Label in 'en' language, search, SPARQL
Allowed entity types are Wikibase item (Q29934200), Wikibase property (Q29934218): 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/P6720#Entity types

Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.)

official website uses https, but formatter http
https is generally preferred. If the website can be accessed with https, you may want to request an update at m:Talk:Interwiki_map#Requests_for_updates. Once the interwiki table updated, add an "s" to the formatter (Help)
Violations query: SELECT ?item ?iw (CONCAT("[[",?iw,":]]") as ?iwlinked) ?f ?ws { ?item p:P6720 ?st . ?st ps:P6720 ?iw . ?st pq:P1630 ?f . ?st a wikibase:BestRank . ?item wdt:P856 ?ws . FILTER( contains ( str(?ws), "https:") ) FILTER( CONTAINS( ?f, "http:") ) }
List of this constraint violations: Database reports/Complex constraint violations/P6720#official website uses https, but formatter http
http:
https is generally preferred. If the website can be accessed with https, you may want to request an update at m:Talk:Interwiki_map#Requests_for_updates. Once the interwiki table updated, add an "s" to the formatter. This generally lists prefixes also covered by some of the other checks. (Help)
Violations query: SELECT ?item ?iw (CONCAT("[[",?iw,":]]") as ?iwlinked) ?f { ?item p:P6720 ?st . ?st ps:P6720 ?iw . ?st pq:P1630 ?f . ?st a wikibase:BestRank . FILTER( CONTAINS( ?f, "http:") ) }
List of this constraint violations: Database reports/Complex constraint violations/P6720#http:
best rank, but end date
If the prefix/formatter is no longer in use (it has an end date) and no new prefix/formatter is defined, no value should be added with preferred rank. (Help)
Violations query: SELECT ?item ?iw (CONCAT("[[",?iw,":]]") as ?iwlinked) ?f ?ws { ?item p:P6720 ?st . ?st ps:P6720 ?iw . ?st pq:P1630 ?f . ?st a wikibase:BestRank . ?st pq:P582 [] . }
List of this constraint violations: Database reports/Complex constraint violations/P6720#best rank, but end date
formatter URL domain not in official website(s)
Official website (P856) should include the domain used by the formatter URL qualifier. TODO: Add P856 statement, set current website to preferred rank. (Help)
Violations query: SELECT ?item ?iw ?f ?domain_f ?ws ?domain_ws WHERE { ?item p:P6720 ?st . ?st ps:P6720 ?iw . ?st pq:P1630 ?f . ?st a wikibase:BestRank . BIND(REPLACE(REPLACE(REPLACE(str(?f), "^.*//", ""), "/.*", ""), "^www\\.", "") as ?domain_f) FILTER NOT EXISTS { ?item p:P856 / ps:P856 ?ws0 . BIND(REPLACE(REPLACE(REPLACE(CONCAT(str(?ws0),"/"), "^.*//", ""), "/.*", ""), "^www\\.", "") as ?domain_ws0) FILTER( CONTAINS( ?domain_ws0, lcase(?domain_f) ) ) } FILTER NOT EXISTS { ?item p:P856 / ps:P856 ?ws1 . BIND(REPLACE(REPLACE(REPLACE(CONCAT(str(?ws1),"/"), "^.*//", ""), "/.*", ""), "^www\\.", "") as ?domain_ws1) FILTER( CONTAINS( lcase(?domain_f), ?domain_ws1 ) ) } }
List of this constraint violations: Database reports/Complex constraint violations/P6720#formatter URL domain not in official website(s)
item has dissolved date
item has dissolved, abolished or demolished date (P576). If this is correctly applied (i.e. the website is deleted), an update should be requested at m:Talk:Interwiki_map. Once the interwiki map is updated, the relevant changes should be done. This can be do add an end date qualifier to the statement and a new statement with "no value" in preferred rank. (Help)
Violations query: SELECT ?item ?value ?abolisheddate { ?item wdt:P6720 ?value; wdt:P576 ?abolisheddate }
List of this constraint violations: Database reports/Complex constraint violations/P6720#item has dissolved date

Query

[edit]

Current list

[edit]
# Interwiki table from P6720, current values only
# by Jura1, 2021-04-03 https://www.wikidata.org/wiki/Property_talk:P6720
SELECT ?item ?itemLabel ?itemDescription ?interwiki ?formatter ?added ?wmdb
{
	?item p:P6720 ?st .
	?st ps:P6720 ?interwiki .
	?st a wikibase:BestRank .
	OPTIONAL { ?st pq:P1630 ?formatter }
	OPTIONAL { ?st pq:P580 ?added }
	FILTER NOT EXISTS { ?st pq:P582 [] }
	OPTIONAL { ?item wdt:P1800 ?wmdb }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

Entire list

[edit]
# Interwiki table from P6720, with end date for prefixes that are no longer in use
# by Jura1, 2021-03-26 https://www.wikidata.org/wiki/Property_talk:P6720
SELECT ?item ?itemLabel ?itemDescription ?interwiki ?formatter ?added ?ended
{
	?item p:P6720 ?st .
	?st ps:P6720 ?interwiki .
	?st wikibase:rank ?goodRanks.
	VALUES ?goodRanks { wikibase:NormalRank wikibase:PreferredRank }
	OPTIONAL { ?st pq:P1630 ?formatter }
	OPTIONAL { ?st pq:P580 ?added }
	OPTIONAL { ?st pq:P582 ?ended }
	SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

[edit]

No Wikidata property

[edit]

New per year

[edit]
#defaultView:BarChart
SELECT ?year (COUNT(DISTINCT ?iw) as ?count) 
{
  ?item p:P6720 [ ps:P6720 ?iw ; pq:P580 ?start ] 
  FILTER NOT EXISTS { 
    ?item p:P6720 [ ps:P6720 ?iw ; pq:P580 ?start2 ] 
    FILTER( ?start2 < ?start)                
    }
  BIND(str(YEAR(?start)) as ?year)                   
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en"  }
}
GROUP BY ?year

Try it!

Changes per year

[edit]
#defaultView:BarChart
SELECT ?year (COUNT(DISTINCT ?iw) as ?count) 
{
  ?item p:P6720 [ ps:P6720 ?iw ; pq:P580 ?start ] 
  BIND(str(YEAR(?start)) as ?year)                   
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en"  }
}
GROUP BY ?year

Try it!

Todo

[edit]

Discussion

[edit]

References

[edit]

From MxM, some entries get references in the format "reference URL: https://www.wikidata.org/wiki/<prefix>:". Given that Wikidata isn't generally allowed as reference URL, this creates a constraint violation. I'd remove these. Ideally, we would link to changes in wmf-config/interwiki.php, but I'm not quite sure how to add that. --- Jura 07:26, 31 March 2021 (UTC)[reply]

✓ Done --- Jura 07:54, 2 April 2021 (UTC)[reply]