onsdag 13 juli 2016

Burial places of Wikitree people also connected to Wikidata

#SPARQL query in Wikidata
# Find all people with WikiTreeID => they have a profile in WikiTree
# Display on the map if they have burial place

# In the popup wikdow show illustration from Wikidata and URL to WikiTree
#defaultView:Map
SELECT ?person ?ppicture ?personLabel ?personDescription ?WikiTreeIDf ?FindAGravef ?FBf ?Genealogicsf ?coord3 ?loc3Label WHERE {
{
   ?person wdt:P2949 ?WikiTreeID . # All item with WikiTreeID
   OPTIONAL { ?person  wdt:P535 ?FindAGrave }  # FindAGrave
   OPTIONAL { ?person wdt:P1819 ?Genealogics }  # Genealogics
   OPTIONAL { ?person wdt:P2013 ?FB }   # Facebook
   OPTIONAL {  ?person wdt:P119 ?loc3 . # P19 Place of Burial
    ?loc3 wdt:P625 ?coord3 } .     # Get coordinates from Place of Burial
   OPTIONAL {?person wdt:P18 ?ppicture}         # If Wikidata has a illustration use that

   BIND (URI(CONCAT("http://www.wikitree.com/wiki/",?WikiTreeID)) AS ?WikiTreeIDf)
   BIND (URI(CONCAT("http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&df=all&GRid=",?FindAGrave)) AS ?FindAGravef)
   BIND (URI(CONCAT("http://www.genealogics.org/getperson.php?tree=LEO&personID=",?Genealogics)) AS ?Genealogicsf)
   BIND (URI(CONCAT("https://www.facebook.com/",?FB)) AS ?FBf)
  
}
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
LIMIT 10000

-----

Result

Inga kommentarer:

Skicka en kommentar