This guide will walk through how to publish a dashboard onto the Posit (Formerly RSConnect) server. This is currently supported from Azure Virtual Desktops.

There is a 2GB limit to the size of dashboards that can be published on the Posit server.

An example Dashboard can be found in the PlotlyDASH folder.

Installing rsconnect

You will have to install “rsconnect” to publish a dashboard.

pip install rsconnect

To run rsconnect outwith it’s location:

set NEWPATH=C:\Users\XXXXXXXX\AppData\Roaming\Python\Python310\Scripts\

Replacing the X’s with your system username. This is usually your employee number.

Then:

set PATH=%PATH%;%NEWPATH%

API key

Log onto the Posit server with this link: https://dap-prd2-connect.azure.defra.cloud/

Enter your credentials.
Click on your name and select API Keys from the menu bar that appears on the right hand side.

Click on “+ new api key”

Give it a name in the text box that pops up.

The second pop up gives you the chance to copy the 32 character alphanumeric code. Save this somewhere (for example in notepad) as you will require it later to publish and can be used for subsequent dashboards.

Add API key to rsconnect

To configure the rsconnect package for the server:

rsconnect add   --server https://dap-prd2-connect.azure.defra.cloud/ --name \<name> --api-key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Where <name> is of your choice of the dashboard name and the X’s are replaced with your own API key.

Deploy Dashboard

Navigate to the folder that contains the folder that you dashboard files are located.

Then:

rsconnect deploy dash -n \<name> \<foldername>

Where <name> is replaced with the name you chose in the previous step, and <foldername> is the name of the folder containing you dashboard files.

Viewing the dashboard on Posit

Return to the Posit server: https://dap-prd2-connect.azure.defra.cloud/

Click on “Content” on the left hand side. You should see your dashboard in the list named as you chose and your username under Author. Click on it and you will see your dashboard.

Please see the tutorial on dashboard admin to apply settings to your dashboard.