:en:Wikipedia:Wikidata

{{short description|Information page}}

{{pp-protected|small=yes}}

{{pp-move-indef}}

{{redirect-multi|2|WP:WD|WP:DATA}}

{{Information page|WP:DATA|WP:WD|WP:WDATA}}

{{nutshell|1=Wikipedia fetches interwiki links from the Wikidata central database. Wikipedia also fetches some data from Wikidata.}}

File:Wikidata-logo-en.svg

Wikidata is a Wikimedia project to create an open and collaborative database. It stores relational statements about an entity as well as the interwiki links associated with the pages on the Wikimedia projects that describe that entity. The English Wikipedia uses these interlanguage links stored at Wikidata, and has some limited applications for the statements made in Wikidata.

Access from Wikipedia

From a Wikipedia page, you can go to the link "Wikidata item", using "Tools" in the side panel, to see and edit it. Also in Tools, there is another link to "page information", where is "Wikidata item ID", that contains the QID (for example: Q171 or "None").

You can go to the corresponding page in Wikimedia sister projects using the links under "In other projects", also in the side pane.

Finally, you can go to other Wikipedia language links of the item, clicking in "Languages" in the side pane. You can use "Edit links" there.

== New articles ==

  • Q1. I've just created an article on XEN; I know there is already an article on the Swahili Wikipedia on the same subject called XSW. How do I create an Interwiki link?
  • Go to XSW. On the left, there should be a list of interwiki links followed by a pen icon. Click on pen, this will take you to the Wikidata page (item) for XSW. Go to the bottom of the item, click on "add", fill in the opened cases the language code (for example, "en" for English) and the name of the article you created (XEN). Then click on "save". You are done.
  • If the pen does not show up, go to Wikidata.
  • In the main panel (in Vector interface, on the left) locate "Item by title".
  • Click on "Item by title".
  • On the resulting page, fill in the language code (for example, "sw" for Swahili) and the name of the page on the corresponding Wikipedia (XSW). Then click on "Search".
  • If the item already exists, go to the bottom of the item, click on "add", fill in the opened cases the language code (en for English) and the name of the article you created (XEN). Then click on "save". You are done.
  • If the item does not exist, create it by clicking on "create the item", filling in its name (XEN) and (preferably) a description of the item. Then add to the item the interlanguage links, as described above.
  • If you are planning to add interlanguage links often, you may want to switch on the gadget "slurpInterwiki", available in your Wikidata gadgets. Once the gadget is on, and you are on the item page, click on "Import interwiki" on the menu on the left.
  • At least for some time, the old way of adding interlanguage links (just adding them to the Wikipedia pages) will still work, but most likely fewer bots will be checking new articles, and the time until the links propagate to other articles will be longer.

== More than one interwiki family ==

  • Q4. I've just noticed that the articles en:YEN, de:YDE and fr:YFR are linked together, and that cs:YCS and hu:YHU are linked together. Actually all five articles are on the same subject. How do I locate and merge their entries on Wikidata?
  • You can find their entries as shown in Q1 above – in this case, you could try d:Special:ItemByTitle/en/YEN and d:Special:ItemByTitle/cs/YCS; if those don't work, try searching for all the other Wikipedias' titles, as in some cases it's possible that an item has been created for one title, but not the article it's linked to.
  • If you find two items, then merge them by using the Merge gadget or the Special:MergeItems tool.
  • If you find one item, simply add the links to the relevant articles.
  • If you find no items, then just create an item for all five articles, as explained in Q1 above.
  • Q4A. I discovered that the articles en:YEN and de:YDE are about the same subject, but they are not linked together. What should I do?
  • First, check that the Wikidata entry YEN exists, locating it as detailed in Q1 above;
  • If is does, go to the bottom of the entry (where the links are stored), and try adding YDE: add the language (de for German) and the name (YDE);
  • If it gets added, you are done;
  • If it gives an error (a pink box), click on the error box. It would typically say that YDE has been already used by the Wikidata item Qxxx. In this case, you need to merge them. Act as in Q4 above.
  • If the Wikidata entry YEN exists, check the entry for YDE. If id does exist, go there and add en:YEN as detailed above;
  • If it does not, create a new entry and add there en:YEN and de:YDE.

== Persistent conflicts ==

  • Q6 I'm trying to do all this, but I keep on running into conflicts with other wikis.
  • Please bring this up at d:WD:IWC where an experienced editor will sort it out.
  • If you need help for any other reason, feel free to contact any of the users in the box at the top of this section, or to go to {{irc|wikidata}}.

{{anchor|Editing interlanguage links}}

= Related information =

== Article status indicators ==

Good Articles and Featured Articles on other-language Wikipedias are indicated by a star next to the language link. Wikidata supports this through badges (see :d:Wikidata:Development plan § Badges).

When editing the list of Wikipedia links in Wikidata, the status of the article can be changed by clicking on the medallion to the right of the article name.

== Recent changes ==

Changes on the Wikidata project site that relate to articles on this Wikipedia will show up in Recent Changes if the option is enabled by the user. See {{section link|Special:Preferences#mw-prefsection-rc}}.

Infoboxes

Wikidata holds information in many languages that can be re-used on Wikipedias, particularly in infoboxes. The choice to use this information is left entirely to the Wikipedia community itself — future changes to the wiki software will only provide an option to retrieve information from Wikidata if desired. (For example, some wiki-text may ask for the atomic number of a chemical element, or the population of a country.) Wikidata supports citations for all data.

Articles and their infobox templates can incorporate facts from the corresponding Wikidata page using {{#property:}} or {{#statements:}} syntax, and many other related templates and modules (infoboxes must use Module:WikidataIB). Such transclusions are added inline to articles explicitly on a page-by-page or template-by-template basis, either manually or by bots, and are not attached automatically to articles.

=Infoboxes that use it=

Inserting Wikidata values into Wikipedia articles

{{Also|:d:Wikidata:How to use data on Wikimedia projects}}

There are two methods of obtaining data from Wikidata to use in an article.

=Parser function=

The simplest is to use the #statements statementsparser function. For example, to get Madonna's date of birth you need to know the property number of "date of birth" which is P569. (You can find this by clicking the property on Wikidata.)

  • Placing the code {{#statements:P569}} on the Madonna article will then return: "{{#statements:P569|from=Q1744}}".

To obtain data from a different item, you'll need the item number. For example, to get the capital (P36) from the item about Germany (Q183):

  • {{#statements:P36|from=Q183}} will give you "{{#statements:P36|from=Q183}}".

Note that this may return multiple values separated by commas, if there are multiple statements for the given property. For example, if you fetch the occupation (P106) of Douglas Adams (Q42):

  • {{#statements:P106|from=Q42}} will give you "{{#statements:P106|from=Q42}}". These are the best-ranked values for this property.

Values that are references to other data items, such as the occupations in the above example, will be represented by wiki links to the corresponding pages on the local wiki. If you want unlinked labels instead, use #property instead of #statements.

Note that the value returned can be unlinked, even though Wikipedia may have an article covering the topic, if it is not properly connected on Wikidata (e.g. because the link is via a redirect). For example, if you fetch the {{Q|P106}} of {{Q|Q133682}}:

  • {{#statements:P106|from=Q133682}} will give you "egyptologist", although Egyptologist is blue-linked, because it redirects to Egyptology.

Also, #statements may return values that are completely unreferenced, or only "imported from a Wikipedia", so may not be suitable in applications where it is important to have verified data. Note that for Howard Carter's occupation:

  • {{#statements:P106|from=Q133682}} → {{#statements:P106|from=Q133682}}

Using a Lua module gives more options:

  • All values → {{#invoke:WikidataIB |getValue |P106 |qid=Q133682 |fetchwikidata=ALL |onlysourced=false}}
  • Only sourced values → {{#invoke:WikidataIB |getValue |P106 |qid=Q133682 |fetchwikidata=ALL}}
  • Preferred values, including unsourced → {{#invoke:WikidataIB |getPreferredValue |P106 |qid=Q133682 |fetchwikidata=ALL |onlysourced=false}}

=Lua modules=

For more advanced uses, it is necessary to use Lua modules, for example to choose between alternative values, to include references and to create links. Several competing Wikidata modules have been developed, and are used in different Wikipedia language versions. Modules that are used to put automatically-updating Wikidata values into a Wikipedia article is still in its infancy. Before using the module in an article or a template, you should discuss its usage on the template's or article's talk page. Users may revert your edit if the module is not working on that particular page or the user doesn't believe the benefit outweighs the risk of a bug in the module.

=Appropriate usage in articles=

It is possible to use Wikidata to supply content anywhere in an article, including in article text (e.g., to add the numbers in the sentence "The current population of Berlin is {{#statements:P1082|from=Q64}}."), in infoboxes, in other templates, in tables, and in lists. It is even possible, with #Lua modules, to import Wikidata's reference information for the claim.

However, many uses that are technically feasible are not appropriate or desirable in practice.

Before considering the use of Wikidata in any particular article, editors should be aware of the conclusions of the various Requests for Comment regarding Wikidata:

  • Wikipedia:Requests for comment/Wikidata Phase 2 (May 2013) found:
    There are two points discussed here and while the line between them is not entirely clear, there is nevertheless agreement that:
    • It is appropriate to modify existing infoboxes to permit Wikidata inclusion when there is no existing English Wikipedia data for a specific field in the infobox (option 4 of the first question). There is sufficient support for option 3 however, to indicate that this modification should be done carefully and deliberately, at least at first.
    • It is, on the other hand, not appropriate to use Wikidata in article text on English Wikipedia at this time (option 1 of the second question). There is a valid point raised that while running text is clearly not suitable for Wikidata use, it might be worth discussing use in tables specifically – but no consensus regarding this has been reached in this discussion.

See also

Wikidata templates and modules

  • {{tlx|Wikidata}}, {{tlx|WikidataOI}}, and {{mlx|Wd}}
  • {{tlx|Wdib}} and {{mlx|WikidataIB}}
  • {{tlx|WikidataCheck}} and {{mlx|WikidataCheck}}
  • {{tlx|Wikidata entity link}} (or redirect {{tlx|Q}}), to add a Wikidata entity link to a Wikipedia page
  • {{tlx|Wikidata property}}
  • {{clc|Wikidata templates}} and {{clc|Wikidata modules}}

Notes

{{notelist}}