Wikidata talk:How to use data on Wikimedia projects

From Wikidata
Jump to navigation Jump to search

Final edition[edit]

@Lea Lacroix (WMDE), Kvardek du: This is final version? This is may be prepared for translation? --Kaganer (talk) 16:29, 15 August 2017 (UTC)[reply]

Not final and needing some improvements, but could be prepared for translation for the moment, I think. Kvardek du (talk) 16:38, 15 August 2017 (UTC)[reply]

Illustration[edit]

Why they used the old File:Wikidata_statement.svg instead File:Datamodel_in_Wikidata.svg ? --Kaganer (talk) 16:32, 15 August 2017 (UTC)[reply]

Didn't that that File:Datamodel_in_Wikidata.svg existed. I changed. Kvardek du (talk) 16:37, 15 August 2017 (UTC)[reply]

Hello @Kvardek du:, what do you think about Wikidata:Data access? Topics are similar. Should we merge/rename/make it more clear? Lea Lacroix (WMDE) (talk) 02:36, 16 August 2017 (UTC)[reply]

@Lea Lacroix (WMDE): : I saw it before working on the page at Wikimania. For me it's clear that Data accesse is for every user of the data (scientist, other sites...) as the present page is specialized on Wikimedia projets, which are the only websites able to use the date via direct or arbitrary access. Until that changes, we should not merge the two pages. Kvardek du (talk) 02:47, 16 August 2017 (UTC)[reply]
Yeah as long as they are interlinked I think we should keep them separate. --Lydia Pintscher (WMDE) (talk) 17:50, 17 August 2017 (UTC)[reply]

Accessing qualifiers with the #statements parser function[edit]

