Objects all grouped together when used in parent collection

CODAP Forums CODAP Help Forum Objects all grouped together when used in parent collection

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6453 Score: 1
    Thomas Castleman
    Participant
    3 pts

    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 jsonBoundaryObjects 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.

    #6454
    Thomas Castleman
    Participant
    3 pts

    Actually, I realized this isn’t that hard to reproduce in CODAP:

    1. Open the Microdata Portal plugin and create a People table.
    2. Click on the “Boundaries” attribute and click “Delete Formula (Keeping Values)”.
    3. Drag the (now non-formula) Boundaries attribute to the left into a new parent collection.

    You’ll see that the Boundaries collapse into a single case, even though there are many distinct objects populating that attribute.

    #6455
    Jonathan Sandoe
    Keymaster

    Hi Thomas,

    I agree that this is a bug. Thank you for reporting it. I have logged it here: https://www.pivotaltracker.com/story/show/178273084. Your analysis of the problem looks pretty good, too. I hope we will be able to rectify it soon.

    Jonathan

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.