Skip to content

Dealing with sub-categories #32

Open

Description

@Aariq

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)

Activity

  1. Aariq commented on Aug 3, 2022

    @Aariq
    CollaboratorAuthor

    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)

  2. kellirichardson commented on Aug 25, 2022

    @kellirichardson
    Owner

    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
  3. Aariq commented on Aug 25, 2022

    @Aariq
    CollaboratorAuthor

    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.

  4. Aariq commented on Aug 30, 2022

    @Aariq
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions