Page MenuHomePhabricator

Using Wikidata in Wikivoyage Listings
Open, Needs TriagePublic

Description

The Wikivoyage listing tags should be able to use data from Wikidata. Based on a Wikidata parameter the opening hours, contact details, location etc. should be loaded from Wikidata. Finally a listing entry should only a have a single parameter (Wikidata).

Mappings with Wikidata properties are available at https://www.wikidata.org/wiki/Wikidata:Wikivoyage/Resources

It should be investigated whether it's sufficient to edit the template {{listing}} (or a related Lua module) or if the listing extension needs to be manipulated. Furthermore Wikidata information could be used by the dynamic Wikivoyage maps.

Event Timeline

One of the issues currently preventing this at Wikivoyage seems to be that:

for many of the standard-sized articles, the number of items to load would be too high. Wikivoyage would need a higher limit than other sites.

I think this could be a good sample of using Wikidata to edit listings.

I think this shouldn't prevent us from creating the technical possibility of using Wikidata. And secondly we're going to need further discussions on Wikidata about the thousands of items for restaurants etc. which don't exist yet.

I think technically it's already possible (arbitrary access is available).

Yes. But can we omit the location parameters without breaking the parsing for the Kartographer maps? And on which level should the insertion of Wikidata info ideally happen (in the templates / modules / in the extension)?

We have now https://en.wikivoyage.org/wiki/Template:Listing/test (and https://en.wikivoyage.org/wiki/Module:Listing) which show that the integration of Wikidata data is generally possible. The discussion at Wikivoyage:Travellers' pub suggests that we should create gadgets / tools which "hide" the highly complicated aspects of Wikidata as best as possible. I propose the following:

ruwiki has a framework used for a series of editing interfaces (e.g. people, works, taxa, movies) similar to the one at Wikivoyage:

https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:WE-Framework

These edit directly Wikidata.

This looks very good. I guess the main difference is that one Wikivoyage page refers to multiple listing Wikidata items. Do you think the framework coud be extended in this way?

I suppose if it depends if you find someone who'd work on it.

I think it was written by [[User:Vlsergey]], but he isn't currently active.

Please note Template_talk:Listing#Load_Wikidata_label

Inclusion of items in Listings at enwikivoyage is now visible on Wikidata (sample ).

Pppery subscribed.

Is this still relevant? Normally I could call this task a request to make edits on-wiki, which is not something generally within Phabricator's scope.

Since about 7 years, at the German Wikivoyage a listing template (vCard) was developed which supports Wikidata import, too. The templates (vCard, Marker) are used already at the Spanish Wikivoyage, and we are preparing now the use them at the Japanese Wikivoyage. All parameters mentioned by T.seppelt are supported. The values of about 50 parameters can be fetched from Wikidata as can be seen from the ParWD table in https://de.wikivoyage.org/wiki/Modul:VCard/Params . We propose to use at least two parameters like {{vCard/listing | name = aLocation | wikidata = Q12345678 }}. The name is only for readability and not necessary. The project is huge: There are about 30 Lua modules with 11.000 lines and 400 kBytes. It seems impossible to extend the existing tools at English Wikivoyage.

There are tools to work with these templates like ListingInfo (a taxi driver info dialog) and the ListingEditor. Now I am making some improvements on the ListingEditor to load it only on demand.

The Lua modules are critical in terms of time because of the high Wikidata (about 30 %) and Kartographer (about 40 %) access times. So, a set of tables were prepared to reduce the the number of Wikidata accesses to nearly about 1. As an example, at the article of https://de.wikivoyage.org/wiki/Halle_(Saale) about 250 listings are used which takes a computing time of about 4 sec. The computing time for a single template is between 12 and 60 msec.

Several times I gave the hint of these tools to the English community. But (nearly) nobody was interested in.

One thing I should mention: There is no (automatic) export because of the high complexity of the Wikidata datasets and properties. I will discuss with Lydia from the Wikidata team how a manual interaction between the ListingEditor and Wikidata could be realized.