PR #941 - Improved Age Stats gramplet

I have been working on an improved Age Stats gramplet in pull request #941.

See screenshot below:

It has similar functionality to the old gramplet. Hovering over a bar highlights it. Double clicking on a bar shows a quick report of the people within the selected range.

I have added an orange bar for values exceeding the maximum range set in the configuration. The chart also automatically resizes.

Any comments and suggestions are welcome.

Perhaps we should separate the charts into separate gramplets? Would some pie charts be useful?

3 Likes

Oh I like that! Do the age stats include living people, or just those with dates of death?

Phil.

The lifespan chart only includes people with a death event, but the parent-child age difference charts include living people.

This looks really great… No need to split the different charts, other than if its possible to print them, then i be a feature to have one chart on one page, or one chart printed to one image file… May be easier to usee in different presentation maybe, if they are separate…?

Wow! that’s a big improvement on the old text based chart!

One immediate thought… Could you break out separate “0” & “<1” rows? The Stillborn & Infant Mortality are typically stats that interest people.

Any chance you might create a re-usable routine to add QuickReport pop-up menu item to export the selected data to the body of a new ‘ToDo’ Note? …one where the export that preserves the hotlinks? If the current ‘copy’ clipboarded links in addition to plain text, it would provide a similar functionality. I know I’d love to be able whip up a pre-linked Note from the Pedigree or Deep Connections gramplet!

It wouldn’t have to save immediately… but that data opened in the Note Editor would make a nice working list that could be trimmed before saving.

1 Like

Thanks for this useful addon. Unfortunately, in my version 5.1.5 the statistics are still output as text but with special characters. How could one correct the statistic display?
Screenshot from 2022-11-02 16-45-27

You are still using the the original built-in or the manually patched version referenced above?

Your screen capture looks like a font mismatch. The original uses text to represent the bars. I’m not sure how the manually installed version draws those graphical bars.

I use the original addon with the following update URL:
https://raw.githubusercontent.com/gramps-project/addons/master/gramps51
I also think it’s a font issue, because when copying and pasting the text into a text editor, the characters suddenly become visible in a human-readable way.

That URL does not work for me.

Did you update all 3 (or 4 if you are using a non-english installation) core files listed in the commit?:

  • gramps/gui/widgets/__init__.py
  • gramps/gui/widgets/histogram.py
  • gramps/plugins/gramplet/agestats.py

Thank you very much for the feedback. I have updated/added the mentioned files manually and the plugin is working now. :slight_smile:

Can the Age Stats data be affected by the Filter Gramplet or a Custom Filter?

It is more likely that Age Stats would be useful on a specific branch of population subset than on the undifferentiated population of the entire tree. For instance, Age Stats on a person’s ancestors (and possibly, their sibs) would be a useful predictive demographic.

1 Like

It reads the whole database at the moment. Perhaps we could apply a filter to all gramplets in the dashboard?

1 Like

That would be great!

I could never figure a use for things like Top Surnames or Related Relatives on a tree with tens of thousands of People.