Publishing and Sharing

Publishing your report so you can share it with others

This feature requires use of the free Datapane Public hosted platform or a private Datapane for Teams instance

Publish your report

So far we've demonstrated how to build and view reports locally; however, one of the most powerful features of Datapane is the ability to publish your report straight from your code and share it directly with your team or the wider world.

Once you've logged in to your chosen Datapane server, call report.publish(name='Your report name') in your script and your report will be published to your Datapane instance for viewing online. This will return the URL of the report that you can share.

If we take the report from the previous example, all we need to do is change .save to .publish and choose a name for our report. To open the report afterwards automatically, set the open boolean parameter. Publishing a report prints the URL to standard out, and returns a report object.
import pandas as pd
import altair as alt
import datapane as dp
dataset = pd.read_csv('')
df = dataset.groupby(['continent', 'date'])['new_cases_smoothed_per_million'].mean().reset_index()
plot = alt.Chart(df).mark_area(opacity=0.4, stroke='black').encode(
y=alt.Y('new_cases_smoothed_per_million:Q', stack=None),
color=alt.Color('continent:N', scale=alt.Scale(scheme='set1')),
report = dp.Report(
#'report.html', open=True)
report.publish(name='Covid Report', open=True)

Once published, you can share the link with others so they can view your report and comment on it.

Datapane Public provides a public reports repository, hence all reports created are viewable and shareable by default. In future sections, we will also explore how to embed your report into a range of other platforms so you can share it with a wider audience.

Datapane for Teams provides additional options to share reports with team members only, or keep them fully private, along with expiring access tokens to share securely with select outside members - ideal for users who require privacy and security over their data and analysis.