Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree charts: handle data values not present in tree #42

Open
hotzeplotz opened this issue Oct 10, 2016 · 0 comments
Open

tree charts: handle data values not present in tree #42

hotzeplotz opened this issue Oct 10, 2016 · 0 comments
Assignees
Labels

Comments

@hotzeplotz
Copy link
Collaborator

Currently, when using a tree chart that maps a data column to values in a (JSON) tree, the chart code will cause all events whose data (for the tree column) does not have any corresponding mid in the JSON tree to be silently discarded from the global crossfilter, as no match is effectively found.

As this scenario is likely to be quite common, it needs to be handled gracefully within the tree code.

This could also be partially mitigated during source data preparation, by checking that there are at least no mismatches between values that need to be used in the tree column and the available mids of the JSON tree.

Within the tree chart code, this could be handled by adding a (top-level?) tree node 'other' (or any other name as appropriate - this should be configurable), mapping all the variable levels not present in the JSON tree as mids to this node just after loading the JSON tree for a variable and before invoking the chart-making function for it.

pros: being per-chart, it doesn't need to touch the actual dataset
cons: the extra top-level node may not be desirable; although data rows needing to be put into this bucked should normally be as few as possible (otherwise the whole mismatch between data and JSON tree mids would make the whole chart and filter(s) analytically weak)

Alternatively, data rows with unknown values (aka values that are not present as mids in the JSON tree) should be ignored altogether within each tree chart instance, although this is not likely to be doable without actually moving the rows with unknown values to some specific 'bucket'.

@hotzeplotz hotzeplotz added the bug label Oct 10, 2016
@hotzeplotz hotzeplotz self-assigned this Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant