Posit Connect Health Startup Tutorial

Background

Posit Connect (formerly known as RStudio Connect) is a tool that allows for organizational sharing of items published from RStudio such as Shiny apps, interactive graphs and reporting documents (such as this one created with Quarto). This document is intended to walk RStudio users through the process of establishing an Posit Connect account, connecting to Posit Connect from RStudio, and publishing a document to Posit Connect.

Best Practices

Here are some best practices

  • Never publish screenshots of data, code, or outputs.
  • To prevent accidental publication to other servers do not download data to local devices unless otherwise instructed,
  • Choose the correct publishing location - viz.soteria.arizona.edu
  • If available, do not select the “Anyone - no login required” under the Posit Connect sharing permissions.
  • Do not copy your API code to an insecure location.

To access Posit Connect Health however, you will first need to have access to the Soteria enclave.

Request Access to Soteria

  1. Establish a primary PI or sponsoring faculty member and have them indicate that you are a team member on Soteria.
  2. Open https://soteria.arizona.edu/ and click Request Access.

  1. Fill out the form with your user and project information. Once submitted you will receive an automated email indicating completion of the request.
  2. Once approved, you will receive a secondary automated email, UA Soteria Access Request Approved indicating required trainings. Log into Edge Learning (https://edgelearning.arizona.edu/) to sign up and complete all of the required trainings.

Download and Set up Cisco VPN

  1. Download the VPN software by following the link (https://vpn.arizona.edu/+CSCOE+/logon.html#form_title_text) . You will be prompted to log in. Use the default connections. Enter your NetID, Password and NetID +Method (ex: “push”).

  1. Follow the prompts to download and install Cisco AnyConnect VPN.

  1. Open Cisco AnyConnect VPN on your desktop.
  2. The first connection must be to: vpn.arizona.edu. Type into the pop-up and click connect.

  1. Sign in as before, using the default group. Enter your NetID, Password and NetID +Method (ex: “push”).

  1. Click Disconnect

You are now ready to connect to your Soteria VPN.

Connect to Soteria VPN

  1. If it does not auto-populate, connect to the Soteria VPN using: vpn.arizona.edu/soteria. Again, enter your NetID, Password and NetID +Method (ex: “push”) to sign in.

  1. Accept the pop-up notification. The Cisco Icon in the system tray (bottom right) of your desktop, will now display a lock, indicating a successful connection.

Posit Connect Health

System Requirements

Posit Connect is supported on multiple operating systems and browsers. For a full list see documentation found here to ensure full machine compatibility.

Installation Dependencies

R and R Studio

You will need a current, working version of R and RStudio to publish on Posit Connect. This website gives step by step instructions: https://www.dataquest.io/blog/installing-r-on-your-computer/

Establishing an Posit Connect account

Follow the steps below to begin your publishing journey with Posit Connect Health:

  1. Request account access by navigating to the following link and finding the Request Access button near the bottom of the page.

  1. You will be taken to a survey form to request access. Along with name and contact information, be prepared to supply a copy of published work, such as a Shiny app or GitHub code, and the name of an advisor for approval.

  2. Once your request has been approved, navigate to https://viz.soteria.arizona.edu and sign in with your organizational email if you are not automatically signed in. You will see the main navigational screen of Posit Connect.

The main navigation is at the top of the screen:

  • Content shows all content you have access to (yours and shared)

  • People shows collaborators within your network

  • Documentation provides further instructional material for use of Posit Connect.

Connecting RStudio to Posit Connect

Follow the steps below to connect RStudio with Posit Connect:

  1. Open R Studio. Select Tools > Global Options:

  1. On the pop up, navigate to Publishing, then click Connect on the right-hand side:

  1. Click Posit Connect. Paste in the URL of the Posit Connect server (example: https://viz.datascience.arizona.edu) then click Next.

  1. A window should pop up in your browser. If not, follow the prompts in RStudio to open the window. Click Connect in the window. You will receive a notification if the connection was successful. The browser window can be closed.

  1. In RStudio the popup should now have the option to connect account. Click Connect Account. The URL will now be visible in the parent menu. Click OK to save the changes.

Publishing to Posit Connect

  1. Once your content is created, click the blue Publish button (exists in multiple locations):

  1. The publishing window should auto populate with your information. Ensure all information is correct and click Publish.

  1. 🎉 You are now published! Your browser window will automatically open the app. Click Documentation to view instructional material regarding Posit Connect publishing options.

References and Further Information

Duitman, Ryan. Red Machine VPN Tutorial. https://arizona.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=6410e385-300c-4bfa-98d7-aea701705a99

Data Science Institute. 2023. RStudio Connect. https://datascience.arizona.edu/analytics-powerhouse/rstudio-connect

Posit Software. 2023. Posit Documentation. https://docs.posit.co

University of Arizona. 2021. UA Virtual Private Network (VPN). https://uarizona.service-now.com/sp?id=sc_cat_item&sys_id=8ab35af01bb830507947edf1604bcb90