rubyforgood/abalone

Add key reports

Opened this issue ยท 8 comments

Pinto Abalone would like an option to export charts created in Blazer and both stakeholders would like a way to quickly view key reports without having to enter the Blazer interface. We are exploring 2 pathways on this issue. Thank you to @vurtn for researching the options available (see comments below).

The 3 reports we would like to start with are listed in these issues:
#788
#789
#791

Option 1:

  • Implement a sustainable way to capture Blazer reports for export/download
  • Add a Key Reports navigation item that includes links to 3 key reports in Blazer. These links would be different for each organization

Option 2:

  • Introduce a new charting library to can be used to replicate existing reports that have already been created in Blazer. Blazer would continue to offer the flexibility of creating queries on the fly. This library would provide a quick view and export option for reports that are of particular interest to a stakeholder. Reports Kit is already installed from when we explored it as an alternative to Blazer. Chartkick is maintained by the same person who maintains Blazer.
  • Add 3 key reports
  • Add Key Reports navigation item that includes links to the 3 reports. These reports will be different for each organization.

Potentially, the structure that comes out of this could be used in the future for ad-hoc data reports that simply combine existing data into views that the stakeholders need. For example, combining animal data with mortality event data to report on the time in facility for all the animals in a cohort or enclosure.

vurtn commented

Hello,
Sorry for my english.

I looked in the documentation of blazer (and a little of google-fu) and it does not seem impossible to me to export charts (I am discovering at the same time the library).

On the github account of the person who seems to me to be the author of Blazer (Ankane), there is another library to generate charts called Chartkick [1]. If we look at the documentation of this library we see that it is possible to download the graphs in images when Chartkick is coupled with Chart.js [2].

EDIT: There is maybe another way : export the the drawing on the canvas to an image with html2canvas [3]. That's allow us to keep blazer and add html2canvas dependency. There is also getDisplayMedia of WebRTC on this tutorial. Each have pro and cons.

Cheers and stay safe.

References :
[1] https://github.com/ankane/chartkick
[2] https://chartkick.com/#download-charts
[3] https://hackernoon.com/how-to-take-screenshots-in-the-browser-using-javascript-l92k3xq7

@vurtn My apologies for the delayed reply. Thank you for researching this and identifying some options. This is very helpful. I will spend some time looking over these options and then update this issue.

@CraigJZ Blazer has a concept of "dashboards" which sounds very similar to the request here (see screenshot). We can even link to the user-created dashboard of "Key Reports" from a dropdown in the menubar, and from there users can click into a report to download a .csv or screenshot the generated graph. What do you make of this?

Thanks @mattwd7. I would prefer this option of being able to link over to Blazer (either a dashboard or individual queries) to having to bring in another charting library. I think the key challenge is the chart download. I'd like to find a way to make it easier for users to download the charts in an image or pdf format, but I'll also look into how viable taking a screenshot would be for the users.

Any update from our users regarding screenshot @CraigJZ?

@mattwd7 Thanks for checking back in and sorry I missed this yesterday. I'm meeting with them next week and this is on the agenda for us to discuss, so I should have an update soon. ๐Ÿ˜„

@mattwd7 I discussed these options with the Pinto group. The proposed option of creating a dashboard of the key reports and linking to it from the nav will work for them, at least in the short term. Grabbing a screen shot will work too. ๐ŸŽ‰

Separate from this, they are also going to look into using the available csv export of the query results to use with R visualizations for cases where a screenshot may not be enough.