How can I access the qualifiers of a specific statement in an item? For example:

  • {{#statements:P1612|from=Q2981}} will display "Notre-Dame de Paris"
  • {{#statements:P1435|from=Q2981}} will display "monument historique classé" . However, how can I access the value for qualifier "start time" inside this statement? --FrankAndProust (talk) 17:04, 12 December 2017 (UTC)[reply]
Hello @FrankAndProust:, this is not possible with the parser function. For this, you need to use Lua. Lea Lacroix (WMDE) (talk) 08:26, 13 December 2017 (UTC)[reply]
Since this particular discussion is quite old now and including qualifiers has been discussed quite often, is this a planned feature and maybe somewhere in Phabricator? Thanks YaguraStation (talk) 13:09, 8 July 2019 (UTC)[reply]
Hello @YaguraStation: accessing qualifiers from the parser functions is not planned. The parser functions are made for simple use cases, for more complex usage, it is more efficient to use Lua. Several very well-documented templates exist, for example WikidataIB on English Wikipedia, than one can take inspiration from. Lea Lacroix (WMDE) (talk) 10:30, 9 July 2019 (UTC)[reply]

Some Questions[edit]

Hello, I have some questions for using data from Wikidata in infoboxes:

  • How to get only the filename of an image?
  • How to get only the url of an link? (I don't want it clickable)
  • How to get only the the name of an identificator (f.e. I want the INSEE code from a french commune like [1])

--Sinuhe20 (talk) 17:00, 16 February 2018 (UTC)[reply]

This is not possible with the parser function. For this, you need to use Lua. Lea Lacroix (WMDE) (talk) 08:47, 15 March 2018 (UTC)[reply]

Limit values[edit]

How to limit the number of displayed values. E.g. I want to display just one image?--Juandev (talk) 06:47, 15 March 2018 (UTC)[reply]

This is not possible with the parser function. For this, you need to use Lua. Lea Lacroix (WMDE) (talk) 08:47, 15 March 2018 (UTC)[reply]

What a shame I dont know LUA.--Juandev (talk) 18:31, 15 March 2018 (UTC)[reply]

Mediawiki manual[edit]

Where is the mediawiki manual or documentation for this on mediawiki.org?--Juandev (talk) 06:49, 15 March 2018 (UTC)[reply]

Hello,
I think this page is the best documentation we have so far about this parser function. What exactly are you looking for? Lea Lacroix (WMDE) (talk) 08:47, 15 March 2018 (UTC)[reply]

Several peer values of the property[edit]

How to use "#property:" parser function with in a situation with several peer values of the property (normal rank for all)? --Kaganer (talk) 22:55, 22 April 2018 (UTC)[reply]

Hello @Kaganer:, what would you like to do? As described in #Multiple_values, in that case, the parser function will return the different values, separated with a coma. Lea Lacroix (WMDE) (talk) 06:41, 23 April 2018 (UTC)[reply]
Yes, this is may be accepltable for text value, but unacceptable for some cases
--Kaganer (talk) 11:55, 23 April 2018 (UTC)[reply]
The statements parser function should handle these cases better. Please give it a try and let us know if there is still something missing/wrong. --Lydia Pintscher (WMDE) (talk) 13:27, 23 April 2018 (UTC)[reply]
Thanks, this is really different result, but I'm not sure if it's the best. See example. But how can I get one single image (random or alphabetical)? --Kaganer (talk) 16:35, 23 April 2018 (UTC)[reply]
The parser functions can't do that at this point unfortunately. It'll have to be Lua for these cases. --Lydia Pintscher (WMDE) (talk) 17:48, 23 April 2018 (UTC)[reply]
Ok, Thanks! --Kaganer (talk) 11:24, 24 April 2018 (UTC)[reply]

Displaying references[edit]

How does one display a reference on another Wikimedia project? Greenman (talk) 14:18, 23 July 2018 (UTC)[reply]

Is there a possibility at this time? Regards, Conny (talk) 09:03, 6 October 2019 (UTC). My question means in detail, if you put into Wikipedia:[reply]

{{#statements:publication date|from=Q191380}} will display "1831 [1]"

than in the references your get f. e. sorted in:

[1] nachgewiesen in Gemeinsame Normdatei, GND-Kennung 119033364, abgerufen am 7. Juli 2015

Regards, Conny (talk) 09:11, 6 October 2019 (UTC).[reply]

This is not possible with the parser function, that only has limited features. For more advanced features, one needs to use Lua. Lea Lacroix (WMDE) (talk) 09:11, 7 October 2019 (UTC)[reply]

Wikibase access[edit]

The article argues that Wikidata data cannot be retrieved outside of Wikimedia projects:

The access to Wikidata data is currently restricted to the Wikimedia projects, because of technical limitations. If you have your own instance of MediaWiki, you can't use Wikidata data's using these features. However, you can set up your own Wikibase instance and use data from there in the same way.

This does not seem to correlate with other pages (like this one). Is it still relevant? does it apply to the use of Wikibase client on non-Wikimedia MediaWiki instances? --Wess (talk) 19:55, 12 August 2018 (UTC)[reply]

Use multi-valued properties in wikimedia projects[edit]

Dear all, on the project's Chat page we are discussiong about the modeling of statistical data. This is for example the case for P2131 (nominal GDP) where for the same point in time we can have two or more different values due to different sources etc.

If we have for example two values for nominal gdp with point in time 2017, where the one of them has the reference "stated in" = World Bank database and the other "stated in" = International Monetary Found - is it possible to easily access the most actual value with reference "stated in" = World Bank, without writing a SPARQL query? This would be for example one use for the infoboxes for countries in Wikipedia. Please comment here: https://www.wikidata.org/wiki/Wikidata:Project_chat#Some_fundamental_questions_about_modeling_properties_for_statistical_data

Thanks and cheers! Datawiki30 (talk) 20:21, 29 October 2018 (UTC)[reply]

Should the "Templates using data from Wikidata" be pointed towards the Wikipedia article rather than the Wikidata item page?[edit]

Referring to this sentence under the Templates section: For templates using Wikidata see Category:Templates using data from Wikidata (Q11985372).

It links to the Wikidata item https://www.wikidata.org/wiki/Q11985372

Should it be pointed towards the Wikipedia article instead? https://en.wikipedia.org/w/index.php?title=Category:Templates_using_data_from_Wikidata

A link to English Wikipedia would show only the templates on English Wikipedia. The Wikidata item links to the category on all the language versions of Wikipedia that have some templates, but also Wikiquotes, Wikisources, etc.. We want to show all the possibilities and not only English Wikipedia, so people can have a look at what exists in other projects :) Lea Lacroix (WMDE) (talk) 10:45, 27 February 2019 (UTC)[reply]

Connecting Wikipedia articles to reliable sources through new template[edit]

Hi All,

please have a look at my proposal for a Wikipedia template using Wikidata and voice your opinions: w:Wikipedia:Village_pump_(proposals)#Connecting_Wikipedia_articles_to_reliable_sources_through_new_template

Thanks, --Adam Harangozó (talk) 19:31, 24 February 2020 (UTC)[reply]

Retrieving labels[edit]

I don't have write access to the page, so:

The page currently does not describe how to obtain a Wikidata label given an item ID. This does not seem to be supported by the parser functions, and thus depends on an API call via Lua. It is nonetheless worth mentioning to either save people the frustration of looking for it or point them to one of the existing wrappers for that Lua invocation, such as English Wikipedia's Label template. Asaf (WMF) (talk) 22:10, 24 June 2020 (UTC)[reply]

lang article title=label from QID?[edit]

I know the QID. How to get the lang label from d:wiki? (eg, the d:en:label for Q1234)? -DePiep (talk) 22:41, 17 January 2021 (UTC)[reply]

In Lua, do mw.wikibase.getLabelByLang( 'Q1234', 'en' ). See mw:Extension:Wikibase Client/Lua. --Matěj Suchánek (talk) 12:42, 18 January 2021 (UTC)[reply]

Statements by localized label[edit]

Is it only possible to use the English label when calling the parser fuction with a label? From what I can see in the other translations this is the case, which means the text should probably clarify that. Strainu (talk) 21:52, 22 February 2023 (UTC)[reply]

A query from an interested WMDE Team about the future of this page[edit]

Hello Wikidatanauts, Wikimedia Deutschland is investigating ways to increase the participation and reuse of Wikidata into the sibling Wikimedia projects. A software development team is being formed to focus solely on this topic whilst the existant Wikidata team can carry on with their core responsibilities and fine work. To that end, we would like to review this page and others like it that collate examples of Wikidata integrations, update them where possible and with community approval; organise and structure them including where they occur on other Wiki's and add links and feedback opportunities with the new team responsible for integrations. Best, Danny Benjafield (WMDE) (talk) 16:16, 16 February 2024 (UTC)[reply]

Douglas Adams article[edit]

This page discusses how the page for w:Douglas Adams might use templates and statements to import data from wikidata. However, when I looked at the source for that page hoping to see a real-life example, I found that it does not appear to do so. Would it be appropriate for me to change it so that it does?

PinkZip (talk) 17:19, 25 March 2024 (UTC)[reply]