Degrees of separation filter

It seems that when using the ‘Add Existing’, the objects we will most likely want are already linked to people within a couple degrees of separation of the Active Person.

As an example, as I Add a sibling, most of the desired Places/Sources/Citations that already exist will already be Referenced by the people VERY closely related to the person being Added. (A similar function for the People view would have to be based on Home Person instead of Active Person or the view would be in constant update.)

If we could have a Selector filter option that limited to that subset of Objects, selection navigation would be much faster.

There would need to be a fuzziness adjustment to change the degrees of separation.

  • Zero degrees are objects of the Active Person (self). Useful for an obituary source or when a person is born, lived, died & was buried locally.
  • One degree expands to include immediate family (parents, sibs, spouses & offspring).
  • 2 degrees expands to extended family (immediate family of immediate family - including grandparents, grandkids, in-laws, aunts, uncles, nieces & nephews)
  • 3 degrees is probably as far as such a filter would be responsive enough for casual use.

Among the place this kind of feature would most helpful is when merging branches. After you merge the first node, you’d make them the Home Person, going into the Person category view (set to 2 degrees) would let you quickly select & merge the extended family. But more importantly, after each Person merge, you could Flip through the other Categories (with the degrees set to zero/self) and quickly merge those objects.

2 Likes

I’m currently working on filter rules which allow to filter for people based on degrees of seperation.

2 Likes

That’s great!

If it pans out, hopefully there will be a way to get it into some of the selectors too! The hierarchical Place Tree in my database has grown unruly in the last year. So selecting a place has become more of a chore. It’d be nice if Gramps pre-pruned the less likely candidates for me.

(If there’s a family plot or an ancestral home, I keep searching for the same placenames. If I’m filling in a family from an obit or Census, I now rely on Clipboarding a lot. But the clipboard has to be repopulated each session.)

I don’t yet have any experience merging branches, but I think I understand your point about having to repeatedly search for the same Place as you work with records for a set of people like that.

Perhaps another solution that could be helpful would be the ability to select multiple events and assign all of them to the same Place with a single action. This would be done from the Event category view. You could use a custom filter to see events for people within a certain degree of separation of the home person or a bookmarked person, for example, or simply sort the event list by Last Changed date to see the batch that you just entered, or whatever way is useful, and then select all of the ones that you wish to assign to a given place. Then you would click on some new button or link that allows you to set the Place for all of the selected Events, without having to go through the place selection dialog for each one. I have no idea how simple or difficult something that would be to program, or if there are other consequences to consider, but simply from a user productivity perspective it seem it would be useful to be able to select multiple things (in this case, Events) and perform an identical action to each of them (in this case, setting the Place).

Another example of where similar functionality might be useful is when adding people to a census event. Currently I have to create the census event for one person in the household, then go into each other member of the household and add them to the event (unless there’s a faster way that I haven’t discovered yet). It would be nice to simply select all of those other household members from the People category view (again, perhaps using a custom filter for degree of separation), select the ones I want, and then launch some dialog from which I could add all of them at once to the event. And again, I have no idea about the complexity or possible consequences, it just seems like it would be a timesaver.

(I realize there is already the capability to select multiple things and then click on “Edit…” but that just opens multiple dialogs.)

1 Like

Something like this?

https://gramps-project.org/bugs/view.php?id=11181

1 Like

I, too, have been working on some filters to identify different groups of people such as “first cousins”, “second cousins twice removed (down)”, etc. I would appreciate more discussion on this, since I’m not sure if I’m going about it in the most efficient manner.

What I’ve done so far is to consider each of the possible degrees of separation as fitting into this pattern:

the children (of the children (of the children)) etc., nested from zero to many times

of the siblings (used zero or one time only)

of the parents (of the parents (of the parents)) etc., nested from zero to many times

of a given person (the home person, a bookmarked person, etc.)

That pattern could probably be better expressed in a more formal grammar notation, but here some examples:

If I’m looking for first cousins of a given person, they are the children of the siblings of the parents of the given person. So first I have a filter that returns the siblings of the parents of the given person (that is to say, an “aunts and uncles” filter), then another filter that returns the children of the people who were selected by the first filter.

If I’m looking for the second cousins twice removed (down), they are the children of the children of the children of the children of the siblings of the parents of the parents of the given person. This of course involves more nesting of filters.

The number of times that “parents” occurs indicated the degree of cousin (in the examples above, 1 for first cousin and 2 for second cousin).

The number of times that “parents” occurs, minus number of times that “children” occurs, indicates the degree of removal (in the examples above, 1 - 1 = 0 meaning no removal, and 2 - 4 = -2 meaning twice removed down).

I think the definition works for other relations as well (great-nephews, etc.) by omitting either “children” or “siblings” or “parents” from the chain (which is why I specified their occurrence as zero to many, or zero or one).

I have not yet tested my filters thoroughly, only spot checked the results by using the relationship calculator quick view. And I have not yet considered all of the complexities of half cousins, step cousins, people who are cousins multiple ways, etc. Performance is fine so far but I’m not sure how well it will scale (I currently have about 3,000 people in the database.)

There could be other potential improvements as well, such as limiting the results to maternal or paternal cousins.

Anyway, I would love to hear of other approaches from a user perspective.

1 Like

Yes, exactly, thanks.

I just filed the Feature Request. The thanks will be for the developer that sees a way to do this and then implements it.

I notice that @Mattkmmr has submitted PR #283 which adds a new filter rule.

1 Like

WAY cool! Thanks @Mattkmmr ! … I am looking forward to trying it out!

Yes, thanks @Mattkmmr! I hope it solves a problem that I have in using existing filters such as “siblings of”, which apparently limit to one family, the choice of which seems arbitrary. I have an example where a person has several full siblings in his first family (“first” both in terms of the family ID number and also its order in the Relationship category view), and a half-sibling and step-sibling in his second family. When I used the “siblings of” filter, it returns the half-sibling and step-sibling rather than the full siblings. I will search the bug tracker and see if there is any past discussion about this, and will also think about submitting a change request. I just mention it here as something for you to consider in your new filter.

@emyoulation I fixed the typo, thanks for reporting.

@GeorgeWilmes What you describe happens when a filter searches for the “main parents” of a child who is in more than one family. The “main parents” are the parents of the first family where the child was included. Code

I’ll add options to the filter rules (degrees of seperation and sibling of person, sibling of filter match) to search for all parents (relationship type birth) and all parents (including all relationship types).

2 Likes