One of the early promises of Wikidata was the improvement of lists on Wikipedia. These would be automatically generated and displayed, solving a number of problems:
- Solve inconsistent lists on the same topic across Wikipedias
- Keep all lists up-to-date
- Track all possible members of the list via items, instead of per-Wikipedia red links
- A single edit on Wikidata would propagate to all Wikipedias
Like many other features of Wikidata, this one has been delayed for some time now. With WDQ, and the upcoming SPARQL services, there are now several unofficial query services for Wikidata. It’s time to introduce a service for auto-generating lists now.
Which brings me to the pun of the blog entry title: It’s the German word for “outwitted”, but it could also be read as “super-listed”. Sadly, umlauts can still cause problems with non-German speakers and keyboards, so I run this tool under a biology pun name: Listeria (actually, a genus of bacteria).
How does this work? On Wikipedia (currently, English and German are supported, but it would be easy to add more), one adds a pair of templates to a Wiki page. Once a day (or on manual request), a bot finds those pages, reads the template parameters, and generates a WDQ-based list of items. The list is implemented as a table, to allow for various properties, including images, to accompany the entry. Items are linked to the respective article on the wiki, or to the Wikidata item if no article exists. The list can be auto-sectioned on a Wikidata property (e.g. the administrative unit of an item). Once generated, the bot compares the list with the one already on the page (between the two templates); if different, the bot replaces the list on the page with the new, up-to-date list.
My example page lists Dutch lighthouses, auto-sectioned by administrative unit. I made an English and a German version, using the same template code. They will both be updated at least once a day by the bot; the top template also generates a link to manually trigger the update for a specific page. Starting a new automatic list is as easy as inserting and filling the two templates into a page. So, Wikidata-based lists have arrived, after a fashion.
What’s that, you say? Your manual list contains more entries? Well, go to Wikidata, and create or link up items correctly so they all show on the automated list as well! Oh, your manual table contains more details? Add them to Wikidata! That way, any language edition of Wikipedia can enjoy the list and the information it contains. Also, comparing your list to the automatic one can highlight discrepancies, which may point to faulty information somewhere.
Don’t like lighthouses? How about 15th century composers instead, sectioned by nationality? Or 1980s video games, sectioned by company, ordered by date? Your imagination is the limit!
Now, if we only had numbers with units on Wikidata, so we could store the height of those lighthouses…
5 Comments
Very cool! Next step – Wiki Loves Monuments lists, no? It would be great to be able to build these dynamically from mobile coordinates in the language of the user so they can navigate to the proper upload campaign wizard on Commons in September (hint, hint)
Probably not useful as daily generated pages on a Wikipedia. I do have, however, this leftover from last year:
https://tools.wmflabs.org/wlmuk/index_wd.html
It’s run entirely off Wikidata, but has no upload (yet). The UK-only version with upload from last year is here:
https://tools.wmflabs.org/wlmuk/
That looks extremely useful, and I especially like it that it is the same for both mobile & desktop, so you can test by adding coords or using your house coords
Hi Magnus,
Thanks a lot for this! – Would there be a way to also include discreet links to the references backing up the various statements in the lists? – In order to convince Wikipedians of this approach to generating and curating lists, I would expect the traceability of references to be of utmost importance.
Beat Estermann: I’ll have a look, but at the moment, most of the data comes from WDQ, which does not store references. Using Wikidata proper is on the to-do-list.