(I think the original intent is that grouping should be exclusive, but still it’s a reasonable use-case).
As reported on other fora:
@99of9
I think it's double counting items that fall under multiple category paths. I can't find 215 Wikidata property related to chemistry (Q21294996). Maybe a "DISTINCT" in the default SPARQL would help
I tried to add a "higher grouping" by continent. It works for most of it. Somehow the numbers for the US get doubled (two continents, even if only one is shown). Percentages dropped. Maybe the query can use a "DISTINCT" in count.