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

Dealing with sub-categories #32

Open
Aariq opened this issue Aug 3, 2022 · 4 comments
Open

Dealing with sub-categories #32

Aariq opened this issue Aug 3, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Aariq
Copy link
Collaborator

Aariq commented Aug 3, 2022

While data cleaning, we are combining some of the categories (eg, in the column of "Outcomes," we are combining "Blood pressure management," "CVD management," and "Lipid management" all under "CVD management." Another example, as you can see by the additional column in our data, is combining "Type 1 diabetes," "Type 2 diabetes," "Prediabetes," and "Gestational diabetes" all under the Domain, "Diabetes").

Since we have the more detailed data, is it possible to have "subcategories" that we could filter by? For instance, indented under "Diabetes" in the dropdown menu, we could list the more specific categories? The default could be the broader "Diabetes" category, but more specific could be an option?

Note: Thank you for spacing out the nodes, Eric!

Originally posted by @kellirichardson in #15 (comment)

@Aariq
Copy link
Collaborator Author

Aariq commented Aug 3, 2022

Just wanted to add some notes from our discussion yesterday. Another possible way this could work is to have a UI with categories like Diabetes, Diabetes: Type I, Diabetes: Type II, and Diabetes: pre-diabetes. If Diabetes is selected, then the plot shows the corresponding Diabetes node. If some, but not all, of the sub-categories are selected, then the plot instead shows those sub-categories as nodes.

Optionally, selecting Diabetes in the UI automatically selects all sub-categories (although I can forsee this potentially being finicky)

@Aariq Aariq added the enhancement New feature or request label Aug 3, 2022
@kellirichardson
Copy link
Owner

kellirichardson commented Aug 25, 2022

Hi @Aariq! Is filtering by subcategory still going to be possible with the updated interactive sankey? If so, is there a format you prefer for the dataset? In our updated (nearly clean) dataset, @mjospe has it organized where we have one column with the "specific" biomarker, and one column with the "broader term" for the biomarker (eg, the specifics, or subcategories, are things such as adiponectin and gonadotropin, but they both fall into the broader category of hormone levels). If possible, we would like the sankey to be created from the "broader terms" column of data, but have the option in the dropdown menu to filter by the more specific terms.

Ex:
Hormone levels

  • Adiponectin
  • Gonadotropin
  • TSH

Diabetes

  • Type 1 diabetes
  • Type 2 diabetes
  • Prediabetes
  • Gestational diabetes

@Aariq
Copy link
Collaborator Author

Aariq commented Aug 25, 2022

I still haven't had a chance to think through how this will work, but this is really helpful. I want to try for a solution that uses the current "selectize" UI because it comes with the important feature of filtering the possible input choices for each variable based on choices for other variables. So, that probably means there won't be a dropdown menu, per se, but I hope I can figure out a functional solution.

@Aariq
Copy link
Collaborator Author

Aariq commented Aug 30, 2022

I don't think there's a great way to do this without replacing the UI widget, unfortunately. I think making some kind of sub-category dropdown menu is beyond the scope of the incubator project. As a workaround, I think we could do some careful naming of nodes so they show up together in the selection box. For example :

  • diabetes: type I
  • diabetes: type 2
  • diabetes: prediabetes
  • diabetes: gestational
  • hormone levels: adiponectin
  • hormone levels: gonadotropin
  • hormone levels: TSH

That will at least make it easy to select all or just some of the sub-categories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants