Granularity in Place Hierarchy?

The usual saying is that “you can’t see the forest for the Trees”. But I’m having problem seeing my tree for the spots

Is there a way to limit the Place enclosure granularity when summarizing data?

In many Events, I have too specific a Place for summarizing purposes. I might like to know how many Births were in an enclosing administrative division level (County, State, Country); but my Births have hospitals, street addresses, farms, townships data that prevent the data from collating.

I can use the Event Filter Gramplet to get an Event count of one Enclosing place. But that’s not practical to do one-by-one.

It is particularly frustrating for the Geography view where these closely located Events don’t map because there’s no GPS coordinates available for that level of detail. (I may know the county or township where a farm was supposed to be… but haven’t located the property yet.)

Is there a way to apply a ‘Format’ to Places like we do for Names or Dates?

I have never seen a recursive count of events for hierarchies, but I have missed it a lot of times…

And here again I can go back to the need of Graph Network for the whole database/tree, with all connections, that’s one of the things that can be easily filtered in Gephi or Cytoscape…
like “Only show Nodes that is connected to Node X with Type Y and with Z hop from any Node with Type W” (or name W if that is the case).

For me this is part of having research and analyzing tool inside Gramps, or being able to export data to an interchangeable format or even better have interoperability with external analyzing tools.


As a workaround
If you have Excel you can actually do that search with Power Query on the Gramps XML file and sending the result to a Pivot Table.
Just be aware that you need to expand all XML objects in the PQ before importing the data to the Excel data model and Pivot Table in Excel. Then it’s just a job to set up the correct fields and tables for the pivot table, and setting a few filter so that you can change the Place Names and Events.

If you save your Excel File and when you updte your Gramps XML file (using the same name and location for the file), all you need to do is update the Query in Excel to get the new data in, as long as you don’t break the data source.

And yes, it can be done with Python, but I do not know how.

1 Like

I am not understanding what you mean.

For the 5.2 upgrade to places, there is the idea of “Group” in addition to “Type”

https://gramps-project.org/wiki/index.php/GEPS_045:_Place_Model_Enhancements#Recommendation_2

Let us say that I have the following list of Places:

  • Pennsylvania, USA, lat1, long1
  • Lawrence county, Pennsylvania, USA, lat2, long2
  • New Castle, Lawrence county, Pennsylvania, USA, lat3, long3
  • Jameson Hospital, New Castle, Lawrence county, Pennsylvania, USA, ,
  • Hickory township, Lawrence county, Pennsylvania, USA, lat4, long4
  • Smith Dairy Farm, Hickory township, Lawrence county, Pennsylvania, USA, ,

Given that neither the hospital nor the farm have Longitude or Latitude, no Events (births, deaths) that occurred at those places will be mapped.

What I’d like to be able to do is temporarily change the place format to show no deeper in the Hierarchy than “County” (or perhaps municipality/township) and map (or report) that location. But simultaneously for ALL counties & with all events.

So, with the formatting limit imposed at “County”, a Birth at Jameson Hospital and a Death at Smith Dairy Farm would both show as happening at “Lawrence county, Pennsylvania, USA”.

Doing a Heatmap of births of direct ancestors, formatted to country/nation level, would be a quicker way to visualize ancestral nationalities.

For place like hospitals or churches etc, I do try to add their lat long coordinates. IF I cannot pinpoint their exact location, I will put in the next larger place record’s coordinates with one of two tags. “Defunct” for places that no longer exist or “Not Exact” when I cannot pinpoint where exactly the farm may have been. In all cases, I try to add coordinates to each place record.

In the Place Name editor, you can manipulate what or how much is displayed. I often use it with the Charts. The method described is crude and will apply to all records regardless to the country or the depth of the place hierarchy.

I have a Place format I named “City, State”. And in the U.S. that is all that is displayed. It will ignore the Church, hospital, farm or address and only display “New Castle, Pennsylvania” in the example above.

In the place name editor, the Levels has the setting p0, -2. Other settings can display others parts of the place name.

What that does for any of the mapping views or reports I have no idea. The place record still attached to the event will still be for the record of the hospital, etc.

1 Like

That sound promising for reports & charts.

Where you you find this ‘P’ level? (Is P0 the master Enclosing level or the deepest level?) I do not see it in the Place Editor on the top level or under the Enclosing tab.

Perhaps the Geography view could be set to something like “>P2” where it just masks out the finer detail.

p stand for Populated Place It took multiple tries to grasp what was happening and then figure out which settings to use.

From the Place name editor

  • Levels: The place names to be displayed.

Each level in the hierarchy is represented by a positive integer, starting with 0 for the selected place and increasing by 1 for each level up the hierarchy. The levels can also be represented by negative integers, starting with -1 for the top level (usually a country) and decreasing by 1 for each level lower in the hierarchy. In addition, the populated place (city, town, village or hamlet) is represented by the letter p; this can be used with an offset (e.g. p+1 or p-2).

The names to be displayed are defined as a comma-separated list of ranges. A range can either be a single level, or a start level and an end level separated by a colon. The start level must be less than the end level in a range. The start and end levels default to 0 and -1 if missing.


And of course, this will hopefully change and become easier in 5.2

Wow. That definitely needs a previewing feature like the Display Name Editor!

I started using a Level ranging value of “-4:1” (alternately “-4:”). In my USA Place hierarchy, that equates to “County, State, Country(Nation), Continent”. Although I ended up using “-4:-1” to omit the continent.

It masks the Title as expected in the views… but it doesn’t group the rows.

In the Geography it does the same thing in the pin hints: masks but doesn’t collate/group. And the pins still plot at the unmasked level rather than at the lefthand parameter of the mask.

1 Like

I haven’t gotten into analysis too much yet but that does seem like it would be useful.

I’ve found Dave’s suggestions applying the Place Format (to truncate to 4 levels deep) used together with the your Excel export to be a method which takes the least data tweaking.

When the Place hierarchy displayed default format with unlimited depth, there was no predicting what the Excel sheet would be fed.

Unfortunately, winnowing the Place list that still doesn’t help get less busy map plots.

Hopefully, when Civil Divisions can be grouped in 5.2, it will become viable to enhance the Geography view to collate pins at a Level of Civil Divisions. Without such an ability to establish parity baselines, I don’t see how Gramps could reliably do collations.

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