Hi! My team is working on a CODAP plugin that adds several transformations of table data. One of these is a “group by” transformation which acts similarly to what happens when you drag an attribute to a new parent collection, but it effectively duplicates that attribute (so both the original data and the groupings can be seen at once).
When faced with grouping by an attribute that is formula-based, our plugin copies the values of that column, but does not have the new parent attribute copy the formula. This is because moving a formula to a parent collection may cause it to become invalid, since it may reference child attributes that used to be in the same collection.
This works great, but we noticed some odd behavior when grouping by an attribute that uses a formula that produces objects. For instance, using the Microdata Portal plugin, if we generate a People table and use our plugin to group by Boundaries, this creates a parent collection containing a single (non-formula) attribute that has a copy of all the values under the Boundaries attribute (which are jsonBoundaryObjects
).
However, CODAP does not recognize the jsonBoundaryObject
s as distinct, but seems to treat them all as equivalent (though indeed, I can verify they are different), collapsing the view of the parent collection into a single case which takes the value of the first case’s boundary object.
I know this may not be easy to reproduce in normal CODAP, but we thought it was worth reporting since it seems reasonable that distinct values under an attribute should be treated as distinct by CODAP, even when they are objects.