Using attribute values in comparisons or calculations

(There’s another current discussion thread about “Gramps and recording and comparing DNA-matches”. In that thread, I ask a question which has broader applicability, and so I’m repeating it here as a new, more general discussion topic, in case people who have experience with this might not be reading the other discussion thread because they’re not interested in DNA.)

I would be interested to learn whether there are precedents among Gramps users for storing multi-part values within a single attribute, and using them in comparisons or calculations. Has anyone attempted to store data that way, and then use it in a report, filter, or whatever?

The example I gave in the other discussion was DNA-specific but the idea is general. Have you ever stored a set of delimited values within the value of a single attribute, and then done some coding to parse the values and use them in comparisons or calculations?

Thanks for any suggestions.

At the moment I’m not using attributes for this, but I would rather have one data pair/triple/quadruplet for each value, than add a list of the same to one attribute field, but it will depend a little on what data, and if there will come an addition of fields for the attributes…

A list of values can be difficult to read, as it will be a string of delimitated values, and if it is i.e. a triplet you need to use 2 types of delimiters, I personally thnk it would actually be easier to read something that was json formated…

I do use attributes for some data, mostly in events, where I add additional data, like in norwegian census’ its often also state how many animals and the types of them, how many barrels with potatoes, wheat and the size of the farm…
This will be even more useful when/if Gramps get the support for Events on Places, because then it will be possible to compare this values over time for the place/farm/company/ship (because this type of information is more place depended, than person depended)…

I can see a lot of usage for attributes, also for places if it get updated with atleast a date/period field, and if it get updated to a quadruplets(four-tuples) value, it would actually be possible to use the attributes for custom relations between entities, but then again, it starts to be a feature that get extremely complex, and a table in a Custom “Relation” Note would maybe be a better option…

It is a lot of values/information that I have for multiple documents that fits better as attributes than in a Note…
I.e. one of my ancestors hold more than 25 Patents, and a lot of the metadata for each patent would be of better use in a attribute than in a note…
Same goes with the extra values for a farm (in Norway we also had taxes on the farms (the "Silver Tax and Clerical “tiende” are two of them) and I am sure there was the same in most other countries to, where different taxes was calculated on the income of the land, not who owned or used the land…

Edit (Adding): … and in a historical perspective it would be interesting to be able to compare that kind of information for i.e. a farm or a company (also a place), to see how the place evolved over time and maybe with different generations of the same family…
In Norway there are farms and farmland that has been in the same family for 800 and maybe as long as a thousand year, and for many of those places, its possible to find a lot of metadata, but even for a 2-300 years old place, it could be interesting to see some of that information and be able to compare and do calculations on it, and to export it in some useable formats for other research software (read CSV or json as examples)…

Related Feature Request