Giter Club home page Giter Club logo

safety-results-over-time's People

Contributors

dependabot[bot] avatar jwildfire avatar mhickle avatar nbryant avatar pburnsdata avatar samussiah avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

safety-results-over-time's Issues

Add Math.log10 polyfill.

Test notes

  • Math.log10 doesn't exist in IE. Added a polyfill to address. No feature testing needed.

Add settings schema.

Test notes

  • CAT displays a form with an input for each renderer-specific setting in src/defaultSettings.

Log/Linear Toggle not working as expected

Axis is changing, but Histograms and Violin Plots aren't re-renderering.

screen shot 2017-03-06 at 4 29 04 pm

Linear axis. Mean = 3.2 for first bar (as expected).

screen shot 2017-03-06 at 4 29 54 pm

Toggle to log axis and Mean = ~0.5 for first bar. ☹️

Prevent duplicate groupings.

per @dschwentker , sometimes duplicate None options appear when no groupings have been specified

Test notes

  • In CAT, duplicate None options shall not appear in the group-by dropdown on settings change (object permanence issue in CAT presumably, documented here).
  • Group-by labels corresponding to nonexistent variables shall not appear in the group-by dropdpown.
  • Group-by labels corresponding to duplicate group-by variables shall not appear in the group-by dropdown, even if the labels differ.

Regression Testing for Results over Time v1.3.0

Confirm basic functionality and new features are working as expected in examples shown below:

Examples using v1.3.0 Release Candidate
EXAMPLE(S)

Basic Functionality (Tested every release)

  • Check all spelling and grammar on the page
  • Confirm that the filters are working as expected (Measure, Group): selecting a variable changes the plot values
  • Confirm that "Hide visits with no data" can be turned off and on, hiding the superfluous data when "no" is selected, and removing the visits with no data when "yes" is selected
  • Confirm that selecting the violin plot option can be selected, and upon checking the box, violin plots appear around the data ranges
  • Confirm that selecting the box plot option can be selected, and upon checking the box, box plots appear around the data ranges

