Closed mahafarhat closed 3 years ago
First draft of this antibiograms feature is now live:
https://gentb.hms.harvard.edu/maps/antibiogram/
This includes:
Some features to refine/add:
**A reminder of which variable we need for each 'estimate type'
among Rif susceptible (mean_snp10_res_rs)
means, there's no mean_snp10_res_rs column and Rif is a different drug isn't it.mean_snp10_res_rs
doesn't exist, should it be mean_snp10_rs
? Same for mean_snp10_res_rr
which also doesn't exist.I've fixed what I can for today, I'm improved the apps flexibility so it'll be much easier to change some of the items above no matter what happens, and should allow us to show more types of data in the maps.
I'll add the filtering next week if the details can be provided. Mostly I just need to know the mechanism expected.
Yes the correct columns are:
mono-resistance (mean_snp10_rs) resistance-among RR (mean_snp10_rr)
Filtering:
A reminder that these tableau maps are what we need, you can use these as examples of the filtering: We are aiming for a display that has the features of the following Tableau map: https://public.tableau.com/views/MarginalResistance/Sheet1?:language=en-US&publish=yes&:display_count=n&:origin=viz_share_link (one example)
There are three types of antibiograms we want to display (this will be an initial fork with three options: margin, rifampicin susceptible and rifampicin resistant. https://public.tableau.com/app/profile/avika8515
the three maps should represent the filtering by estimate type, as noted above in the thread
Note to future: the filtering mechanisms are evident in the example tablue in the first posting.
Regarding "Instead of seeing a separate “Drug” tab, can we have a drop down menu near the map to select the drug of interest?" Please engineer this if it will take < 5 hours of work.
Today the drug filtering was moved into the main body and a start was made on getting the other filtering to work. Although this is proving to be a bit more involved it's progressing nicely.
Question for next week: when you say "Estimate type" what you mean is "These are the different columns which the data should be based on"? which isn't a filter, it's a selector (or data source). Please confirm as filtering on these columns can be possible, but if the map always shows the same column in the map colours you may get grumpy.
If it's true that these are different map column sources. Wouldn't it be better to have them as three different maps on the side (where you currently see "World") instead of trying to make them fit in as a fancy filter?
Thanks Martin - i see what you mean. I think it would better to have them as a filter rather than three different maps. I could’ve just made the table in a more “long” format then it would have been a filter. Maha may also have additional thoughts.
On further thought, three different Maps does sound like a simpler solution but I would defer to Maha on this. A few additional comments:
We don't need to have the "Drug" tab that is showing up right now.
We need another level of filter (higher than the "estimate type" filter) to separate the data from WITHOUT outbreak correction and WITH outbreak correction (the latter are variables with "snp10" in the variable name in the attached file). Supp Table 3 WHO Corrected Marginal Estimates.xlsx
The "Lower" and "Upper" estimates are still flipped.
"PZA" is still the default drug, let us make it INH
The estimates for drugs that I can see right now for the Marginal Resistance Map do not match the maps on tableau. Need to make sure these are being calculated correctly: [Marginal Resistance Rate before outbreak correction = p_a_r100; Lower Marginal Resistance Rate before outbreak correction = (p_a_r-(1.96sqrt(var_a_r)))100; Upper Marginal Resistance Rate before outbreak correction = (p_a_r+(1.96sqrt(var_a_r)))100; Marginal Resistance Rate after outbreak correction = p_a_r_snp10100, Lower Marginal Resistance Rate after outbreak correction = (p_a_r_snp10-(1.96sqrt(var_a_r_snp_10)))100, Upper Marginal Resistance Rate after outbreak correction = (p_a_r_snp10+(1.96sqrt(var_a_r_snp_10)))100]
Hi Avika, some of the items above are because the fixes are not deployed yet. Please bare with me while I get the map situation sorted out.
@mahafarhat Are multiple maps ok?
Thanks Martin! I can confirm on behalf of @mahafarhat that multiple maps as you suggested are good to go, we discussed this on Friday.
@avdixit I've put together the software and deployed it to o2 and have created three maps based on the above instructions ( we can tweak these further)
You can see the maps here: https://gentb.hms.harvard.edu/maps/antibiogram/
I'll do some more testing to see how it goes on live. But for now I'm attaching an animated gif of how you can create and edit the map information as needed:
@doctormo one last feature, and one minor fix to add and we can close this issue. 1- I noticed the map color scale does not adapt to the data range for each map, e.g. click mono-resistance > drug=LEVO > Limit by sample size = 50 and you get this all white map
I do care a lot about the difference between 0.5% and 2.5% in that plot, can we scale the color palate so it only spans the range of available variable values based on the filtering?
2- please delete marginal resistance from the title of the map
This should now be fixed.
We want to create a modified version of the Maps, that only has 'country' and 'drug' side tabs. This new 'antibiogram' app, will be displayed alongside Maps, Predict, and Data on the main website and on the upper bar.
The input is Avika's antibiogram dataset. We are aiming for a display that has the features of the following Tableau map: https://public.tableau.com/views/MarginalResistance/Sheet1?:language=en-US&publish=yes&:display_count=n&:origin=viz_share_link (one example)
There are three types of antibiograms we want to display (this will be an initial fork with three options: margin, rifampicin susceptible and rifampicin resistant. https://public.tableau.com/app/profile/avika8515
We have the option of embedding this new feature as a Tableau frame: https://help.tableau.com/current/pro/desktop/en-us/embed.htm