Reports

Reports make sharing results easy and let you avoid copy/pasting charts into emails or slides. With a single click, you can present your text, code, and charts from notebooks and then easily share with others in your company by sending them a link.

Publish a Report

You can publish the following file types as a Report:

  • .ipynb
  • .md
  • .html (e.g. from RStudio’s knit function)

There are two ways to publish a Report:

1.) From a file preview page for the file you wish to publish, click the Publish button above the file content.

2.) Use the Publish a Report option in the quick actions dropdown. On the publishing menu displayed, fill in the path of your file, select Create a New Report option and give the Report a title and description.

_images/publish-1.png

Run and Publish a Report

You can also run a notebook and publish it as a Report in one step. On the Publish Report screen, select the Run and Publish radio button option. Two additional drop-down boxes for selecting compute resources and environment will appear.

_images/run-and-publish-1.png

Select the resource size and environment for running the notebook and click Publish. This will create an instance of the selected size and environment and run the notebook.

Your Report will now be visible under project Outputs:

_images/run-and-publish-2.png

Preparing an .rmd (R Markdown) File for Publishing

R Markdown files only save their outputs (like charts and tables) in a running RStudio session rather than saving outputs to the .rmd file. To publish an R Markdown document as a Report on the Platform, first convert it to an HTML document inside your RStudio session.

From RStudio, run the R Markdown file from top to bottom, loading all the charts, tables, or other outputs into the view. You can then either use the “Knit to HTML” button in the .rmd window header or, in the RStudio console, run the following command:

rmarkdown::render('my-analysis.Rmd')

At minimum, the header of the R Markdown should set the output type as HTML. Here’s an example header:

---
title: "My Analysis"
output: html_document
---

Sync the resulting HTML file to the project’s repository. Then, from the Files tab or the quick actions drop-down, publish the HTML file as a Report.

To control whether your audience sees the code for each cell of an R Markdown document, use the echo option, as shown in the R Markdown documentation. For example, to prevent code from making it into the Report, structure your code cells like this:

### Here's where my analysis gets interesting.

'''{r echo=FALSE}
plot(some_data)
'''

View and Manage a Report

Visit your Report from the project Outputs page. On the Report page, you can remove a Report with the Delete button, located above the Report content.

Before sharing a link to a Report with teammates, first make sure they’re a member of the project. The View permission level is appropriate for teammates who are visiting a project just to review your Reports.

_images/view-report-1.png

Report Versions

Report versions allow you to make changes to an existing report. Instead of creating a whole new report, you can choose to simply bump up the version number of that report. This is particularly useful when data is being updated and you want to re-run the notebook and update the charts.

When looking at the Report itself, you can see the version list in the Version menu on the left. Here you can switch between different Report versions. You can also publish a new version of the Report by clicking on Publish New Version. There are two ways to create a new version of a Report, discussed in more detail in the following sections.

Publishing a New Version from Within a Report

Exemplified in the preceding snapshot, the first way to create a new version of a Report is to go in the Report itself and click New Report Version. As a result, the following window will appear:

_images/new-version-1.png

Double check the branch and commit ID. Make sure they are the ones you want to capture in your new Report version. If you go back to the Report, you should see that Version 2 is the one being used.

Publishing a New Version from the Action Button

You can also use the action button to add a version to an existing Report. Choose the Publish a Report option. Within that window, choose your branch and select the option stating “Add a version to an existing report.” Write the path of your notebook and enter the name of your Report. After clicking Publish, a new version of your Report will appear.

_images/new-version-2.png

Delete a Version

You can also delete a version of your Report. In your Report, choose the version you want to delete from the menu on the left and click Delete Version on the upper right corner of the Report version. A box confirming the choice will appear:

_images/delete-version.png

To delete all versions of the Report, choose More Options from the menu on the left and then click the Delete button. This will delete all versions of the Report and the Report itself.

_images/delete-all.png