Skip to content

Overview

Datapane Reports are data-centric documents which you can generate from inside of your Python analysis. You can think of them as replacements for sending a PDF or PowerPoint.

Reports can contain display blocks (such as datasets and plots) and layout blocks (such as dropdowns). Unlike Datapane Apps, they do not support Compute blocks (such as Forms). This means they can be exported as standalone HTML files and sent over Slack or Email.

Reports are often created programmatically from inside other platforms, such as a data pipelines ("LightGBM training results v230"), CI, or generated on a cadence ("Monday's sales forecast").

Tip

Generating a Report is somewhat similar to generating static-site generator for HTML, like Hugo or Jekyll

Datapane Reports provide the fastest way to share with others, for instance:

  • Export as a¬†standalone HTML file (with all it's assets inline) which you can share on Slack or Email
  • Build to a static site which you can host on GitHub Pages or S3
  • Upload to Datapane Cloud, which provides sharing and authentication facilitates so you can publicly or securely share with your team
  • Embed within your own internal applications and on third-party sites like Medium and Reddit

Example

The example below builds upon the View in the previous section, comprised of a heading, figure, interactive figure, and interactive data table.

Datapane makes it simple to convert this into a Report, as per the examples below (see the API reference for further details).

import altair as alt
import datapane as dp
from vega_datasets import data

df = data.iris()

fig = (
    alt.Chart(df)
    .mark_point()
    .encode(x="petalLength", y="petalWidth", color="species")
)

view = dp.Blocks("# My report", dp.Plot(fig), dp.DataTable(df))

Saving Reports

Reports can be saved / exported as standalone files which can be shared without a server. All data and plots are encapsulated in a single HTML file, which provides a secure and low-barrier sharing method. Views can be exported as a standalone report using dp.save_report:

# save as a static HTML-based report
dp.save_report(view, path="my_report.html")

You can view the saved report, download it, open it locally, or send via email and slack.

Note

Although standalone and serverless, Internet access is required to retrieve Datapane front-end libraries needed to render the report

Uploading Reports

Datapane Cloud provides a free platform for hosting, sharing, and embedding reports securely. See here for more information on getting started with Datapane Cloud.

Once you've logged in via the datapane client, you can use the following command to upload your report to Datapane Cloud,

dp.upload_report(view, name="My Report")

You can then share or embed the report, like this:

The full API docs for upload_report includes options to configure the Report project, visibility, and more. You can view the above report uploaded to Datapane Cloud here

Embedding Reports

Reports uploaded to Datapane Cloud can easily be embedded into other services applications.

  • We support the OEmbed protocol, which means that, similar to YouTube, pasting the link to any public report on Datapane Cloud on a compatible service will automatically embed the report within the site. This is supported for common sites like Reddit, Medium, and others
  • We also support the Card protocols used by Slack, Facebook, Twitter, and others, which generate a thumbnail and description of your report to ease sharing it within your community or workplace
  • With the paid tiers, it's possible to securely embed and whitelabel reports within internal applications or customer-facing products