Husky22
Joined 12 February 2013
I'm from Mannheim (Q2119), Germany (Q183).
Projects
editHospitals in Mannheim
editOK
List
edit- Diakonissenkrankenhaus Mannheim (Q1208291)
- Mannheim University Hospital (Q1276773)
- Theresienkrankenhaus und St. Hedwig-Klinik (Q1669425)
- ZI Mannheim (Q190621)
Links
editSPARQL scripts
editAll Wikidata entries in Germany without Property:P131 that have Property:P625
edit- Timeout, therefore need to be constraint (here with ?item wdt:P31 wd:Q532. which is suboptimal)
#title:map view of all German wikidata entries without [[Property:P131|liegt in der Verwaltungseinheit <small dir="ltr">(P131)</small>]]
#defaultView:Map{"hide":"?rgb"}
SELECT ?item ?itemLabel ?itemDescription (GROUP_CONCAT(DISTINCT ?whereLabel; SEPARATOR=', ') AS ?whereLabels) (SAMPLE(?image) AS ?image) ?coord ?rgb ?layer WITH {
SELECT DISTINCT ?item WHERE {
?item wdt:P17 wd:Q183 .
?item wdt:P31 wd:Q532.
?item wdt:P625 [] .
minus {?item wdt:P31 wd:Q34770}
FILTER NOT EXISTS {
?item wdt:P131 [] .
}
}
} AS %subquery1 WHERE {
INCLUDE %subquery1 .
?item wdt:P31 [] .
?item p:P625 ?coordStatement .
?coordStatement ps:P625 ?coord .
#MINUS { ?coordStatement prov:wasDerivedFrom/pr:P143 wd:Q169514 } # imported from Wikimedia project: Swedish Wikipedia
#MINUS { ?coordStatement prov:wasDerivedFrom/pr:P143 wd:Q837615 } # imported from Wikimedia project: Cebuano Wikipedia
#MINUS { ?coordStatement prov:wasDerivedFrom/pr:P248 wd:Q1194038 } # stated in: GEOnet Names Server
OPTIONAL {
?item wdt:P131 ?where .
OPTIONAL {
?where rdfs:label ?whereLiteral .
FILTER(LANG(?whereLiteral) = 'de') .
}
}
BIND(IF(BOUND(?where), IF(BOUND(?whereLiteral), ?whereLiteral, STRAFTER(STR(?where), 'entity/')), 'no P131') AS ?whereLabel) .
OPTIONAL { ?item wdt:P18 ?image }
BIND(IF(EXISTS { ?item p:P18 [] }, '0000ff', 'ff0000') AS ?rgb) .
BIND(IF(EXISTS { ?item p:P18 [] }, 'With image', 'Without image') AS ?layer) .
SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE,de,en]' }
} GROUP BY ?item ?itemLabel ?itemDescription ?whereLabels ?coord ?rgb ?layer
All Wikidata entries in Germany without proper Property:P131
edit#defaultView:Map{"hide":"?rgb"}
SELECT ?item ?itemLabel ?itemDescription (GROUP_CONCAT(DISTINCT ?whereLabel; SEPARATOR=', ') AS ?whereLabels) (SAMPLE(?image) AS ?image) ?coord ?rgb ?layer WITH {
SELECT DISTINCT ?item WHERE {
?item wdt:P17 wd:Q183 .
?item wdt:P625 [] .
{?wo wdt:P31 wd:Q1221156 .}
minus {?item wdt:P31 wd:Q34770}
FILTER NOT EXISTS {
?item wdt:P131 [] .
}
FILTER EXISTS {
?article schema:about ?item .
?article schema:isPartOf <https://de.wikipedia.org/> . #Targeting Wikipedia language where subjects has no article.
}
}
} AS %subquery1 WHERE {
INCLUDE %subquery1 .
?item wdt:P31 [] .
?item p:P625 ?coordStatement .
?coordStatement ps:P625 ?coord .
#MINUS { ?coordStatement prov:wasDerivedFrom/pr:P143 wd:Q169514 } # imported from Wikimedia project: Swedish Wikipedia
#MINUS { ?coordStatement prov:wasDerivedFrom/pr:P143 wd:Q837615 } # imported from Wikimedia project: Cebuano Wikipedia
#MINUS { ?coordStatement prov:wasDerivedFrom/pr:P248 wd:Q1194038 } # stated in: GEOnet Names Server
OPTIONAL {
?item wdt:P131 ?where .
OPTIONAL {
?where rdfs:label ?whereLiteral .
FILTER(LANG(?whereLiteral) = 'de') .
}
}
BIND(IF(BOUND(?where), IF(BOUND(?whereLiteral), ?whereLiteral, STRAFTER(STR(?where), 'entity/')), 'no P131') AS ?whereLabel) .
OPTIONAL { ?item wdt:P18 ?image }
BIND(IF(EXISTS { ?item p:P18 [] }, '0000ff', 'ff0000') AS ?rgb) .
BIND(IF(EXISTS { ?item p:P18 [] }, 'With image', 'Without image') AS ?layer) .
SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE,de,en]' }
} GROUP BY ?item ?itemLabel ?itemDescription ?whereLabels ?coord ?rgb ?layer