Write Effective Code

What is “effective” code? The notion of effectiveness evolves as a data science project moves through the develop, deploy, and scale stages.

In Development, effectiveness is measured by the data scientist’s ability to use code to solve a problem. Code that is burdensome to maintain or not optimized to perform under demand is not effective.

The articles below offer guidance through these stages.

Learning to code in R and/or Python

When just beginning, these resources can help

Posit Academy
The most effective way to learn data skills with your team

Getting comfortable with your tools
Minimum Viable Python
Using Python with Posit Products — an Overview
Connect User Guide
Workbench User Guide

Moving from Excel to R
See insights from an Excel workbook extended with code-based outputs such as Shiny, Flexdashboard, and R Markdown
Using `reticulate` to combine R and Python in one project
No matching items

Learn new frameworks

Whether R or Python, there are new tools to add to your toolbelt

Analyses and Reports
Add interactivity or parameterization to your reports for greater flexibility
Quarto for R, Python, Julia, and Observable
R Markdown

Web Applications and Dashboards
Without knowing html, javascript, or CSS, you can create powerful interactive applications and dashboards
Shiny for R and Python

Use APIs as a means to expose your analytics to other systems or create pipelines
Example: integrate a plumber API with Slack
Example: expose a ML model as a plumber API

Vetiver for R and Python
Example: Bikeshare project model deployment using vetiver
No matching items

Code Smart

Be efficient with your code and your time.

Create a report template and customize your outputs with parameters
Learn about Parameterization with R Markdown
See example gallery projects using parameterized R Markdown

Leverage Different Output Formats
Example: Create and Publish a Slideshow from Jupyter Notebooks
Example: Access to Care

Break out work into reusable pieces
Example: Repeatable Data Science with the Pins Package

Utilize Automation
Send customized or conditional emails from scheduled reports on Connect
Utilize `targets` for orchestration

Deploy Responsibly
Shiny Feature Toggles
Feature toggles can be used to deploy changes to production (new features) that are hidden to most/all users and then be tested under production load and incrementally exposed to user groups as your confidence increases.
No matching items