Skip to content

rstudio/posit-demo-assets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Posit Demo Assets

This repo contains demo assets to be used on the Posit Test Drive environment.

What is Posit Test Drive

Posit Test Drive is a limited demo environment hosted by Posit to help you learn more and try out the various features.

Video series

Do you prefer watching videos over reading? Check out the end-to-end data science workflows video series for inspiration for what Posit Team enables your team to accomplish!

Getting Started

Here you will find three products:

  • Posit Workbench is your development environment for creating R and Python code and running large computationally intensive jobs in a secure and scaleable environment.
  • Posit Connect is a publishing platform for hosting the work your team creates in R and Python.
  • Posit Package Manager is a repository management server to organize and centralize R and Python packages across your organization.

Milestones to Success

It can be very daunting learning a new system. Here are some useful resources to explore as you get familiar with the Posit products.

First Day

Orient yourself to the products and learning resources.

Orientation

User Guides
New to R/Python?

First Week

Learn how to use certain product features and deploy content to share with others.

Posit Workbench

Posit Connect

Posit Package Manager

Second week and on

Get inspired!

How do I open a project?

R content

There are two ways to open an R project.

Option 1:
  1. Find the Files tab on the right side of your screen
  2. Navigate to the project folder you want to work in.
  3. Launch the project by clicking on the .Rproj file
Option 2:
  1. Navigate to the project folder you want to work in.
  2. Restore the needed packages into the renv environment.
    setwd("./R/shiny-penguins/")
    renv::restore()

Python content

The uv way

Use uv. It will detect that this is a project and create the venv for us when we go to run the application.

    cd Python/quarto-lightbox
    uv run quarto render quarto-python-lightbox.qmd
The pip way
  1. Create a virtual environment in the folder you want to work in.
  2. Restore the needed packages into the virtual environment.
    cd Python/dash-app
    python3 -m venv .venv
    source .venv/bin/activate
    python3 -m pip install -U pip setuptools wheel
    python3 -m pip install -r requirements.txt

Running into issues?

Reach out to your Posit account executive who can answer your questions or direct you to the right resources as you evaluate Posit. If you aren't sure who your account executive is email [email protected]{.email} and ask to be introduced.

Get technical help! Email-based Posit support is also available. Learn how to submit support tickets: here

Want to add an example?

Awesome!

For R based projects the requirements are:

  1. Clone and branch this project.
  2. Use renv to record the r package versions used
  3. Create a manifest.json file to support git-backed publishing
  4. Submit the Pull Request (PR) to have your changes added to this repository.

Updates for the environment can be done with:

    R -e 'renv::record("[email protected]"); renv::restore(packages = "renv"); renv::install(); renv::snapshot(); rsconnect::writeManifest()'

For Python based projects the requirements are:

  1. Clone and branch this project.
  2. Create a venv to isolatle enviornments and generate a requirements.txt file so that only the minimum packages needed to support your project are included. Read this for more on Python package management.
  3. Create a manifest.json file to support git-backed publishing
  4. Submit the Pull Request (PR) to have your changes added to this repository.

For uv projects, they can be initalizated and updated with (change format and packages as needed):

    uv init --app --python 3.12.6
    uv add numpy matplotlib jupyter
    uv sync --upgrade
    uv export -o requirements.txt --no-hashes
    uv run rsconnect write-manifest api .

    # Dev dependencies may need to be added 
    uv add --dev uv ipykernel