Sage-Bionetworks / projectLive_NF

Live view of projects of funding partners
2 stars 3 forks source link

Resources generated plot in Snapshot module is not showing the top 5 resources #120

Closed jaybee84 closed 3 years ago

jaybee84 commented 3 years ago

Describe the bug The resources generated plot should show named bars for top 5 resources and the rest should be clubbed into Other

To Reproduce Steps to reproduce the behavior:

  1. Go to Snapshot module
  2. Scroll down to Resources generated
  3. Other seems to be a large bar

Expected behavior Check count of each resource (cumulative) until year (n-1), i.e. for 2021 the counts should be cumulative until 2020, Display name of top5 resources along with the bars This kind of logic was implemented in CSBC snapshot module, lets port it into projectLive

andrewelamb commented 3 years ago

@jaybee84 I think I understand this.

What you are asking for is controllable by the config file.

CSBC

NF

You can see in NF "Other" contains both NA values, and all the values that are not in the replace list, where in CSBC we have both "Missing" and "Other".

jaybee84 commented 3 years ago

It seems we cant use both top_values and replace_values. Error: Can not recode column with both fields top_values and repalce_values

I edited na_replace to pendingAnnotation on my local machine, will push it to the repo soon.

andrewelamb commented 3 years ago

@jaybee84 That is true, as they aren't really compatible.

andrewelamb commented 3 years ago

@jaybee84 were you able to get what you wanted using the config?

jaybee84 commented 3 years ago

From the config I could change na_replace to show pendingAnnotation instead of Other

But the selection of top 5 resources is still pending. It seems that it is incompatible with replace_values. Is there a specific reason for it?

jaybee84 commented 3 years ago

Thanks for the chat @andrewelamb .. Just for future notes, users can only choose top_5 or replace_values because the logic gets unduly complicated to support both at the same time. This is because the replace_values chosen manually by the user may not replace all the names of the top_5 chosen automatically for display, and this would make the visualization untidy. So it was decided that the user would have the option to only choose one or the other functionality.