The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [wikidata]

Wikidata is a project of the Wikimedia foundation related to open data

Filter by
Sorted by
Tagged with
2
votes
1answer
11 views

Does Wikidata offer inferencing/reasoning?

I would like to use RDFS level inferencing in some queries posed in the Wikidata Query Service which uses SPARQL. Does it support inferencing/reasoning? If so, in what kind? For example, is it Forward ...
15
votes
6answers
2k views

Mapping all Wikipedia URLs to Wikidata entity ids

Is there a Wikidata dump that maps all Wikipedia URLs to their corresponding Wikidata entity ids, e.g. the Wikipedia URL https://en.wikipedia.org/wiki/Tom_Hanks to the Wikidata entity id Q2263?
0
votes
0answers
13 views

Looking for foot pressure database collected from pressure sensors

I am working on a project where where I need a foot pressure data that a person put on his foot while walking, running or doing any other practice. I searched a lot in the search engines and I couldn'...
3
votes
1answer
185 views

Wikidata: QueryTimeoutException: Query deadline is expired

I used to execute successfully the following query: SELECT (COUNT(?r) AS ?count) WHERE { [] <http://www.wikidata.org/prop/direct/P31> ?r } on http://wdqs-beta.wmflabs.org/bigdata/namespace/wdq/...
0
votes
1answer
33 views

Query wikipedia links

I'm using the following query to receive label and description of all Wikidata-entries with geo-location in a geo-bounding box: SELECT DISTINCT ?place ?placeLabel ?placeDescription ?location WHERE { ...
5
votes
3answers
513 views

How can I add Wikidata properties of item a on the Wikipedia page of item b?

How would I get the eccentricity (Property:P1096) of Venus (Q313) in the article en:Mars? I have figured out that I have to write {{#property:P1096}} if I want to get a property of the page on that ...
1
vote
2answers
29 views

Find all Wikidata items whose image (P18) URL contains a certain word

I am trying to find all Wikidata items whose P18 property is an URL that has the word "Montage" anywhere in its filename. Example: I managed to find items by their complete P18 filename: SELECT ?...
0
votes
1answer
43 views

SPARQL get all the data before it reaches timeout

I am trying to get all the city names of all countries in the world using this below query. Whenever I execute this below query it returns this message "Query timeout limit reached". Is there any ...
4
votes
0answers
27 views

Find most-depicted Wikidata items that have no image

Wikimedia Commons has a new feature where a picture can have metadata saying it depicts a given Wikidata item. For instance, https://commons.wikimedia.org/wiki/File:Grandpark_Plaza.jpg depicts https:/...
0
votes
0answers
26 views

Download Wikidata User pages

I need to download the user pages of all Wikidata's users (editors) How can I do this without downloading the full Wikidata Dumps?! Thank you
0
votes
0answers
16 views

How come there are missing entities in this SPARQL query?

I was interested in listing all books, so I wrote: SELECT ?book ?url WHERE { ?book wdt:P31 wd:Q571 . OPTIONAL { ?url schema:about ?book . ?url schema:inLanguage "en" . ?url schema:isPartOf <...
1
vote
1answer
52 views

How to find the wikidata ID of a DBpedia concept?

I have a set of DBpedia concepts and would like to get the corresponding wikidata IDs of them. For example, consider word2vec. The wikidata ID of word2vec is wd:Q22673982. Currently, I have the ...
2
votes
0answers
36 views

SPARQL - Filter wikidata identifiers

Query below gives me all programming languages entities, with their statements. Problem is that I don't need identifiers now, but these IDs might become necessary. I was just gonna model database ...
2
votes
0answers
33 views

Wikidata SPARQL - get company entities and the location of their headquarters

I'm having trouble extracting location attributes of company HQ's. My query: finds all companies or sub-classes, and returns some basic properties such as ISIN and URL, and the Headquarter location. ...
0
votes
0answers
13 views

GeoSPARQL query that filters locations outside polygon (Wikidata)

I want to get all venues that have the 'maximum_capacity' property (P1083), and then I want to filter them by whether or not their lat/lon attribute intersects some polygon. I am trying to follow ...
2
votes
0answers
30 views

SPARQL query to get capacity of event venues from Wikidata

I am trying to query Wikidata to find out the capacities of all event venues in specific geographic regions (US urban centers). They have this service for querying: Wikidata Query Service The answer ...
2
votes
0answers
44 views

How to use wikidata property paths?

Given a term/concept, I want to decide if it belongs to computer science. For that, I am checking if the concept has a property path to computer science node. In other words, I am checking whether ...
1
vote
0answers
15 views

How to distinguish between human and animal bones in Wikidata?

The two topics https://www.wikidata.org/wiki/Q16343 (Clavicle) https://www.wikidata.org/wiki/Q835986 (Baculum, Penis bone) are both instances of Q265868 (Bone). However, the clavicle is a human (...
1
vote
0answers
27 views

Wikidata SPARQL How to speed up this query?

I have come to this query, which retrieves wikipedia and wikidata info from a wikipedia title: SELECT ?wikipediaId ?wikipediaTitle ?wikidataId ?desc ?imageUrl (GROUP_CONCAT(?instanceOfS; SEPARATOR=";"...
1
vote
0answers
28 views

Wikidata Sparql Getting properties from a Wikipedia generator list

I am trying to get the properties that the linked pages from a wikipedia page have. SELECT ?item ?wikipediaTitle ?target WHERE { SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "en....
0
votes
0answers
10 views

Wiki Sparql difference between wikibase:apiOutput and wikibase:apiOutputItem?

Reading https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual/MWAPI#Find_articles_in_Wikipedia and trying some queries, I have come to the question: What is the difference between "...
1
vote
1answer
37 views

Wikidata Query: How to retrieve the normal (non-verbose) JSON?

We can download the results of a Wikidata Query as "JSON file" or "JSON file (verbose)" Example link of random query: http://w.wiki/WQ. I am developing a javascript software which retrieves some ...
1
vote
1answer
20 views

Wikidata SPARQL get current VALUES index

I have the current SPARQL code: SELECT ?currentQid ?propQid ?targetQid WHERE { VALUES ?current {wd:Q5 wd:Q6 wd:Q7 wd:Q8 wd:Q9} VALUES ?prop {wdt:P31 wdt:P279 wdt:P361} BIND (STRAFTER(STR(?...
9
votes
4answers
2k views

How to get list of all items that have a particular property, in Wikidata?

How collect Wikidata's entities by a certain property?
1
vote
0answers
16 views

Does Wikidata contain the data from the Wikipedia {{distinguish}} template?

Wikipedia uses the {{Distinguish}} template for pages whose subject is easily confused with another subject. For example, the two Congo countries are frequently confused with each other, so their ...
2
votes
1answer
31 views

Wikidata SPARQL with optional qualifiers

I am trying to adapt the Mona Lisa exercise in the Wikidata SPARQL tutorial so it will show all the materials used and where they apply. If I simply do: SELECT ?painting ?paintingLabel ?material ?...
1
vote
1answer
44 views

Expand Wikidata SPARQL query to self-join

I have this query to get the population of cities and the country they belong to: SELECT ?city (?population as ?city_pop) ?country ?countryLabel ?continent ?continentLabel ?cityLabel WHERE { ...
0
votes
1answer
97 views

How to output only English labels in SPARQL query?

I don't understand why this SPARQL queries produce duplicates: SELECT DISTINCT ?WikidataItem ?itemLabel WHERE { ?WikidataItem rdfs:label ?itemLabel. ?WikidataItem ?label "Mozilla Firefox"@en. ...
9
votes
2answers
1k views

How to include sub-classes in a Wikidata SPARQL query? (example: when querying “bands”, include “rock bands”)

Here is my naive query for bridges: SELECT ?item WHERE { ?item wdt:P31 wd:Q12280. # Item's type is: bridge } Problem: It only returns a small fraction of all bridges, because railway bridges (...
0
votes
1answer
36 views

Wikidata - Filter or Detect or Get incomplete date

I've the following query PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?item ?itemLabel ?dod ?dob WHERE { ?item wdt:P570 ?dod. ?item wdt:P31 wd:Q5. SERVICE wikibase:label { bd:...
2
votes
2answers
64 views

What are commonly used ontologies for spatial relations with terms like “delimit”?

Currently, on Wikidata there is an open proposal to have a projecty about delimit which is supposed to have the meaning of "Walls of Jerusalem delimit Old City of Jerusalem". For good ...
8
votes
2answers
789 views

Extract labels from Wikidata entity

Is there a way to extract the labels of the statements (property and object) in Wikidata? I want to get all the information that there is here:https://www.wikidata.org/wiki/Q42, properties and objects ...
1
vote
1answer
57 views

What are Outlink categories of Wikipedia

I am wondering if it is possible to view outlink categories of a given article in Wikipedia? For example, consider the Wikipedia article about 'Data Mining'. What are the outlink categories of "Data ...
2
votes
1answer
34 views

Limiting a SPARQL Query to Lastest Point in Time

I'm trying to get information on Prefectures in Japan out of Wikidata. I succeeded to read the population statement, however there are occasionally several values with different point in time fields. ...
2
votes
2answers
70 views

How to get specific wikipedia data?

I only want to use the link structure and articles’ content of Wikipedia. Therefore, I want to downlaod the dump that contains only the following details. articles content link structure (i.e. re-...
5
votes
1answer
76 views

Wikidata: How to represent British Hong Kong's under Japanese occupation?

Between 1941 and 1945, British Hong Kong (then a colony) was occupied by the Japanese, see this Wikipedia article. However on British Hong Kong's Wikidata page, there's no mention of the Japaneses ...
1
vote
1answer
67 views

Get list of all wikidata properties used to link to an item

The first part of my question is, is there a SPARQL equivalent of the "What links here" link? E.g. as described at https://opendata.stackexchange.com/a/5271/20321 I tried: WHERE { ?item wdt:?...
5
votes
2answers
160 views

Mapping between Wikivoyage article names and their Wikidata identifier

When I want to know the Wikidata identifier of a Wikivoyage article like Barcelona, I usually run this API call: wget --quiet -O - "http://www.wikidata.org/w/api.php?action=wbgetentities&sites=...
7
votes
1answer
275 views

wikidata: (when) will it be possible to query for wikipedia page links?

(When) will the following be possible: For a wikipedia page: get the list of all wikipedia links on that page with their respective wikidata IDs in a single query/API call. Receive additional ...
2
votes
1answer
135 views

Wikidata - Search of human instance that doesn't break

Is this possible, like the wikidata autocomplete combo works, in a speedy way, with a filter of "itemlabel strings start with..." ? PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT ?item ...
1
vote
1answer
37 views

Wikidata on all Trump's executive orders

I'd like a wikidata query that returns all executive orders signed by President Trump. This query gets all executive orders: https://query.wikidata.org/#SELECT%20%3Forder%20%3ForderLabel%20WHERE%20%...
3
votes
1answer
57 views

Numerically order SPARQL results that are external identifiers but actually all numbers

I wrote this query to list Wikidata items that have an RFC identifier: SELECT ?rfcId ?itemLabel ?classLabel ?item WHERE { ?item wdt:P31 ?class. ?item wdt:P892 ?rfcId. SERVICE wikibase:label { ...
1
vote
0answers
28 views

Filter wikidata results with 'around' service

Is it possible to use the "around" service as a filter, for example to search for a place name in a country and limit results to those within a given distance of a known point. For example, limit ...
11
votes
2answers
1k views

How to output the description of Wikidata items using SPARQL?

I am trying to output a table using query.wikidata.org and SPARQL, with the name, birthdate, and brief description of notable, living Americans (i.e. those with wikidata entries) who will turn 100 ...
2
votes
1answer
60 views

How can I query Wikidata for a label and optional image without further constraints?

I made a derivation of the cats with images example where I query for a specific cat, in particular its label and a possible image (in the web interface): SELECT ?item ?itemLabel ?pic WHERE { ...
4
votes
1answer
69 views

Why does Wikidata's query interface return no results for entities with an id of Q10000001 or higher?

I have this SPARQL query to return an item's label and the url of a Wikipedia article: PREFIX schema: <http://schema.org/> PREFIX wd: <http://www.wikidata.org/entity/> SELECT ?article ?...
5
votes
1answer
79 views

Julian and Gregorian dates from Wikidata

How can I get the Julian birth or death date for someone who was born or died under the Julian Calendar (Isaac Newton, for example) on Wikidata using a SPARQL query? This simple query returns "4 ...
1
vote
1answer
42 views

Restrict returned claims in entity

Is there a way to restrict the returned claims on wikidata's REST API? For example I am using this query: https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q17714&props=claims&...
1
vote
1answer
57 views

How can I get data about Wikipedians (e.g. language proficiency), by username?

Is there an open dataset containing information such as username, language proficiency levels (https://en.m.wikipedia.org/wiki/Wikipedia:Babel/Levels) and (possibly) academic degrees and nationality ...
2
votes
2answers
93 views

Mapping between ImageNet and Wikidata entities

Wikidata and ImageNet both know oxcarts: https://www.wikidata.org/wiki/Q1190777 http://imagenet.stanford.edu/synset?wnid=n03868242 (slow) An AI library gives me the ImageNet "synset" about oxcarts. ...