* Dates in Diagrams (Actual|Estimate|Nul)

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Dates in Diagrams (Actual|Estimate|Nul)

Post by davidf » 30 May 2015 20:05

I am trying to make the "Died line" in diagrams more useful - currently they include date and place/address.

I think I have to cope with the following situations:
1) No death or burial details: No "Died line"
2) Age at Death on certificate or in Burial Record and entered in age field for death or burial fact: Show age in "Died line" "Age: xx"
3) Date of Death or Burial known and date of birth known: Show age in "Died line" "Age: about =AgeAt(%INDI%,%INDI.DEAT.DATE:COMPACT%)"
4) Date of Death or Burial known but no date of birth: show no age information in "Died line"

In things like SQL I am comfortable stacking AND OR and NOT booleans: but that knowledge does not seem to apply in FH! I also have a feeling that I am not allowed to construct a compound of text and a function within a conditional expression (required for 3 above?) - even after removing the "="!

So far I have got:
=ExistsText(%INDI.DEAT%,"Died:") %INDI.DEAT.DATE:COMPACT% %INDI.DEAT.PLAC:TIDY% - %INDI.DEAT.ADDR% age: =NotExistsText(%INDI.DEAT.AGE%,"about ") =ItemIf(IsEmpty(%INDI.DEAT.AGE%),AgeAt(%INDI%,%INDI.DEAT.DATE:COMPACT%),%INDI.DEAT.AGE%)

But this fails in situations 1 & 4: "- age: about" appears on a line by itself.
Situation 2 is OK.
Situation 3 displays the required text but not the calculated age

I have seen discussion elsewhere about disentangling the age at burial issue by creating a "dummy" death record. At the moment I am creating these dummy death facts with a date "bef" burial and a source of "Burial Record". I do similarly with Births and Christenings. I don't really like creating dummy facts, but pragmatically it looks like the best way forward in the absence of "Begin-Life" and "End-Life" super-facts.

Suggestions appreciated
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

User avatar
jimlad68
Megastar
Posts: 911
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by jimlad68 » 30 May 2015 21:17

I'm afraid I can't help with the code/lua, but for my deaths where I only know the burial date I nearly always put circa a few days before, similar to your "before". In this situation the date is of course estimated to some degree, but unless there were unusual circumstances, location, murder etc, the death would be between 2 and 10 days before burial, hence my circa a few days before, even if it were more than that, the circa still covers it.

This then resolves the situation of having too much detail in a "concise" diagram by not needing the burial, although I am sure you could include burial date only when there is no death date. Also it helps with things like not exporting the living.

Look forward to your answers.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by tatewise » 30 May 2015 22:50

David, I don't propose to solve your questions comprehensively, but instead give some pointers to follow.

FH functions do support boolean if and or not boolean logic, as explained in the Help topic for Operators.

One possible direction that solves pont 1) and probably simplifies the others is as follows:

Died: =TextIf( Exists(%INDI.DEAT%), Text("Death details"), ExistsText(%INDI.BURI%, Text("Burial details") ) )

Then the Text("Death/Burial details") must be replaced with data refs and functions as necessary.

Text( Text(%INDI.DEAT.DATE:COMPACT%) . " " . %INDI.DEAT.PLAC:TIDY% . " - " . %INDI.DEAT.ADDR% . "Age details" )

Part of the Age details could be handled as follows:

TextIf( Exists(%INDI.DEAT.AGE%), Text( "Age: " . %INDI.DEAT.AGE%), Text( "Age: about " . " AgeAt details" ) )

There need to be more TextIf tests for Date of Death and Date of Birth, etc.

That will lead to an even more complex expression that may exceed length limits. So to simplify things a bit it can be split into two Data Items, one for Death and one for Burial.
e.g.
Death Template: Died: =ExistsText(%INDI.DEAT%, Text( ... ) )
Burial Template: Died: =TextIf( Exists(%INDI.BURI%) and Not(Exists(%INDI.DEAT%)), Text( ... ), )

This works because if the =ExistsText() function produces nothing then the label Died: is suppressed, and likewise for the =TextIf() expression.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by davidf » 31 May 2015 14:46

Mike,

Thanks this will take some working through!

Side Questions:
Text( Text(%INDI.DEAT.DATE:COMPACT%) . " " . %INDI.DEAT.PLAC:TIDY% . " - " . %INDI.DEAT.ADDR% . "Age details" )
1) Why does %INDI.DEAT.DATE:COMPACT% need to be wrapped in its own Text function but %INDI.DEAT.PLAC:TIDY% and %INDI.DEAT.ADDR% don't? Is it because it is doing js style "type conversion" from date to text? Answer: Yes?

2) Likewise the outer Text function is acting as a "wrapper" of the concatenated string. I can see (from help) that it is suggested, but I am not sure of the circumstances when it is required. It looks as if it validates without. There is a danger that I might end up wrapping everything in Text functions just to be safe - I would rather understand the need better!

Splitting into separate lines looks like a good way to go - if only to make debugging easier later tonight!

Thanks again.
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by tatewise » 31 May 2015 17:07

1) Yes, I think you are correct.
Oddly an alternative workaround is "" . %INDI.DEAT.DATE:COMPACT% ...

2) Text() is only needed where there might be any ambiguity or a type conversion is required, and in these examples is not essential (except for %INDI.DEAT.DATE%).

Sometimes a little trial and eror is required!
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by davidf » 31 May 2015 19:46

Thanks again.

So far:
Line: Death Date, Place & Address [Start on New Line]
Died: =TextIf(Exists(%INDI.DEAT%),Text(%INDI.DEAT.DATE:COMPACT%) . " " . %INDI.DEAT.PLAC:TIDY% . TextIf(Exists(%INDI.DEAT.ADDR%)," - ","") . %INDI.DEAT.ADDR%,)
Line: Death Age [NOT Start on New Line]
Age: =TextIf(Exists(%INDI.DEAT.AGE%),Text(%INDI.DEAT.AGE%),TextIf(Exists(%INDI.BURI.AGE%),Text(%INDI.BURI.AGE%),TextIf(Exists(%INDI.BIRT.DATE%) and Exists(%INDI.DEAT.DATE%),"About " . Text(AgeAt(%INDI%,%INDI.DEAT.DATE%)),TextIf(Exists(%INDI.DEAT.DATE%) and Not(Exists(%INDI.BIRT.DATE%)),"Unknown",""))))
Not quite what I want as it gives an isolated Age line if I do not have a death fact
Need to inhibit the age line if there is no death fact and add an age to the burial line if there is no death fact
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by davidf » 31 May 2015 21:13

OK, I think I have got pretty close:

Line: Death Date, Place & Address [Start on New Line]
Died: =TextIf(Exists(%INDI.DEAT%),Text(%INDI.DEAT.DATE:COMPACT%) . " " . %INDI.DEAT.PLAC:TIDY% . TextIf(Exists(%INDI.DEAT.ADDR%)," - ","") . %INDI.DEAT.ADDR%,)
(as previous)

Line: Death Age [NOT Start on New Line] after Death Date, Place & Address line.
=TextIf(Exists(%INDI.DEAT%),"Age: " . TextIf(Exists(%INDI.DEAT.AGE%),Text(%INDI.DEAT.AGE%),TextIf(Exists(%INDI.BURI.AGE%),Text(%INDI.BURI.AGE%),TextIf(Exists(%INDI.BIRT.DATE%) and Exists(%INDI.DEAT.DATE%),"About " . Text(AgeAt(%INDI%,%INDI.DEAT.DATE%)),TextIf(Exists(%INDI.DEAT.DATE%) and Not(Exists(%INDI.BIRT.DATE%)),"Unknown","")))),"")
(amended to suppress lone "age data")

Line: Burial Age [NOT Start on New Line] after existing Burial line
=TextIF(Exists(%INDI.BURI.AGE%) and NOT(Exists(%INDI.DEAT%)),"Age: ".%INDI.BURI.AGE%,"")
This means (I think) that I don't need to enter "dummy death facts" to get the effect I desire in diagrams.
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by tatewise » 31 May 2015 21:24

You have obviously mastered those Text Scheme Templates. I was going to suggest using separate Templates for the Age parts, but you got there on your own.

You could also add the About ... format to Burial Age based on %INDI.BURI.DATE%.

Just spend a little time checking them over with a variety of Age styles (Child, Infant, Younger than, etc) and Date styles (Estimated, Period, Phrase, Range, etc) and all combinations of facts and fields.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by davidf » 01 Jun 2015 09:31

Pretty close but not there yet! Certainly not "mastered" templates.

Age styles (Child, Infant, Younger than, etc):
  • Younger than gives: Died: 16 Jul 1846 Colchester Essex Age: <81 - OK
  • Child, Infant etc. gives: Died: 16 Jul 1846 Colchester Essex Age: Child - not ideal
So I need to test the age to see if it is text and if it is text not write Age:, but (ideally) wrap the "age text" in parentheses: Died: 16 Jul 1846 Colchester Essex (Infant) etc.

That may make the "Death Age" template line longer than the limit so I will have to rewrite it as possibly two lines. "Death Age - Number" and "Death Age - Text".

The current "Death Age" Template that I quoted in my previous post seems to have been trimmed on the right. It should read:
=TextIf(Exists(%INDI.DEAT%),"Age: " .
TextIf(Exists(%INDI.DEAT.AGE%),Text(%INDI.DEAT.AGE%),
TextIf(Exists(%INDI.BURI.AGE%),Text(%INDI.BURI.AGE%),
TextIf(Exists(%INDI.BIRT.DATE%) and Exists(%INDI.DEAT.DATE%),"About " .
Text(AgeAt(%INDI%,%INDI.DEAT.DATE%)),
TextIf(Exists(%INDI.DEAT.DATE%) and Not(Exists(%INDI.BIRT.DATE%)),"Unknown",
"")))),"")
In respect of date styles (of relevance for the AgeAt(%INDI%,%INDI.DEAT.DATE%) clause above) I need to consider how approximate a date can be before I decide that saying the age is About x is too precise and misleading! I presume the AgeAt function tries to compare the given date (death in this case) with another date - presumably the birth date (or [non-adult]baptism/christening date? "Help" is not very forthcoming!). If those dates are within a month or even a quarter, possibly a year, giving an age as About x is probably OK, but if the dates are expressed as ranges that are each say a decade long, even expressing an age is probably inappropriate. I am not sure that FH can handle that degree of calculation!
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by tatewise » 01 Jun 2015 11:54

Personally, I would not worry about Age: Child/Infant. They are rare and it is not meant to be narrative, just a summary.

AgeAt() only works if there is an actual Birth Date, and uses the earlier Date specified wherever a Period or Range is involved, but this is further misleading for Before 1800 or After 1800 where 1800 will be used.

If you want somethng better, then take a look at:
=EstimatedAgeAt( %INDI%, EstimatedDeathDate( %INDI%, MID, 0 ), AVG, 0 )

EstimatedAgeAt() does take Birth/Baptism/Christening dates into account.
EstimatedDeathDate() does take Death/Burial/Cremation dates into account.

They both also use Dates from relations to create estimates where actual Dates do not exist, and may also use Tools > Preferences > Estimates, especially for Before/After dates.

If you are happy to accept such estimates, then may be all you need instead of all those Date tests is something like:
TextIf(
IsTrue(EstimatedAgeAt(%INDI%,EstimatedDeathDate(%INDI%,MID,0),AVG,0) >= 0),
"About " . EstimatedAgeAt(%INDI%,EstimatedDeathDate(%INDI%,MID,0),AVG,0),
"Unknown")


Instead of About you could simply use tilde ~ which is a bit more vague.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by davidf » 01 Jun 2015 13:15

This raises the issue of what the difference (if any) is between:
  • Died age: 81
  • Died age: about 81
  • Died age: estimated 81
I don't think I have really considered these differences before but possibly:

The first ("81") implies that we have some reasonably reliable documentary evidence (death certificate or burial register entry with a trusted age, or a reliable date of birth and date of death) that we are happy to display alongside the death or burial fact. (Arguably we should only record an age against a fact if the source gives an age?) So "81" means "81" or just possibly 80½ to 82½? Or should a bare "81" mean "81" - and anything else should be prefixed "about"? You can't enter "app 81" in an age field!

So possibly my "about" in the templates in previous posts (based on an age calculated from knowing birth and death dates) is being unnecessarily cautious. It is not the calculation that causes the lack of precision, but the uncertainty over the reliability or precision of the recorded data (dates or ages)

The second ("about 81") should imply that we cannot say with precision; either there is no reliable direct documentary evidence - but other evidence is highly indicative, or the direct documentary evidence may not be as reliable as we would like. Thus we want to imply uncertainty; "81" could be as low as 79 or as high as 83?

The inclusion of the "about" should be triggered by a death date being ranged or "app", or for calculated ages, the birth date being ranged or "app" or "cal".

The third ("estimated 81"), especially as calculated by EstimatedAgeAt() or EstimatedDeathDate(), you are saying we have no direct clue but can place them on a timeline relative to others and deduce possible dates and hence ages. Does the "0" in the estimated functions restrict the calculating to data about the individual (e.g. Census ages, stated ages at marriage etc.?) and does an explicitly stated age at death or burial over-ride these ages - or do they all go into the calculation?

For the time being I think I am inclined to change my previous solution to saying "81 (calc)" rather than "about 81" when using the AgeAt function (based on an age calculated from knowing birth and death dates). That is reasonably simple.

It is then a second degree problem of when to introduce any precision related "est" or "approx" indication - when the dates used in the AgeAt function lack precision. And this may not be possible.

If the "granularity" of the dates is years (i.e. "born 1780" rather than "Dec 1780" - "monthly granularity") I am happy to say (a reliable) "born 1780, died 1861" implies "age 81". The age granularity match the dates granularity.

Note though "born 1780" could mean "born 31 Dec 1780" and "died 1861" could mean "died 1 Jan 1861" - when the age would be "age 80 years and 1 day". I will live with that!

But "born 1780, died between 1861 and 1871" is not "aged 86"! Even "aged approx 86" whilst better, feels uncomfortable.
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by tatewise » 01 Jun 2015 14:05

The estimation functions use a common sense approach. Here is a quote from Simon Orde in a reply to a question about the Generation parameter being set to "0":
The EstimatedBirth/DeathDate functions don't work as you expected. Both functions work hard to try to estimate a person's birth or death date based on known information about them. For birth date, for example, obviously, if a person's birth date is given, that trumps everything. But there may be other ways of calculating the date. For example, if the date of an event is known, and the person's age at the time of the event is also given, we can calculate the birth date precisely. If we can't do that, we will guess that an ordinary baptism or christening year, is the year of birth. If that doesn't give us a date, we will try to calculate a person's birth date from their date-of-death, from the dates of birth of any children they have (together with some reasonable assumptions about child-bearing ages for men and women), from the dates of their marriages if known (together with assumptions about marriage ages), from their parent's birth dates (together with assumptions about child-bearing ages for their parents), and from their spouse's birth dates.

If all that fails to deliver a usable result, we will look at the dates of any other events in the person's life that we may have. At this point (and only at this point), if we have a 'generation' figure, we will also start to go off and look at ancestors and descendants and see if we can estimate their birth dates. If we can, that will give us some kind of range (using reasonable estimates about child-bearing ages again), and we will also factor in the dates of the 'any other events' that we may have, as an additional check.

To sum up, the 'number of generations' to check figure is used, but only for last-stage checking, if earlier checks failed to deliver a usable result.
Regarding, you comments about when to use about or estimated, you have overlooked some important information. In the Diagram Boxes will be key Dates for Birth and Death, etc. So the reader can see how accurate those Dates are, and therefore how accurate the Age at Death value is likely to be. In other words, as in all good databases, don't duplicate information. Age: means an actual age taken from the Death/Burial Event, whereas Age: About means calculated/estimated, either from Dates in the same Box or alternatively from Dates in the Boxes of surrounding Relations. But the reader can see what Dates are available, and should be aware of the likely range of estimation in the stated Age.

If you really want to go overboard, then use the Estimate functions to produce earliest/minimum and latest/maximum Ages and display both figures if different.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by davidf » 01 Jun 2015 15:18

Thanks for the background on the Estimating Functions and the Generation parameter - could usefully be in the help system?

We have moved away from my origin query from a question about templates to the philosophy of databases (and probably lost many readers!). I shall leave a mod to move this to a different place if required.
In the Diagram Boxes will be key Dates for Birth and Death, etc. So the reader can see how accurate those Dates are, and therefore how accurate the Age at Death value is likely to be. In other words, as in all good databases, don't duplicate information.
Agree - partially.
1) If we have a range for a date of birth, but an age at death in years and months, do we draw conclusions about the accuracy of the date of birth or the reliability of the age at death?
2) In for instance business databases all data has similar standing so the database rules about not duplicating apply. The "head office address" for a customer does not vary depending on where it is held so should only be held once. "Head office" is always "head office".

However for genealogical databases the data does not necessarily have similar standing. "Age" against a fact can vary.
%INDI.CENS.AGE% is "age as asserted by the head of household" to the census enumerator for that census
AgeAt(%INDI%, %INDI.CENS[n]%) is "age at the date of census as calculated by reference to the asserted date of birth (subject to the way the calculation handles dates of birth!)"
%INDI.DEAT.AGE% is "as on (for instance) a death certificate - as asserted by the person notifying" at time of death.
AgeAt(%INDI%, %INDI.DEAT%) is "age at the asserted date of death as calculated by reference to the asserted date of birth (subject to the way the calculation handles dates of birth!)"

I shall ignore the argument that each instance of age should be calculated (as an account balance is calculated in a business database) - because that just shifts the problem back to multiple alternative derived dates of birth!

Against an individual we may have numerous (and conflicting) ages - so we want to record and hold them all. We actually want to hold them not against the fact but against the citation (which can be an instance of a source depending on how you treat the source field). Perhaps we should conclude that the age we enter against the fact is the researcher's conclusion about the age and it should be capable of being expressed with a range of precision (such as we can for dates). Then we simply display the age held against the fact?
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

User avatar
tatewise
Megastar
Posts: 27088
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by tatewise » 01 Jun 2015 15:53

I will add Simon's quote to the how_to:understanding_functions|> Understanding Functions.

Sounds to me you are saying that all the Dates and Ages have varying degrees of reliability, and I agree, so any attempt to quantify the Age value in a Diagram Box is pointless beyond identifying it as a copy of the Age field, or an approximation estimated/calculated from other information that is summarised in the Diagram but can only be investigated in detail via the Property Box and Source Citations. There are just too many variables to do any better.

So reviewing your original posting:

1) No death or burial details: No "Died line"
2) Age at Death on certificate or in Burial Record and entered in age field for death or burial fact: Show age in "Died line" "Age: xx"
3) Date of Death or Burial known and date of birth known: Show age in "Died line" "Age: about =AgeAt(%INDI%,%INDI.DEAT.DATE:COMPACT%)"
4) Date of Death or Burial known but no date of birth: show no age information in "Died line"
I would propose that is revised as follows:
1) Achieved
2) Achieved
3) If an EsitmatedAgeAt Death then show "Died line" "Age: About xx"
4) If no EsitmatedAgeAt Death then show "Died line" "Age: Unknown"
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: Dates in Diagrams (Actual|Estimate|Nul)

Post by davidf » 01 Jun 2015 18:05

... any attempt to quantify the Age value in a Diagram Box is pointless beyond identifying it as a copy of the Age field, or an approximation estimated/calculated from other information that is summarised in the Diagram but can only be investigated in detail via the Property Box and Source Citations.
True, but I use a diagram with a comprehensive text scheme as my main working "view" so I like to see the detail! For publication a less complex scheme is appropriate.

I agree that I think the best we can get to is as you suggest.
  1. Achieved (No death or burial details: No "Died line")
  2. Achieved (Age at Death on certificate or in Burial Record and entered in age field for death or burial fact: Show age in "Died line" "Age: xx")
  3. If an EstimatedAgeAt Death then show "Died line" "Age: About xx"
  4. If no EstimatedAgeAt Death then show "Died line" "Age: Unknown"
The only other point possibly worth mentioning in this thread is that if you want to enter an age "at Burial", you need to Edit the Burial fact and tick the "age" box. (Access via "More Fact Types" (not directly from quick menu in V6) > More > Edit).

Thanks for your help.
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)

Post Reply