Skip to content

Instantly share code, notes, and snippets.

@antoinecourtin
Last active March 24, 2017 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antoinecourtin/39b313d4b0cdaa1df3b6f2a3ddbfc3a5 to your computer and use it in GitHub Desktop.
Save antoinecourtin/39b313d4b0cdaa1df3b6f2a3ddbfc3a5 to your computer and use it in GitHub Desktop.
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT distinct ?creatorLabel ?datebirth ?datedeath ?placebirthLabel ?coord (CONCAT(STR(?lat),", ",STR(?long)) as ?lat_long) ?placedeathLabel ?coord_2 (CONCAT(STR(?lat_2),", ", STR(?long_2)) as ?lat_long_2)
WHERE {
?creator wdt:P106 wd:Q1028181;
p:P570/psv:P570 [
wikibase:timeValue ?date;
wikibase:timePrecision ?precision
].
FILTER("1500-12-31"^^xsd:dateTime < ?date && ?date < "1800-00-00"^^xsd:dateTime).
FILTER(?precision >= 9).
BIND(YEAR(?date) AS ?year).
?creator wdt:P19 ?placebirth. # lieu de naissance
?creator wdt:P569 ?datebirth.
?creator wdt:P570 ?datedeath.
?placebirth wdt:P625 ?coord.
?placebirth p:P625 ?declaration.
?declaration psv:P625 ?coord_geo.
?coord_geo wikibase:geoLatitude ?lat.
?coord_geo wikibase:geoLongitude ?long.
?creator wdt:P20? ?placedeath.
?placedeath wdt:P625 ?coord_death.
?placedeath p:P625 ?declaration2.
?declaration2 psv:P625 ?coord_geo_2.
?coord_geo_2 wikibase:geoLatitude ?lat_2.
?coord_geo_2 wikibase:geoLongitude ?long_2.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fr,en"}
}
LIMIT 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment