lördag 16 juli 2016

WikiTree "fields" in WikiData

WikiTree "fields" in WikiData



# WikiTree "fields" in WikiData
## WikiTreeID wdt:P2949
## GivenName wdt:P735
## Birth Name wdt:P1477
## Family Name wdt:P734
## Name in native language wdt:P1559
## BirthDate wdt:P569
## BirthLocation wdt:P19
## Father wdt:P22
## Stepfather wdt:P43
## Mother wdt:P25
## Spouse wdt:P26
## Sister wdt:P9
## Brother wdt:P7
## Children wdt:P40
## Relatives wdt:P1038
## DeathDate wdt:P570
## DeathLocation wdt:P20
## PlaceofBurial wdt:P119
Select  
  ?person
  ?personLabel 
  ?personDescription 
  ?WikiTree 
  ?BirthName 
  ?BirthDate 
  ?BirthLocationLabel
  ?MotherLabel ?Mother
  ?FatherLabel ?Father 
  ?SpouseLabel ?Spouse 
  ?DeathDate 
  ?DeathLocationLabel  
  ?FindAGraveID 
  ?pic 
where 
{
   ?person wdt:P2949 ?WikiTreeID .     # All item with WikiTreeID
   OPTIONAL { ?person wdt:P569 ?BirthDate}     # P569 Birth
   OPTIONAL { ?person wdt:P19 ?BirthLocation .}  # P19 Place of Birth
   OPTIONAL { ?person wdt:P22 ?Father .}    # P22 father
   OPTIONAL { ?person wdt:P25 ?Mother .}    # P25 mother
   OPTIONAL { ?person wdt:P26 ?Spouse .}    # P26 spuse

   OPTIONAL { ?person wdt:P570 ?DeathDate .}   # P570 Death date
   OPTIONAL { ?person wdt:P20 ?DeathLocation .}   # P20 Place of Death
#   OPTIONAL { ?person wdt:P119 ?PlaceofBurial .}  # P119 Place of Burial
   OPTIONAL { ?person wdt:P18 ?pic .}          # If Wikidata has a illustration

   OPTIONAL { ?person wdt:P535 ?FindAGrave .}    # FindAGrave

   BIND (URI(CONCAT("http://www.wikitree.com/wiki/",?WikiTreeID)) AS ?WikiTree)
   BIND (URI(CONCAT("http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&df=all&GRid=",?FindAGrave)) AS ?FindAGravef)

   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
limit 10

Inga kommentarer:

Skicka en kommentar