Cooladata enables you to run R and Python script reports. This opens up a wide range of analysis and visualizations for your reports and dashboards. Run any script, plot any visualization and use it just like any other report, in Dashboards, Publications, and Embedded Reports.

Note: this feature is in beta – your feedback will be much appreciated!

Creating a new R/Python Report

  1. Click the New Report button at the top to open the reports gallery.
  2. From Scripts choose the desired report type: R or Python.
    The following will be shown:
  3. In the top section, indicated by Data (CQL), enter any query.
    You can query any data source in your project, including all tables and linked data sources. This will serve as the input for your script. The results are saved to “CQLQuery”, and can be used in your script.
    You can include “filters (context)” or “date_range (context)” in the query to use the report and dashboard controls, as in any CQL report.
    Note that “select * from cooladata” isn’t supported in R or Python reports.
  4. In the bottom section, indicated by Script (R/Python), enter your script. We recommend running your script in a dedicated R or Python IDE (preferably on Unix) and debugging it there before using it in Cooladata.
    Some libraries are pre-installed in your project and can be used. You can also add other libraries to run in this specific script from the “Additional libraries” field below the script.
    The script is expected to create a plot, which is displayed as an image. You can use any plot function in the script.

    • For R, the last plot in your script is saved to jpg. You can also use the GGsave function in R. Mark the “Use ggsave visualization” toggle in the report settings to use GGsave.
  5. Click Run to execute the query and script.
    Once the script is finished, an image should be shown.
    If no image is shown, check the log files for errors in the script (link shown next to the Run button).
Print Friendly, PDF & Email