Thanks, both James and Markus!

Yes, James, dating someone or something to 15th century makes sense. But in my discipline, photo history, it kind of drives me batty when I see a museum or library say a photographer was active 19th century- suggesting they may have been making photos 20 years before the invention of photography! But I can certainly understand its usefulness elsewhere. So thanks for alerting me to P2031 & P2032. This is all still very new to me.

d

On Mon, Nov 23, 2015 at 1:22 PM, James Heald <j.heald@ucl.ac.uk> wrote:
Your best bet for "plain-language" dates is almost certainly post-processing with a script language of your choice.

It *can* be done in SPARQL, but it's not pretty and may not be sufficiently efficient.  See:

   http://tinyurl.com/qx8rmv7

achieved by adding the following in the SELECT line:

    (CONCAT(str(day(?dob)),' ',?month_label,' ',str(year(?dob))) AS ?dmy_dob)


and the following in the main WHERE block, to look up the label for the n'th Gregorian month:

  ?month p:P279 ?stmt .
  ?stmt  v:P279 wd:Q18602249 .
  ?stmt  q:P1545 ?month_no .
  FILTER (xsd:integer(?month_no) = month(?dob)) .
  ?month rdfs:label ?month_label filter (lang(?month_label) = "en").


----

Turning to the other parts of your post: the best way to distinguish day-accurate for year-accurate (or century-accurate) dates is to get use more detailed "node" form of the date property, and then look at the corresponding value of wikibase:timePrecision

So the following snippet selects for day-specific dates of death, but only year-specific dates of birth:

       ?item p:P569/psv:P569 ?birth_date_node .
       ?birth_date_node wikibase:timePrecision "9"^^xsd:integer .
       ?item p:P570/psv:P570 ?death_date_node .
       ?death_date_node wikibase:timePrecision "11"^^xsd:integer .

----

I am sure we do have a number of people born "15th century"; and certainly buildings or artworks with such a date that is only century-specific.

"Active" dates can be specified using

P2031  work period start
P2032  work period end

or, for spot dates

P1317  floruit

these dates can be year-specific, or decade-specific, or century-specific, in the usual way.


"circa" can be specified by adding to the date the qualifier

P1480  sourcing circumstances

with the value Q5727902 "circa"

Some other potential values are given at
   https://www.wikidata.org/wiki/Property_talk:P1480

This query gives counts for the values currently in use.
   http://tinyurl.com/ou4jlup


All of these should ideally be watched out for when retrieving data.


Hope this helps!

All best,

   James.








On 23/11/2015 16: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.

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@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata



_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata