kellirichardson / biofeedback-vis

Interactive Sankey diagram for biofeedback scoping review
MIT License
4 stars 0 forks source link

automatically collapse nodes into "other" if few articles #38

Closed Aariq closed 2 years ago

Aariq commented 2 years ago

Related to this, would it be possible to automatically collapse nodes (into an "Other domains", "Other behaviors", etc) that don't meet a certain threshold of articles? Something like 5 articles per node or similar?

Originally posted by @mjospe in https://github.com/cct-datascience/biofeedback-vis/issues/25#issuecomment-1205783817

I think this is a job for the forcats package

mjospe commented 2 years ago

Oh yes! Forcats looks perfect for this. Thank you. I'll play around with it for different variables to figure out what we want.

Aariq commented 2 years ago

I'll keep the issue open until this gets implemented, but yeah, there's a function for exactly this that could potentially be part of the wrangling. Would have to play around think about exactly how it would effect the plot and the user input section.