Addin to verify birth spacing of children

Gramps 5.1.5 running on 64-bit Fedora 36.

I have run across quite a few families in Family Search where the spacing of child birth just does not work. How can a woman have two children only five or six months apart?

I probably have some of that ratty data in my local database. Is there an add-in of some kind that can search through the children of a family and flag those whose birth dates are too close?

This would probably be a very difficult add-in to write since there are many conditions that have to be ignored. Still, if it exists it would be another useful sanity check.

Thanks - Bill Gee

There is the addon tool Sort Children in Birth Order

Tools like this scare me. When I first migrated to Gramps I ran the Sort Events tool. It was blunt and moved most of my Burial records to the first event for the person. I spent more time fixing this mistake, (I was so new I did not even think about a clean import of a backup.) So the major caveat is to make sure you have a recent backup to revert any actions the tool may automatically make.

I have not run this tool but from the screenshot, it looks like it allows the user control of children movement up and down and does not automatically move a child with no known birth event to the top of the list.

Maybe I will unhide the addon and see what it discovers.

I use “Sort children in birth order” all the time. It is very useful, but does not tell me anything about children that were born too close together. I have to visually examine the family record and make mental calculations about each birth interval. It would be nice to have a tool that goes through everything and picks out candidates for closer examination.

I use the “Accept All *” button in the BirthOrderTool. That button sorts only families for whom there is a reasonably unambiguous birth date for all children.

The Verify the Data tool would seem to be the tool to handle this task but it seems that a minimum age between children (10 months) is lacking.

The tool does look at the maximum years between the birth of one child to the next child. This seems to be the type of analysis needed to look at the minimum time between children’s births.

But alas, I am not a coder. I can only tweak what someone else has created.

I tried a quick hack for this. It’s not a solution, it was just an experiment.

In /plugins/tool/verify.py, in the class LargeChildrenAgeDiff, I changed this line:

           max(child_birh_dates_diff) / 365 > self.c_space)

to this:

           min(child_birh_dates_diff) / 365 < 1)

Then, when running the tool, the families appearing with the warning “Large age differences between children” were actually those with children who were born less than a year apart. (In my tree, those cases turned out to be ok, they were just slightly under a year apart, so the warning should actually be based on months. Or, one might wish to find all families who had children within some other range, for some other purpose, though perhaps that would be better as a filter rule rather than a tool.)

Unfortunately, it also included many other families, I guess because they had some children lacking birth dates, though I’m not certain that’s the reason.

I don’t plan to carry this any further, just providing a lead for anyone else who has the interest to pursue it.

1 Like

Took it a step further.

Made the parameter 10 months (305 days).

Add to the family rule list (line 455)

YoungChildrenAgeDiff(self.db, family, cspace, estimate_age),

Then add the new class at the end of the file

class YoungChildrenAgeDiff(FamilyRule):
    """ test if any of a family's children were born too close together """
    ID = 36
    SEVERITY = Rule.ERROR
    def __init__(self, db, obj, c_space, est):
        """ initialize the rule """
        FamilyRule.__init__(self, db, obj)
        self.c_space = c_space
        self.est = est

    def _get_params(self):
        """ return the rule's parameters """
        return (self.c_space, self.est)

    def broken(self):
        """ return boolean indicating whether this rule is violated """
        child_birh_dates = get_child_birth_dates(self.db, self.obj, self.est)
        child_birh_dates_diff = [child_birh_dates[i+1] - child_birh_dates[i]
                                 for i in range(len(child_birh_dates)-1)]

        return (child_birh_dates_diff and
                min(child_birh_dates_diff) / 305 < 1)

    def get_message(self):
        """ return the rule's error message """
        return _("Less than 10 month age differences between children")

It works with exact dates and partial dates with the Estimate missing or inexact dates checked but not when a child has no birth date and is between two siblings that are a little more than a year apart.

Interesting! It sounds like creating a “SmallChildAgeDiff” plugin might not be as hard as I thought. At least it would not require completely starting from scratch. I am not inclined to work on it myself. My Python skills are rudimentary at best.

As you note, though, there are still some other issues to look at. The actual problem age difference is about ten or eleven months. It is not a hard cutoff. Second, it really only works when the two successive children have birth dates resolved to at least the month, and preferrably to the day. Birthdates of “about”, “between”, “circa”, just a year and blank are not useful, and people with dates like that should be ignored.

Another potential age problem could be a case where one child is born sometime from about March to October, and another child is born the same year but without either month or day being specified. Those two children are either twins or impossible.

I can also see a case where (for example) child A is born in November 1900, child B is born in 1901 (no month or day specified) and child C is born in February of 1902. There is not enough time there for all three children even though it would be possible for either pair (A-B or B-C) to exist.

A better reading of the help wiki clarifies what is meant by ‘estimate missing’. If there is no Birth date, the tool will use a baptism event date. A burial date will replace the death date if it is missing.

Twins get picked up in the error. I am wondering if/how these can be excluded.

Question: Is 305 days (10 months) the timespan for the tool or do I make a true 275 days (9 months) the search parameter?

9 months vs. 10 months … Hmmm… I don’t have a firm opinion on it. I suspect 10 months is a better elapsed time.

As for twins - Is it possible to skip when the age difference is less than (pick a number) three days? Twins are normally born the same day, but it is possible to get a situation where one twin is born at 11:55pm and the next at 12:10 am which results in a one day difference. I think even for larger multiple births (triplets, quads etc) one day should suffice.

For my use, getting a perfect set of results is not required. I am more interested in getting a report that I can use to investigate possible errors. The Records report serves the same purpose. If I see someone who died at age 160, I will take a close look!

Adding the parents marriage date in the items considered would allow another sanity check.

It is not nearly so firm a limit as the biological pregnancy intervals. But a less than 9 month interval from marriage to birth warrants a 2nd look. And births well before a marriage make it reasonable to check if a step-parent relationship should exist for 1 parent instead of a biological relationship.

This may not help you, but I use a free tool on Windows that analyses Gedcom files and looks for many error conditions, two of which are
‘Child born too soon after sibling’ and ‘Child likely born too soon after sibling’.
I haven’t seen these conditions and I’m not sure whether there are parameters to adjust how this behaves.

The tool is called FTAnalyzer and can be found in the Microsoft store. It does a lot of very useful stuff.

Interesting! Too bad it does not run on Linux. I see that they offer a
regular download version in addition to the Windows Store version. The
download version should run on Windows 7 and later.

I could easily export a GEDCOM just to run through something like this.
But no Linux version is pretty much a show-stopper for me.

Definitely not a firm limit. But certainly worth 2nd looks.
Between premature births and ‘shotgun weddings’, less than 9 months between wedding and birth of first child isn’t unheard of…
A set of my great-grandparents were married on 31 October. 1st kid born 09 April the next year… so I think it was a bit of a ‘forced’ wedding.

My sister was a miracle baby too… so well developed despite being premature. :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.