User:MisterSynergy/misc/sitelink badges

From Wikidata
Jump to navigation Jump to search

Overview[edit]

List of badges[edit]

badge related project pages related categories related templates
general badge items
featured article badge (Q17437796) Wikipedia:Featured articles (Q16465) Category:Featured articles (Q4387444) Template:Featured article (Q5626124)
good article badge (Q17437798) Wikipedia:Good articles (Q19765) Category:Wikipedia good articles (Q7045856) Template:Good article (Q5303)
recommended article (Q17559452) Wikipedia:Recommended articles (Q65186) Category:Recommended articles (Q9793101) Template:Recommended article (Q13402307)
featured list badge (Q17506997) Wikipedia:Featured lists (Q3917058) Category:Featured lists (Q5873672), Category:Wikipedia featured lists (Q8101833) Template:Featured list (Q5857568)
good list badge (Q51759403)[t 1] Project:Good lists (Q18918271) Category:Good lists (Q9398415) Template:Good list (Q26145522)
featured portal badge (Q17580674) Wikipedia:Featured portals (Q6540291) Category:Featured portals (Q10883142), Category:Wikipedia featured portals (Q7657513) Template:Featured portal (Q10567225)
Wikisource (Q263)-specific badge items[t 2][t 3]
not proofread (Q20748091) N/A Category:Index Not-Proofread (Q15634469) (Index pages), Category:Not proofread (Q15627010) (Page pages)
proofread (Q20748092) N/A Category:Index Proofread (Q15634468) (Index pages), Category:Proofread (Q15627006) (Page pages)
validated (Q20748093) N/A Category:Index Validated (Q15634466) (Index pages), Category:Validated (Q15629403) (Page pages)
problematic (Q20748094) N/A Category:Problematic (Q15629407) (Page pages)
digital document (Q28064618)[t 4] N/A ?
Other badge items that cannot be used with sitelinks[t 5]
featured topic badge (Q6540326) Project:Featured topics (Q21942631) Category:Featured topics (Q8445239) Template:Featured topic box (Q6293417)
Did you know article (Q17507019) Wikipedia:Did you know (Q3184032) Category:Wikipedia Did you know (Q6399482) Template:Did you know (Q5826993)
A-Class articles (Q17580678) WikiProject assessment (Q10980800) Category:A-Class articles (Q9415587) none
B-Class articles (Q17580679) Category:B-Class articles (Q7046164)
C-Class articles (Q17580680) Category:C-Class articles (Q8333717)
top-importance article (Q17580682) Wikipedia:Version 1.0 Editorial Team (Q10995373) Category:Top-importance articles (Q6801257) ?
  1. This badge seems to be existing on ptwiki only; per phab:T190976 it should also exist on eswiki, but it seems that this was a confusion.
  2. Initially requested at phab:T97014
  3. Categories seem to be inconsistently interwikilinked…
  4. Requested at phab:T153186
  5. Via this query

Statistical queries[edit]

General statistics of badge use[edit]

SELECT ?badge ?badgeLabel (COUNT(*) AS ?cnt) WHERE {
  ?sitelink wikibase:badge ?badge .
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?badge ?badgeLabel
Try it!

Badge use of a particular Wikimedia project[edit]

SELECT ?badge ?badgeLabel (COUNT(*) AS ?cnt) WHERE {
  ?sitelink schema:isPartOf <https://de.wikipedia.org/>; wikibase:badge ?badge .
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?badge ?badgeLabel
Try it!

Used badges by badge and Wikimedia project[edit]

SELECT ?project ?badgeLabel (COUNT(?sitelink) AS ?cnt) WHERE {
# available badges: wd:Q17437796 wd:Q17437798 wd:Q17559452 wd:Q17506997 wd:Q17580674 wd:Q51759403 wd:Q20748092 wd:Q20748091 wd:Q20748093 wd:Q20748094 wd:Q28064618
  VALUES ?badge {
    wd:Q17437796 wd:Q17437798 wd:Q17559452 wd:Q17506997 wd:Q17580674 wd:Q51759403 wd:Q20748092 wd:Q20748091 wd:Q20748093 wd:Q20748094 wd:Q28064618
  }
  ?sitelink schema:isPartOf ?project; wikibase:badge ?badge .
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} GROUP BY ?project ?badgeLabel ORDER BY ASC(?badgeLabel) DESC(?cnt)
Try it!

Maintenance queries[edit]

Inappropriate use of wikisource badges[edit]

SELECT ?badge ?badgeLabel ?sitelink ?wikiGroup ?item WITH {
  SELECT ?sitelink ?item ?badge WHERE {
    VALUES ?badge { wd:Q28064618 wd:Q20748094 wd:Q20748093 wd:Q20748092 wd:Q20748091 }
    ?sitelink wikibase:badge ?badge; schema:about ?item .
  }
} AS %subquery WHERE{
  INCLUDE %subquery .
  ?sitelink schema:isPartOf/wikibase:wikiGroup ?wikiGroup .
  FILTER(?wikiGroup != 'wikisource') .
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Try it!

List badges on non-list items[edit]

Many of these cases could be okay or "okay". The issue here is that quite a lot of list articles are merged with a non-list item.

SELECT ?badge ?badgeLabel ?sitelink ?item WHERE {
  VALUES ?badge { wd:Q51759403 wd:Q17506997 }
  ?sitelink wikibase:badge ?badge; schema:about ?item .
  MINUS { ?item wdt:P31/wdt:P279* wd:Q13406463 }
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Try it!

Portal badge on non-portal items[edit]

SELECT ?sitelink ?item WHERE {
  ?sitelink wikibase:badge wd:Q17580674; schema:about ?item .
  MINUS { ?item wdt:P31/wdt:P279* wd:Q4663903 }
  SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}
Try it!