The MEHDIE gazetteer is published as linked data and can be queried with SPARQL at
https://tools.mehdie.org/sparql/mehdie/query
(interactive editor: Fuseki query UI).
All data is in the named graph <https://tools.mehdie.org/>, rebuilt from the
public datasets of this site whenever the data changes.
The model is CIDOC-CRM: places are
crm:E53_Place, people crm:E21_Person; every name is an appellation
(crm:P1_is_identified_by / crm:P190_has_symbolic_content) tagged with its
script (und-Arab, und-Hebr, und-Latn, ...) or language.
Entities belong to their datasets (dcterms:isPartOf, dcat:Dataset),
geometries use GeoSPARQL, time spans dcterms:temporal, the hierarchy
gvp:broaderPartitive, and links to other gazetteers skos:closeMatch
(Wikidata, GeoNames, Pleiades, Kima, VIAF, ...).
Press Run to execute an example here, or copy it into the query editor and change it.
Examples marked live Wikidata combine MEHDIE with
Wikidata through a federated
SERVICE query; they take a few seconds.
Every public MEHDIE dataset with the number of places or people it contributes and its licence.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?dataset ?title (COUNT(?entity) AS ?entities) ?license
WHERE {
GRAPH <https://tools.mehdie.org/> {
?dataset a dcat:Dataset ;
dcterms:title ?title .
OPTIONAL { ?dataset dcterms:license ?license }
OPTIONAL { ?entity dcterms:isPartOf ?dataset }
}
}
GROUP BY ?dataset ?title ?license
ORDER BY DESC(?entities)
All names MEHDIE has for Antakya, found through its Wikidata ID, with the script or language tag of each name and the datasets it comes from: Arabic, Hebrew, Greek, Armenian, Syriac and Latin forms.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# All names of Antakya (Antioch), with their script / language tag
SELECT ?name (LANG(?name) AS ?script)
(GROUP_CONCAT(DISTINCT ?dataset; separator=" | ") AS ?datasets)
WHERE {
GRAPH <https://tools.mehdie.org/> {
?place skos:closeMatch wd:Q80561 ;
crm:P1_is_identified_by/crm:P190_has_symbolic_content ?name ;
dcterms:isPartOf/dcterms:title ?dataset .
}
}
GROUP BY ?name
ORDER BY ?script ?name
For each number of scripts, how many places have names in that many different scripts (names tagged only und are left out).
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# How many places have names in how many scripts?
SELECT ?scripts (COUNT(?place) AS ?places)
WHERE {
SELECT ?place (COUNT(DISTINCT LCASE(LANG(?name))) AS ?scripts)
WHERE {
GRAPH <https://tools.mehdie.org/> {
?place a crm:E53_Place ;
crm:P1_is_identified_by/crm:P190_has_symbolic_content ?name .
FILTER(LANG(?name) != "und")
}
}
GROUP BY ?place
}
GROUP BY ?scripts
ORDER BY ?scripts
Places with at least one name in each of the three scripts: the cross-lingual core that entity resolution works on.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# Places that have names in Arabic, Hebrew and Latin script
SELECT ?place (SAMPLE(?ar) AS ?arabic) (SAMPLE(?he) AS ?hebrew) (SAMPLE(?la) AS ?latin)
WHERE {
GRAPH <https://tools.mehdie.org/> {
?place a crm:E53_Place ;
crm:P1_is_identified_by/crm:P190_has_symbolic_content ?ar , ?he , ?la .
FILTER(LCASE(LANG(?ar)) = "und-arab")
FILTER(LCASE(LANG(?he)) = "und-hebr")
FILTER(LCASE(LANG(?la)) = "und-latn")
}
}
GROUP BY ?place
LIMIT 100
Datasets drawn from the same source (record groups) are merged: the same record in a Hebrew, a Latin and a regional version becomes one place. These places come from four or more datasets.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# Places merged from several datasets
SELECT ?place (COUNT(DISTINCT ?ds) AS ?datasets)
(GROUP_CONCAT(DISTINCT ?title; separator=" | ") AS ?in)
(SAMPLE(?name) AS ?a_name)
WHERE {
GRAPH <https://tools.mehdie.org/> {
?place a crm:E53_Place ;
dcterms:isPartOf ?ds ;
crm:P1_is_identified_by/crm:P190_has_symbolic_content ?name .
?ds dcterms:title ?title .
}
}
GROUP BY ?place
HAVING (COUNT(DISTINCT ?ds) >= 4)
ORDER BY DESC(?datasets)
LIMIT 50
Places with their own attestation period (time spans, negative years are BCE), oldest first.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# The oldest dated places (negative years = BCE)
SELECT ?place (SAMPLE(?name) AS ?a_name) ?from ?to
WHERE {
GRAPH <https://tools.mehdie.org/> {
?place dcterms:temporal ?span ;
crm:P1_is_identified_by/crm:P190_has_symbolic_content ?name .
?span crm:P82a_begin_of_the_begin ?from ;
crm:P82b_end_of_the_end ?to .
}
}
GROUP BY ?place ?from ?to
ORDER BY xsd:integer(STR(?from))
LIMIT 50
The part-of hierarchy (gvp:broaderPartitive) with the primary name of each place and its parent.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# Part-of hierarchy: places and the larger place they belong to
SELECT DISTINCT ?placeName ?parentName ?dataset
WHERE {
GRAPH <https://tools.mehdie.org/> {
?place gvp:broaderPartitive ?parent ;
crm:P1_is_identified_by ?pa ;
dcterms:isPartOf/dcterms:title ?dataset .
FILTER(STRENDS(STR(?pa), "/appellation/primary"))
?pa crm:P190_has_symbolic_content ?placeName .
?parent crm:P1_is_identified_by ?pp .
FILTER(STRENDS(STR(?pp), "/appellation/primary"))
?pp crm:P190_has_symbolic_content ?parentName .
}
}
LIMIT 100
MEHDIE's reconciliation records that a place in one dataset is the same as a place in another
(skos:exactMatch, about 270 links between some 400 places). Because "the same as" is
symmetric and transitive, chains of these links reveal more than was recorded: in SPARQL the path
(skos:exactMatch|^skos:exactMatch)+ follows them in both directions. The 270 links form
168 groups, imply about 200 further matches nobody recorded, give about 150 places a Wikidata link
through a neighbour, and connect 66 groups that no other source links at all.
Starting from Baghdad in the Princeton Geniza Project data, every place that a chain of same-as links leads to. Only the link to Benjamin of Tudela's Baghdad was recorded; the matches with Usaybi'a, Damast, al-Thurayya and Kima (where Baghdad even appears twice) follow only from the chain.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# Baghdad across MEHDIE: every place reachable from PGP's "Baghdad" through a
# chain of same-as links, and whether that match was recorded or only inferred
SELECT ?place (GROUP_CONCAT(DISTINCT ?name; separator=" | ") AS ?names)
(GROUP_CONCAT(DISTINCT ?title; separator=" | ") AS ?datasets) ?match
WHERE {
{
SELECT DISTINCT ?place WHERE {
GRAPH <https://tools.mehdie.org/> {
<https://tools.mehdie.org/place/232920> (skos:exactMatch|^skos:exactMatch)+ ?place .
}
}
}
FILTER(?place != <https://tools.mehdie.org/place/232920>)
GRAPH <https://tools.mehdie.org/> {
?place crm:P1_is_identified_by ?primary ;
dcterms:isPartOf/dcterms:title ?title .
FILTER(STRENDS(STR(?primary), "/appellation/primary"))
?primary crm:P190_has_symbolic_content ?name .
BIND(IF(EXISTS { <https://tools.mehdie.org/place/232920> skos:exactMatch|^skos:exactMatch ?place },
"recorded", "inferred") AS ?match)
}
}
GROUP BY ?place ?match
ORDER BY DESC(?match)
Each group is one place as seen by several datasets, in Hebrew, Arabic and Latin script: Baghdad (7 MEHDIE places), Damascus, Jerusalem, Kufa, Mecca, Ramla, Zabid, Bilbays... A group is identified by its alphabetically first member. Takes a few seconds.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# Groups of places joined by chains of same-as links (4+ places)
SELECT ?group (COUNT(DISTINCT ?place) AS ?places) (GROUP_CONCAT(DISTINCT ?name; separator=" | ") AS ?names)
WHERE {
{
SELECT ?place (MIN(STR(?member)) AS ?group)
WHERE {
GRAPH <https://tools.mehdie.org/> {
?place (skos:exactMatch|^skos:exactMatch)+ ?member .
}
}
GROUP BY ?place
}
GRAPH <https://tools.mehdie.org/> {
?place crm:P1_is_identified_by ?primary .
FILTER(STRENDS(STR(?primary), "/appellation/primary"))
?primary crm:P190_has_symbolic_content ?name .
}
}
GROUP BY ?group
HAVING (COUNT(DISTINCT ?place) >= 4)
ORDER BY DESC(?places)
Pairs of places that were never linked to each other, but are the same place because a chain of same-as links connects them, e.g. the Hebrew Zabid of Benjamin of Tudela and the Zabid of Usaybi'a. About 200 such pairs. Takes a few seconds.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# Matches that were never recorded but follow from a chain of same-as links
SELECT ?nameA (GROUP_CONCAT(DISTINCT ?dsA; separator=" | ") AS ?datasetsA)
?nameB (GROUP_CONCAT(DISTINCT ?dsB; separator=" | ") AS ?datasetsB)
WHERE {
{
SELECT DISTINCT ?a ?b
WHERE {
GRAPH <https://tools.mehdie.org/> {
?a (skos:exactMatch|^skos:exactMatch)+ ?b .
FILTER(STR(?a) < STR(?b))
FILTER NOT EXISTS { ?a skos:exactMatch|^skos:exactMatch ?b }
}
}
}
GRAPH <https://tools.mehdie.org/> {
?a crm:P1_is_identified_by ?pa ; dcterms:isPartOf/dcterms:title ?dsA .
FILTER(STRENDS(STR(?pa), "/appellation/primary"))
?pa crm:P190_has_symbolic_content ?nameA .
?b crm:P1_is_identified_by ?pb ; dcterms:isPartOf/dcterms:title ?dsB .
FILTER(STRENDS(STR(?pb), "/appellation/primary"))
?pb crm:P190_has_symbolic_content ?nameB .
}
}
GROUP BY ?a ?b ?nameA ?nameB
LIMIT 300
About 150 places have no Wikidata link of their own, but another place in their chain has one. Through MEHDIE they become linkable to Wikidata (and to everything Wikidata links to). Takes a few seconds.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# Places without a Wikidata link that get one through a chain of same-as links
SELECT ?place (SAMPLE(?name) AS ?a_name) ?wikidata
(GROUP_CONCAT(DISTINCT ?via; separator=" | ") AS ?through)
WHERE {
GRAPH <https://tools.mehdie.org/> {
?place (skos:exactMatch|^skos:exactMatch)+ ?other .
FILTER NOT EXISTS { ?place skos:closeMatch ?w . FILTER(STRSTARTS(STR(?w), "http://www.wikidata.org/entity/")) }
?other skos:closeMatch ?wikidata ;
dcterms:isPartOf/dcterms:title ?via .
FILTER(STRSTARTS(STR(?wikidata), "http://www.wikidata.org/entity/"))
?place crm:P1_is_identified_by ?primary .
FILTER(STRENDS(STR(?primary), "/appellation/primary"))
?primary crm:P190_has_symbolic_content ?name .
}
}
GROUP BY ?place ?wikidata
ORDER BY ?a_name
Groups of linked places where no member has a Wikidata link: Mosul (Hebrew, Arabic and Latin forms from the Geniza, Tudela, Damast and Usaybi'a data), Shiraz, Basra, Raqqa, Wasit, Ukbara... These connections exist nowhere else.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# Matches only MEHDIE knows: groups of linked places where no member has a Wikidata link
SELECT ?group (COUNT(DISTINCT ?place) AS ?places)
(GROUP_CONCAT(DISTINCT ?name; separator=" | ") AS ?names)
(GROUP_CONCAT(DISTINCT ?title; separator=" | ") AS ?datasets)
WHERE {
{
SELECT ?place (MIN(STR(?member)) AS ?group)
WHERE {
GRAPH <https://tools.mehdie.org/> {
?place (skos:exactMatch|^skos:exactMatch)+ ?member .
FILTER NOT EXISTS { ?member skos:closeMatch ?w . FILTER(STRSTARTS(STR(?w), "http://www.wikidata.org/entity/")) }
}
}
GROUP BY ?place
}
FILTER NOT EXISTS { GRAPH <https://tools.mehdie.org/> {
?place (skos:exactMatch|^skos:exactMatch)* ?m .
?m skos:closeMatch ?w . FILTER(STRSTARTS(STR(?w), "http://www.wikidata.org/entity/")) } }
GRAPH <https://tools.mehdie.org/> {
?place dcterms:isPartOf/dcterms:title ?title ;
crm:P1_is_identified_by ?primary .
FILTER(STRENDS(STR(?primary), "/appellation/primary"))
?primary crm:P190_has_symbolic_content ?name .
}
}
GROUP BY ?group
ORDER BY DESC(?places)
Transitivity also spreads mistakes: one wrong link joins two groups. This lists places joined by a chain whose Wikidata IDs disagree. Some are real errors (Kadima and Raina, Jerusalem and Tel Goded), others differ in granularity (Yazd the city and Yazd the province; Baghdad and the historical Round City). Takes a few seconds.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wd: <http://www.wikidata.org/entity/>
# Possible wrong links: places joined by a chain of same-as links
# whose Wikidata IDs disagree
SELECT DISTINCT ?nameA ?wikidataA ?nameB ?wikidataB
WHERE {
GRAPH <https://tools.mehdie.org/> {
?a (skos:exactMatch|^skos:exactMatch)+ ?b .
FILTER(STR(?a) < STR(?b))
?a skos:closeMatch ?wikidataA .
?b skos:closeMatch ?wikidataB .
FILTER(STRSTARTS(STR(?wikidataA), "http://www.wikidata.org/entity/"))
FILTER(STRSTARTS(STR(?wikidataB), "http://www.wikidata.org/entity/"))
FILTER(?wikidataA != ?wikidataB)
FILTER NOT EXISTS { ?a skos:closeMatch ?wikidataB }
FILTER NOT EXISTS { ?b skos:closeMatch ?wikidataA }
?a crm:P1_is_identified_by ?pa .
FILTER(STRENDS(STR(?pa), "/appellation/primary"))
?pa crm:P190_has_symbolic_content ?nameA .
?b crm:P1_is_identified_by ?pb .
FILTER(STRENDS(STR(?pb), "/appellation/primary"))
?pb crm:P190_has_symbolic_content ?nameB .
}
}
About 5,200 MEHDIE places (4,687 distinct Wikidata items) are linked to Wikidata. These examples start from MEHDIE and ask Wikidata live about the linked items.
MEHDIE finds Antakya's Wikidata item, then asks Wikidata live for every statement that points to another item (country, founder, capital of, ...).
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
# Live from Wikidata: what Wikidata says about a MEHDIE place (Antakya)
SELECT ?property ?value
WHERE {
{ SELECT DISTINCT ?item WHERE {
GRAPH <https://tools.mehdie.org/> { ?place skos:closeMatch ?item }
VALUES ?item { wd:Q80561 }
} }
SERVICE <https://query.wikidata.org/sparql> {
?item ?p ?v .
?prop wikibase:directClaim ?p ;
wikibase:propertyType wikibase:WikibaseItem ;
rdfs:label ?property .
FILTER(LANG(?property) = "en")
?v rdfs:label ?value .
FILTER(LANG(?value) = "en")
}
}
ORDER BY ?property ?value
Direct Wikidata statements from Nablus whose target is also a place in MEHDIE: it replaced ancient Shechem, and it is twinned with Fez, Naples and others.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
# Live from Wikidata: direct relations from one MEHDIE place (Nablus)
# to other places that are also in MEHDIE
SELECT DISTINCT ?relation ?otherName ?target
WHERE {
{ SELECT DISTINCT ?item WHERE {
GRAPH <https://tools.mehdie.org/> { ?place skos:closeMatch ?item }
VALUES ?item { wd:Q214178 }
} }
SERVICE <https://query.wikidata.org/sparql> {
?item ?p ?target .
?prop wikibase:directClaim ?p ;
rdfs:label ?relation .
FILTER(LANG(?relation) = "en")
?target rdfs:label ?otherName .
FILTER(LANG(?otherName) = "en")
}
FILTER EXISTS { GRAPH <https://tools.mehdie.org/> { ?other skos:closeMatch ?target } }
}
ORDER BY ?relation ?otherName
For every place of one dataset (KIMA-SY, 41 places with a Wikidata ID), the types of direct Wikidata relation to any other MEHDIE place. Jena asks Wikidata once per place, so a dataset with hundreds of linked places takes minutes; the figure for the whole graph is below.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
# Live from Wikidata: types of direct relation between the places of one
# dataset (here KIMA-SY) and any other place in MEHDIE
SELECT ?relation (COUNT(*) AS ?links)
WHERE {
{ SELECT DISTINCT ?item WHERE {
GRAPH <https://tools.mehdie.org/> {
?place dcterms:isPartOf <https://tools.mehdie.org/dataset/277> ;
skos:closeMatch ?item .
FILTER(STRSTARTS(STR(?item), "http://www.wikidata.org/entity/"))
}
} }
SERVICE <https://query.wikidata.org/sparql> {
?item ?p ?target .
?prop wikibase:directClaim ?p ;
rdfs:label ?relation .
FILTER(LANG(?relation) = "en")
}
FILTER(?target != ?item)
FILTER EXISTS { GRAPH <https://tools.mehdie.org/> { ?other skos:closeMatch ?target } }
}
GROUP BY ?relation
ORDER BY DESC(?links)
People Wikidata records as born in Antakya before 1500. Change the item or the year to explore other places.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
# Live from Wikidata: people born in a MEHDIE place (Antakya) before 1500
SELECT ?person ?name ?born
WHERE {
{ SELECT DISTINCT ?item WHERE {
GRAPH <https://tools.mehdie.org/> { ?place skos:closeMatch ?item }
VALUES ?item { wd:Q80561 }
} }
SERVICE <https://query.wikidata.org/sparql> {
?person wdt:P19 ?item ;
wdt:P31 wd:Q5 ;
wdt:P569 ?birth .
FILTER(YEAR(?birth) < 1500)
?person rdfs:label ?name .
FILTER(LANG(?name) = "en")
}
BIND(YEAR(?birth) AS ?born)
}
ORDER BY ?born
People born in Baghdad before 1600 who died in another place that is also in MEHDIE, such as al-Ma'mun (died in Tarsus) or scholars who died in Samarra, Kufa or Medina.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
# Live from Wikidata: people born in one MEHDIE place (Baghdad)
# who died in another MEHDIE place
SELECT DISTINCT ?name ?born ?diedIn ?died
WHERE {
{ SELECT DISTINCT ?item WHERE {
GRAPH <https://tools.mehdie.org/> { ?place skos:closeMatch ?item }
VALUES ?item { wd:Q1530 }
} }
SERVICE <https://query.wikidata.org/sparql> {
?person wdt:P19 ?item ;
wdt:P31 wd:Q5 ;
wdt:P20 ?deathPlace ;
wdt:P569 ?b ;
wdt:P570 ?d .
FILTER(YEAR(?b) < 1600 && ?deathPlace != ?item)
?person rdfs:label ?name . FILTER(LANG(?name) = "en")
?deathPlace rdfs:label ?diedIn . FILTER(LANG(?diedIn) = "en")
}
FILTER EXISTS { GRAPH <https://tools.mehdie.org/> { ?other skos:closeMatch ?deathPlace } }
BIND(YEAR(?b) AS ?born) BIND(YEAR(?d) AS ?died)
}
ORDER BY ?born
MEHDIE's people have no Wikidata links yet. This looks up the first 20 DiJeSt scholars in Wikidata by their exact German name: some match one person, others several (Martin Noth the theologian and a musician), which is where entity resolution comes in.
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
# Live from Wikidata: candidate Wikidata matches for MEHDIE people
# (DiJeSt scholars), by exact German name
SELECT ?mehdiePerson ?name ?wikidata ?description
WHERE {
{ SELECT ?mehdiePerson ?name WHERE {
GRAPH <https://tools.mehdie.org/> {
?mehdiePerson a crm:E21_Person ;
dcterms:isPartOf <https://tools.mehdie.org/dataset/329> ;
crm:P1_is_identified_by/crm:P190_has_symbolic_content ?name .
}
} LIMIT 20 }
SERVICE <https://query.wikidata.org/sparql> {
?wikidata rdfs:label ?name ;
wdt:P31 wd:Q5 .
OPTIONAL { ?wikidata schema:description ?description . FILTER(LANG(?description) = "en") }
}
}
Counting the relations for all linked places at once would take about 20 minutes as a federated query, because the endpoint asks Wikidata once per place. Computed directly against Wikidata on 13 November 2026, in batches: 6,557 direct Wikidata statements connect two MEHDIE places (6,227 pairs, involving 3,489 of the 4,687 linked items), using 63 different properties. The 20 most frequent:
| Property | Meaning | Statements |
|---|---|---|
| P17 | country | 2,734 |
| P190 | twinned administrative body | 1,189 |
| P131 | located in the administrative territorial entity | 799 |
| P47 | shares border with | 612 |
| P530 | diplomatic relation | 177 |
| P150 | contains the administrative territorial entity | 146 |
| P36 | capital | 143 |
| P1376 | capital of | 132 |
| P206 | located in or next to body of water | 83 |
| P1889 | different from | 83 |
| P2596 | culture | 61 |
| P361 | part of | 47 |
| P706 | located in/on physical feature | 36 |
| P2348 | time period | 34 |
| P276 | location | 29 |
| P205 | basin country | 27 |
| P138 | named after | 22 |
| P1366 | replaced by | 22 |
| P1365 | replaces | 19 |
| P4552 | mountain range | 16 |
Counted over wdt: (direct, "truthy") statements whose subject
and object are both Wikidata items linked from MEHDIE; statements from an item to itself are left out.