New Functionality (Tested in V1.2.0 only)

  • (#3) Confirm that toggling between the log/linear options appropriately scales the y-axis as expected
  • (#8) Confirm that the x-axis is rotated by 45 degrees and that it looks as expected
  • (#12) Confirm that the # of enrolled/randomized participants is visible at the top of the page
  • (#14) Confirm that when selecting multiple filters, the axis ranges stay constant
  • (#15) Confirm that you can filter on the status of a participant (active, discontinued)

Allow Support for Changing Tick Rotation

Found when viewing ITN030ST Test Results Over Time:

  • When you select "no" for "hide visits with no data", it shows the x-axis and the ticks are clustered
  • Nathan said "renderer is not set up to allow changing tick rotation via chartfoundry", but it does work in the non-CF version

itn030staxis

Move bundle out of build folder.

Test notes

  • Code bundle (safetyResultsOverTime.js) lives at the top level of the repo rather than in the build folder (which is no longer). No feature testing needed.

Update class of custom controls' control label...

...from control-label to wc-control-label to keep in sync with webcharts v1.10.0.

Test notes

  • Run d3.selectAll('.wc-controls .control-label') in the developer console and verify that the selection returns 0 nodes.

Handle unscheduled visits systematically

Description

Depending on how unscheduled visits are displayed on the x-axis, the chart can have some unintended behavior.

(See related issue for Outlier Explorer: RhoInc/safety-outlier-explorer#68)

If visits are displayed purely chronologically, the challenge is that you end up creating a new event type that shows up in the middle of the data, but for only a small number of data points. See example of visits 2(UN) and 5(UN) below:
image

Our primary medical monitor user has proposed that to fix this, we sort all Unscheduled visits to the far right end of the chart, where they are still visible, but they don't interfere with seeing the data flow through expected visits.

Proposed solutions:

  1. Sort all unscheduled visits to the far right end of the chart, where they are still visible but they don't interfere with seeing the data flow through expected visits.
  2. Retain visits in numerical order, but create a toggle that lets the user "Hide unscheduled visits"

Test notes

Test out the new "Visits without data" and "Unscheduled visits" controls in CAT with the safetyData/ADBDS.csv data file (not safetyData-queries/ADBDS.csv).

Confirm that:

  • Unscheduled Visits and Visits with no data are shown/hidden when the toggle changes.
  • Change measure to "Alkaline Phosphatase (ALP)" and confirm that visits with no data are shown/hidden when the toggle changes.
  • Test with the above with groups active (settings: {groups:["RACE"]})
  • Unscheduled visits are shown on initial load with {"unscheduled_visits":true}
  • Visits with no data are shown on initial load with {"visits_without_data": true}
  • Only the visits are hidden/shown when explicitly specified using {unscheduled_visit_values:["Unscheduled 2.1","Screening"]}

Violin plots are note coloring correctly

Bug reported by Kristen on 7/12:

"2. Violin plots in the ‘Results Over Time’ figure are not coloring correctly when you select by group display (all categories are grey)."

Add an average for outlier explorer events on the same day

Request from Jack:

Jack would like an x-axis control like we have on the Outlier Explorer that would allow him to switch the x-axis from Visit to Day. He wanted this so he could view group means by day. We discussed this and decided that the best approach would be to define the mean or median study day within each visit and plot that on a linear axis.

Jeremy suggested making this a "title on the visit tick marks that is shown on mouseover instead of a separate continuous axis option - keeps the design (and coding) a lot simpler, but gives jack the info he needs. "

Add toggle for log axis

Test notes

  • A Scale radio control appears next to the y-axis limit controls with two options: linear and log.
  • The scale of the y-axis updates as expected.

Allow group labels.

Test notes

  • If specified, group labels appear in the Group dropdown as well as in the legend label, as opposed to the group variable name.
  • In CAT specify a group variable (ARM, SEX, etc.) as well as a group label (Treatment Group, Sex, etc.) and verify the Group dropdown and legend label display the group labels and not the group variable names.

Clear canvas on draw.

also add a no-data check to avoid plotting anything, and check that filtered data actual contains data that matches the current x-domain (e.g. isn't limited to unscheduled visits)

Test notes

  • Box plots, violin plots, and outliers are all redrawn every time, i.e. disappear and reappear when manipulating the controls.
  • This issue arose for a measure that only appeared at unscheduled visits. To reproduce, remove all scheduled visits in the data for a single measure, render the chart, and choose that measure in the Measure dropdown. No errors should appear in the console. The chart should update as expected when choosing a measure with schedule visits. The chart should also update as expected when displaying unscheduled visits.

Change `groups` default

Let's not make Sex and Race required. Change default to: groups: [{value_col: 'NONE', label: 'None'}]

Improved precision on tooltip means

Request from Jack:

Jack needs a higher level of precision on the means of certain measures (e.g., 2 decimal places). The current mean value in the tool-tip view is rounding too high, and doesn’t have adequate precision to answer the questions he is asking.

Replicate for yourself here: http://interactive.it.rhoworld.com/dev/safety-explorers/studies/sunovion-sep360-311/#results-over-time with “LB – Hematocrit” as the Measure).

Test notes

  • Verify that the box/violin plot tooltips display the summary statistics to a meaningful precision.
    • Min and Max should have the lowest precision.
    • 5th %, Q1, Median, Q3, 95th %, and Mean should have precision to one more decimal place than the lowest precision.
    • StDev should have precision to two more decimal places than the lowest precision.

Update tick values to fit log scale

Currently, the tick values can get a little crunched up when using a log scale. Might be nice to spread them out using some sort of transformation

Test notes

  • Y-axis tick labels do not overlap for any measure plotted on a log scale.

Plot outliers on top of violin plot.

per @pburnsdata , and also give them a black stroke or something to make 'em stand out

Test notes

  • Outliers, or dots above and below the box plots, appear on top of the violin plots, i.e. are not obscured by the violin plots.
  • Outliers expand on hover.

Show # of Enrolled/Randomized Participants

Not sure the best way to handle this, but it would be good to have the number of relevant study participants shown somewhere on the chart. Maybe add a footnote for "X of X participants shown in this view"

Make axes ranges stay consistent when using a filter

From Meagan Spychala on 9/19:

"It would be really useful if the axes’ ranges stayed consistent when using a filter. For example, we were looking at a longitudinal graphic of systolic blood pressure across several sites, but each site’s graphic had an updated vertical range to fit that site, it did the use aggregate of the data (i.e. if the SBP for the study as a whole was 70 to 160, but a site’s range was 90-120, the 90-120 would be the vertical axis range for that site only) . Because the range of the vertical (SBP) and horizontal (Visit) axes can change, it is harder to see if the sites were in line with each other or if there was an outlying site. I think it’s appropriate to have the range of the axes change depending on the measure (for example, SBP vs. DBP), but once you pick a measure, the axes’ range should be held constant based upon the overall data to be able to identify potential trends."

Optionalize units argument.

Measure dropdown options should include units.

Test notes

  • Verify that the unit value for a given measure is appended to the measure in the Measure dropdown and in the y-axis label.
  • Set Unit (setting: unit_col) to a nonexistent variable name in CAT and re-render the chart. The chart should behave identically, except units are not appended to measures.

Draw points for outliers

Currently the chart's range is based on the total range of the data, but no points are drawn for outliers above the 95th or below the 5th percentile (as shown below).
screen shot 2018-01-23 at 11 26 12 am

Test notes

  • Outliers display when the Outliers checkbox is checked representing results outside the 5th and 9th percentiles, i.e. results outside the horizontal lines of box plots.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.