Commons:Wikidata infobox help
Over 4 million Commons categories have an infobox on the right-hand side of the page added by the template {{Wikidata Infobox}}.
This shows key information about the topic of the category, drawn directly from Wikidata, with each piece of information automatically available in every language that Wikidata contains a translation for in the relevant language, as well as location maps and links to relevant external authorities; with the blue links in the infobox allowing rapid navigation to relevant related categories.
But the information in the infobox can only be as good, and only as extensive, as the information on the Wikidata item it is drawn from. This page therefore contains some hints for improving the information in Wikidata, to ameliorate the information shown in a Commons category's infobox.
Before we start the FAQ:
- Some Wikidata terminology:
- An item or Q-item is comparable to a category, article, etc.
- A QID: the ID of a Wikidata item; a number with a "Q" prefix.
- Properties are completely distinct from items, although they are similarly constructed. A property describes the data value of a statement and can be thought of as a category of data, for example color (P462) for the data value blue (Q1088) or education for a person item. Their IDs have a "P" prefix.
- A statement (or claim) about an item (or a property!) is a property + value. So, properties, when paired with values, form a statement in Wikidata. Statements can be refined with qualifiers and references.
- When making edits to Wikidata, please, if possible, give a reference. Some likely reference cases for hand-editing are:
- P143 (imported from Wikimedia project) with value 'English Wikipedia' (Q328)
- P248 (stated in) with a value being the QID of an item representing a published work (for example a scientific paper, or an encyclopedia)
- P854 (reference URL) with a URL value
FAQs
[edit]- Someone added {{Wikidata Infobox}} and it messed up the layout of my category page.
- {{Wikidata Infobox}} doesn't play well with other templates that want to use the whole page width. Move it down below those, and everything should be fine.
- How do I navigate from the infobox to the Wikidata item?
- Click the pencil "edit" icon in the lower right of the infobox. It takes you to the Wikidata item page. The visual interface is not exactly the same as Commons' wiki interface, but it's similar. You won't exactly be in an edit mode, but you can click any of the many "edit" indications on that page to edit whatever part of it you may want.
- Where do I go for Wikidata help?
- d:Wikidata:Community portal; as of June 2018, less mature than some other wikis, but certainly better than nothing.
- d:Wikidata:Project chat.
- How is a Commons category linked to a Wikidata item?
- The mechanism is entirely on the Wikidata side. Naturally, this won't arise as an issue if the Commons category in question already has a Wikidata infobox (unless it's the wrong one!), since that infobox is built by using this linkage.
- To form a sitelink from a relevant Wikidata item to Commons, navigate in Wikidata to the relevant Q-item page (which may be either a "normal" entity or a Wikimedia category item; use the latter if it exists). In the "Multilingual sites" area near the bottom of the Wikidata item page, indicate commonswiki as the wiki, and explicitly enter the Commons category name, with the "Category:" prefix. Any corresponding Wikipedia articles, etc., can be sitelinked in a similar manner
- How does {{Wikidata Infobox}} decide what Wikidata item corresponds to a Commons category?
- There are two ways this can happen:
- The Commons category is sitelinked directly from a Wikidata item that is an instance of 'Wikimedia category' (Q4167836) and there is a P301 (category's main topic) statement for that Wikidata item. The infobox is generated from that main topic page.
- The Commons category is sitelinked from a Wikidata item that is not an instance of 'Wikimedia category' (Q4167836).
- There are two ways this can happen:
- Why does a particular category lack an infobox ?
- Or alternatively if I add an infobox, why do I see a blank Wikidata infobox with "NO WIKIDATA ID FOUND!"?
- There are a few possibilities here:
- The category should have an infobox, but no one (human or bot) got around to adding the {{Wikidata Infobox}} template yet. If the category already has a sitelinked Wikidata item (look for "Wikidata item" in the left nav) but no Wikidata infobox, this is the most likely answer. Just add the template to the wikitext!
- The Wikidata item exists, but the Commons category has never been sitelinked from the Wikidata item. You can sitelink it (see above) and then add {{Wikidata Infobox}} to the category page.
- The subject of the category is not notable enough to merit a Wikidata item of its own. E.g. the category describes day 2 of a 3-day event, or a Wikimedian who attended a few conferences but is not really notable, or a particular room of a just-barely-notable building, etc.
- The Wikidata item should exist, but doesn't, and needs to be created.
- To start with, add {{Wikidata Infobox}} to the category. It should look like the blank box on the right. Double-check that the Wikidata item doesn't already exist by clicking on the 'Search for...' link - if it does then you only need to add the sitelink. If not, then click on 'Create new Wikidata Item', which will take you to Wikidata to create a new item for the category's topic. It will automatically add the category sitelink. Please also add instance of (P31) and image (P18) at least.
- As a rule of thumb, Wikidata's threshold of notability is higher than Commons and lower than most Wikipedias. Please don't be offended it you create a Wikidata item for a Commons category and someone decides it is below Wikidata's threshold of notability.
- Need help on this? You might start with d:Wikidata:Introduction and/or d:Wikidata:Tours.
- Why is the wrong Wikidata item linked?
- For pretty much the same reason there is an error anywhere else: some human or bot got it wrong. Often, a bot will have picked up the bad link from one of the less well-curated Wikipedias.
- You should, of course, feel free to fix this in Wikidata by correcting sitelinks (see above). NOTE that you will have to remove the Commons sitelink from the wrong Wikidata item before you can add it to the right one: duplicate sitelinks are prohibited.
- If the correct item already exists, there are basically two ways to find it: search in Wikidata, or find a Wikipedia article for the right topic and look at its Wikidata item (in the left nav).
- Why is the map wrong? how do I fix it?
- If the map is wrong, it's probably because Wikidata has the incorrect geocoordinates. While the syntax for geocoordinates is different from Commons, the principles are pretty much the same. In general, feel free to correct geocoordinates in Wikidata; please provide a reference, if possible. The map coordinates may be rounded using Wikidata's Coordinate location precision value (in decimal degrees); please set an appropriate value.
- Why doesn't the text in the infobox specify the location more precisely? (e.g. why just country?)
- Because the relevant properties are missing from the Wikidata item. This is handled entirely differently for people and for other things, so let's look at the two cases separately. The following is intended to deal with common cases; things get more complicated for things like a painting that might have been painted in one place, depict another place, and be in a museum in a third place.
- A thing that has a stable location should typically have the following properties:
- P17 (country)
- P131 (located in the administrative territorial entity) : the most specific administrative entity you can tie to the location, assuming you can say something more specific than country. This might be a province, a county, a city, an officially recognized district of a city, etc.
- P276 (location) : sometimes you can narrow down the location further, but it is not a formal administrative entity. For example, something might be specific to a region of a country (but not to any subnational administrative entity) or to a neighborhood that does not have any formal recognition, or even might fall within a park or a campus.
- For humans, this is more complicated. Common geographic properties include:
- P27 (country of citizenship)
- P19 (place of birth) : as specific as possible, down to a particular building or, theoretically, even more specific if a relevant Wikidata item exists.
- P20 (place of death) : similarly.
- P119 (place of burial) : similarly.
- P551 (residence) : similarly; likely to have multiple values, with qualifiers P580 (start time) and P582 (end time).
- A thing that has a stable location should typically have the following properties:
- Because the relevant properties are missing from the Wikidata item. This is handled entirely differently for people and for other things, so let's look at the two cases separately. The following is intended to deal with common cases; things get more complicated for things like a painting that might have been painted in one place, depict another place, and be in a museum in a third place.
- Why does a blue link in the infobox link to the wrong sort of <X>. For example, it should go to Category:Lions rampant in heraldry and it goes to Category:Panthera leo.
- Almost certainly, one of the statements for the Wikidata item in question references another Wikidata item, and it references the wrong item. For example, in the Lions rampant in heraldry/Panthera leo case, they are both lions, and someone probably didn't understand that the former has its own Wikidata item ('lion rampant' (Q3241798) vs. 'lion' (Q140)). You can go into Wikidata and correct the incorrect statement.
- Why is there unlinked black text for this term rather than a blue link to a Commons category?
- There are a few possibilities here.
- Perhaps there is no such Commons category.
- Perhaps the property value is not a Wikidata item. A date will not be linked, because it comes from a timestamp as a property value rather than a Wikidata item as a property value, so there is no sitelinked Commons category because there is no item from which to sitelink.
- Perhaps there is such a Commons category, but the relevant Wikidata item doesn't have a sitelink to Commons.
- To fix this, navigate from the infobox to the Wikidata item; then find the property value that should have a sitelink back to Commons. Click on it to navigate to that Wikidata item; add the sitelink back to Commons (as described above).
- There are a few possibilities here.
- Why doesn't it also say <this> about the item? How can I add it?
- Two main possibilities here:
- It isn't one of the properties fetched by Wikidata Infobox. If you think that's in error, you should take it up at Template talk:Wikidata Infobox.
- The Wikidata item doesn't have that information in a property. To fix this, you can edit the relevant Wikidata item.
- Two main possibilities here:
- Why is this bit not showing up in my language, when all the rest is? How do I fix that?
- Most likely, the Wikidata item that represents this value doesn't have a label in your language. To fix this, navigate from the infobox to the Wikidata item; then find the property value that isn't displaying in your language. Click on it to navigate to that Wikidata item; edit the label accordingly. (While you are at it, you might also want to add a short description and list any "also known as" values. And maybe fill this out for other languages you happen to know.) Normally, you can edit label/description/"also known as" by clicking the (pencil) edit icon at upper right on the Wikidata item page. If that doesn't get you the language(s) you want, you can access all languages with the "Labels list" tool on the top tabs.
- I made the correction in Wikidata. Why isn't it showing up in the Commons category?
- Probably caching somewhere along the line. A null edit to the Commons category (select "Edit" and, without making any changes, "Cancel") will typically fix it.
- What properties should be in the Wikidata item for a category that is defined by an intersection of topics?
- P971 (category combines topics) exists for just this purpose. Typically, you will want to give it two values. See 'Category:Churches in France' (Q7215389) for a good example, producing this result on Commons.
- Some cases will best be described by three or more values. Expect to get a warning after entering the first value: that will just be the warning that it expects two or more values, and of course when you enter the first one it is in a transient state where it has only one value.
- I'd like to help, but I'm much more of a picture person. All this data stuff is intimidating. Or boring.
- Some properties are very picture-oriented:
- P18 (image): many items have the potential for a good, representative image but don't have one yet, see Category:Uses of Wikidata Infobox with no image for examples.
- P2716 (montage image): for others, such as "intersection" categories, it is likely that no one image we have would be appropriate, but if you are good at putting together a montage, it would be a great supplement to the item
- And then there's P154 (logo image), P94 (coat of arms image), P158 (seal image), P41 (flag image), P1801 (plaque image), P1766 (place name sign), P1543 (monogram), P1442 (image of grave), P367 (astronomic symbol image), P109 (signature), P14 (traffic sign), P2910 (icon), P2713 (sectional view), P3451 (nighttime view), P5775 (image of interior), P4291 (panoramic view), and P4640 (spherical panorama image).
- Oh, and did we mention P242 (locator map image), P1943 (location map), P1621 (detail map), P1944 (relief location map) (for the distinctions among those four, see "Comparison of map properties"); P15 (route map), P1846 (distribution map), and P181 (taxon range map image),
- Happy hunting!
- Some properties are very picture-oriented:
- Any other classic issues people have found? or itches users are going to want to scratch?
Tools
[edit]Edit meta:Special:Mypage/global.js (check you're logged in first) and add the line:
mw.loader.load("//www.wikidata.org/w/index.php?title=User:Yair rand/WikidataInfo.js&action=raw&ctype=text/javascript"); // Backlink: [[d:User:Yair rand/WikidataInfo.js]]
(you can see the source code at d:User:Yair rand/WikidataInfo.js).
This adds the Wikidata ID, label, description and alias (or a "create item" link, if none exists) below the category or article title on Commons and other Wikimedia projects.