Hello,
When your code computes "submissionsByCountry = d3.nest()...", you are losing the entityid property, because it is being aggregated away.
If you inspect the values you have for "d" where you are adding the link, you can see that they look like this
"Object {key: "OrgUU", values: 1, parent: Object, depth: 2, value: 1…}"
because these objects are the result from the circle packing layout, not elements in the original data array.
If there is a 1-1 mapping between Organization and id (which looks to be true in your example data), you can look up the id from the organization. First you can build the lookup table like this:
var idByOrg = {};
data.forEach(function (d) {
idByOrg[d.Organisation] = d.entityid;
});
Then later access it like this: