carekit-apple / CareKit

CareKit is an open source software framework for creating apps that help people better understand and manage their health.
https://www.researchandcare.org
Other
2.41k stars 443 forks source link

[Proposal] New Chart Types #285

Open erik-apple opened 5 years ago

erik-apple commented 5 years ago

We're looking for feedback about new types of charts that might be useful additions to CareKit. If there is specific type of chart that you would like to see added, please comment your proposal here.

For reference, the existing implementations are

  1. Line chart
  2. Bar chart
  3. Scatter plot
jwaddilove commented 5 years ago

Erik,

As well as offering new chart types can you please consider supporting larger date ranges for charts. I ask as I found V1 often clipped the labels or data points when trying to plot a month's pain data.

For care of some chronic conditions long term tracking and reporting can help both patients and medical professionals. I'm thinking of plots for approx 1 year of data points for (eg) pain, self dosing rates for Asthmatics or diabetics. (Bonus for supporting a dynamic zoom, like pinch stretch in photos)

Many thanks, Jonathan

erik-apple commented 5 years ago

Jonathan, that sounds like a great feature to add to the existing graphs. One of the difficulties in plotting large amounts of data is that there are often be more data points than pixels on the screen, and performance really drops off when you start dealing with sub pixels. Adding support for large datasets would require the introduction of downsampling, but I think that is something definitely worth considering.

Could you perhaps share a screenshot of the clipping that you described?

jwaddilove commented 5 years ago

Erik, Here'e an example of a clipped chart. It is code based on your V1 sample app on iPhone iOS 12, as well as the clipping you will see that the dates are in random order!!

To me the value of a large number of data points is the trend (think well managed Asthmatics or Diabetics). I agree about the data points/Pixels, in an ideal world I would imagine downsampling and curve fitting to get the date range into the view but then some form of zoom to a full set of point as one drags a finger along the chart.

What I'm trying to enable is accurate patient/practitioner conversations. Show the long term trends and enable a drill down to specific times where there we issues.

An acceptable response is that I should code the feature, but my professional coding days have passed me by ;-)

Many thanks Jonathan ClippedChart.pdf

jwaddilove commented 5 years ago

My mistake. My input was primarily about the Insights charting in the app.

The clipping occurs in the report generation (contacts tab), the chart gets clipped as it is placed in the PDF. I had uploaded the generated PDF, I'm attaching a screen shot of the pdf ....

CareReportClipped

advatar commented 5 years ago

It would also be nice to allow display threshold regions, even more complex ones like for blood pressure

erik-apple commented 5 years ago

@advatar Thanks for the idea. Do you imagine that being static content, or would you want to plot the users data on top of that somehow?

advatar commented 5 years ago

I mean to plot the users data on top. In the simplest case just axis for low and high thresholds.On 5 Jul 2019, at 18:17, erik-apple notifications@github.com wrote:@advatar Thanks for the idea. Do you imagine that being static content, or would you want to plot the users data on top of that somehow?—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

boscoybarra commented 5 years ago

Jonathan, that sounds like a great feature to add to the existing graphs. One of the difficulties in plotting large amounts of data is that there are often be more data points than pixels on the screen, and performance really drops off when you start dealing with sub pixels. Adding support for large datasets would require the introduction of downsampling, but I think that is something definitely worth considering.

Could you perhaps share a screenshot of the clipping that you described?

@erik-apple

Totally agree with @jwaddilove . This is crucial for any physician or researcher: "Show the long term trends and enable a drill down to specific times where there we issues."

Please find more scenarios where this issue occurs: Please do so, because https://github.com/carekit-apple/CareKit/issues/266#issue-395965186

Could exporting data to a CSV file be a solution?

erik-apple commented 4 years ago

Tracking #53 here. Another vote for Blood Pressure.

marco-theraforge commented 4 years ago

@advatar @erik-apple I think it can be useful to generalize the BP chart to allow a risk value/score to be added to the cells like in this example of Risk Chart regarding 10 year risk of fatal CVD: https://www.escardio.org/static_file/Escardio/Subspecialty/EACPR/Documents/score-charts.pdf The (normalized) risk value/score can also be used to automatically select a color out of a predefined palette in ascending or descending order via, say, a mapping function.

Plotting the current patient status on it (say with a dot or other shape) would show the current risk of the patient visually.

My two cents...

jim-apple commented 4 years ago

For the plots with systolic on y and diastolic on x axis (or similar), how do people feel about losing any sense of time, trends, etc.?

For a user, any concerns about numeracy of plotting in such a way? Assuming you want the user to at least be aware the reading is "good" or "bad" and potentially to act upon the value, would there be clearer way to represent the data.

advatar commented 4 years ago

We could plot the time curve in that same diagram.

On 23 Jan 2020, at 18:57, jim-apple notifications@github.com wrote:

For the plots with systolic on y and diastolic on x axis (or similar), how do people feel about losing any sense of time, trends, etc.?

For a user, any concerns about numeracy of plotting in such a way? Assuming you want the user to at least be aware the reading is "good" or "bad" and potentially to act upon the value, would there be clearer way to represent the data.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/carekit-apple/CareKit/issues/285?email_source=notifications&email_token=AAAG77TG4YV4ZD5JIGXO5NTQ7HLBBA5CNFSM4H3L36V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJYHUQQ#issuecomment-577796674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAG77T7XU3YXKKKHABLFGDQ7HLBBANCNFSM4H3L36VQ.

jgodon commented 2 years ago

Hi ! It would be very useful to be able to have in the same OCKCartesianChartView a line graphView AND a bar diagram graphView 👍 Thanks for the work you've already done ! Jeremie