The sums of every count under the unit name total. Its UnitMeasures.intent_coverage and UnitMeasures.ratio are the shares of the sums, not the mean of the shares.
Examples
from pathlib import Pathfrom tempfile import TemporaryDirectoryfrom spotregen import load_spec, make_sample_repo, total_measures, unit_measureswith TemporaryDirectory() as tmp: spec = load_spec(make_sample_repo(Path(tmp) /"demo")) rows = [unit_measures(spec, name) for name in spec.units] total = total_measures(rows)print(total.unit, total.covered_items, total.intent_items, total.ratio)