Thank you! Very helpful!


--
Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
http://aharoni.wordpress.com
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬

2017-06-28 13:33 GMT+03:00 Lucas Werkmeister <mail@lucaswerkmeister.de>:

Sure, that’s a great idea! Here’s a query for the 100 most common templates by number of sitelinks (across all projects):

SELECT ?template ?templateLabel ?sitelinks WITH {
  SELECT ?template ?sitelinks WHERE {
    ?template wdt:P31/wdt:P279* wd:Q11266439;
              wikibase:sitelinks ?sitelinks.
  }
  ORDER BY DESC(?sitelinks)
  LIMIT 100
} AS %commonTemplates WHERE {
  INCLUDE %commonTemplates.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?sitelinks)

And since the query takes a while to run (about 15 to 30 seconds), I’ll paste the top ten results here:

wd:Q20739451 Template:FlowMention 720
wd:Q4299475 Template:Bot 640
wd:Q4844001 Template:Soft redirect 631
wd:Q4847311 Template:Db 620
wd:Q5461620 Template:Babel 504
wd:Q21042800 Template:LQT Moved thread stub converted to Flow 462
wd:Q4608595 Template:Documentation 450
wd:Q5400303 Template:! 446
wd:Q20950423 Template:Wikitext talk page converted to Flow 438
wd:Q21042795 Template:LQT post imported with different signature user 433

Grouping this by project is a bit trickier due to performance, but here’s a query for the most common templates across Wikivoyages:

SELECT ?template ?templateLabel ?sitelinks WITH {
  SELECT ?template (COUNT(?article) AS ?sitelinks) WHERE {
    ?template wdt:P31/wdt:P279* wd:Q11266439.
    ?article schema:about ?template;
             schema:isPartOf/wikibase:wikiGroup "wikivoyage".
  }
  GROUP BY ?template
  ORDER BY DESC(?sitelinks)
  LIMIT 100
} AS %commonTemplates WHERE {
  INCLUDE %commonTemplates.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?sitelinks)


The top ten results here are:

wd:Q5626735 Template:Infobox 30
wd:Q5621162 Template:Infobox country 26
wd:Q21680110 MediaWiki:Recentchangestext 18
wd:Q4847311 Template:Db 18
wd:Q14288116 Template:Pagebanner 17
wd:Q5611978 Template:Welcome 17
wd:Q4608595 Template:Documentation 17
wd:Q14330485 Template:Listing 16
wd:Q6148868 Template:Disambiguation 16
wd:Q4844001 Template:Soft redirect 16

You can repeat this project for each of the wikigroups with more than one project/edition (which you can find with this query; substitute "wikivoyage" in line 5 of the query with that value); unfortunately, I don’t think it’s possible to run them all in a single query without timeout.

Cheers,
Lucas


On 28.06.2017 12:06, Amir E. Aharoni wrote:
Forwarding from Wikimedia-L, because Wikidata may help with this a bit.

Is it possible to get a list of items that are Templates, and have the largest number of sitelinks?

This should probably be grouped by project. A template that is used in most Wikivoyages (for example) will have much less sitelinks than a template that is used in most Wikipedias, but it's still should be counted as it's relevant for this list.

--
Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
http://aharoni.wordpress.com
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬

---------- Forwarded message ----------
From: Amir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Date: 2017-06-28 9:32 GMT+03:00
Subject: Which templates should be global?
To: wikimedia-l ‫‎<wikimedia-l@lists.wikimedia.org>‎‬


Hallo,

TLDR: If you are an experienced editor on any Wikimedia project in any language, please add your ideas here:
https://meta.wikimedia.org/wiki/Which_templates_should_be_global

In more detail:

Continuing some recent discussions from Phabricator[1], Wikimedia Hackathon, and Wikimedia Developers Summit, I'd like to ask the wider community of editors in all projects:

Which templates could be useful for all Wikimedia projects, or at least for _many_ projects?

A lot of templates are replicated manually, and it's a problem that is well-known to all experienced editors. If there was a technology that allows templates to be more conveniently globally managed, which templates would you adapt to this technology first?

I started a list at https://meta.wikimedia.org/wiki/Which_templates_should_be_global . Please continue it! I'm very interested to hear from all projects and languages, not only the big Wikipedias, so spread the word.

Thanks!


--
Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
http://aharoni.wordpress.com
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬


_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata