On 23.11.2015 17:55, David Lowe wrote:
I'm working at the moment finding places of birth
for photographers who
have birthdates but lack locations (my query is below). Ultimately I'll
be comparing WD's photographer info to my own database of photographer
biographies. This leads me to a few questions regarding dates:
How can I query out the date data in plain language (20 July 1982 vs.
1982-07-20T00:00:00Z)?
I need this so I can distinguish between someone actually born January
1, 1900 and someone whose birth date is given as simply 1900, or someone
with a date given simply as 19th century.
You cannot query for "formatted English date strings" in this sense, but
you can specify the desired (minimum) precision for retrieved dates in
your query. To do this, you need to access the full value (rather than
the simplified one that you get with the wdt property). I don't have the
details now, but the RDF documentation specifies how the full values are
encoded in RDF. You will need to go via the statement nodes in this
case. So the query becomes a bit bigger, but in exchange you can access
every detail that you could find on Wikidata.
Good luck,
Markus
How do folks feel about giving lifedates as centuries (born: 19th
century)? I personally would not do it. In my own database, if lifedates
are not known we give "active" dates. For example I would have
Alexander Möhlen (German, active 1900s-1910s)
<https://www.wikidata.org/wiki/Q2642705>.
Is there a concept such as "Period of Activity" that could be used, or
would others find this desirable?
Is there a way to record uncertainty in dates (circa or ca.)?
Many thanks in advance,
David
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX v: <http://www.wikidata.org/prop/statement/>
PREFIX q: <http://www.wikidata.org/prop/qualifier/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?photographer ?photographerLabel ?photographerDescription ?dob
WHERE {
?photographer wdt:P106 wd:Q33231 .
?photographer wdt:P569 ?dob .
FILTER NOT EXISTS { ?photographer wdt:P19 ?pob .}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
} Order by ?photographerLabel
_______________________________________________
Wikidata mailing list
Wikidata(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata