This file provides guidance to AI assistants working with this Framework presentation project. Edit the sections without regeneration markers freely - they won't be overwritten.
This project uses Framework for reproducible data analysis. Every notebook and script
MUST begin with scaffold() which initializes the environment.
When you call scaffold(), it automatically:
.env (database credentials, API keys)auto_attach: true (see Packages section below)functions/ directory - they are globally availableDO NOT call library() for packages listed in the auto-attach section below.
They are already loaded by scaffold(). Calling library() again wastes time and clutters output.
DO NOT use source() to load functions from the functions/ directory.
They are auto-loaded by scaffold(). Just call them directly.
These packages are loaded automatically by scaffold(). NEVER use library() for them:
Configure packages in settings.yml and run ai_regenerate() to update this section.
These are installed but not auto-loaded. Use library() only when needed.
ALWAYS use Framework's package management:
# Add a CRAN package (will be installed on next scaffold)
package_add("janitor")
# Add and auto-attach
package_add("forcats", auto_attach = TRUE)
DO NOT use install.packages() directly - it bypasses Framework's tracking.
CRITICAL: All data operations MUST go through Framework functions. This ensures integrity tracking, encryption support, and reproducibility.
ALWAYS use data_read():
# From data catalog (preferred)
survey <- data_read("data.example")
# Direct path
customers <- data_read("data/customers.csv")
NEVER use these functions:
- ❌ read.csv() - no tracking, no encryption support
- ❌ read_csv() - no tracking, no encryption support
- ❌ readRDS() - no tracking, no encryption support
- ❌ read_excel() - no tracking, no encryption support
ALWAYS use data_save():
data_save(df, "data/analysis.csv")
NEVER use these functions:
- ❌ write.csv() - no tracking
- ❌ write_csv() - no tracking
- ❌ saveRDS() - no tracking
| Purpose | Directory |
|---------|-----------|
| Data files | data/ |
| Output files | outputs/ |
Read data from catalog or file path. Supports CSV, RDS, Excel, Stata, SPSS, SAS.
df <- data_read("data.example") # From catalog
df <- data_read("data/file.csv") # Direct path
Save data with integrity tracking.
data_save(df, "data/cleaned.csv")
Compute once, cache result. Use for expensive operations.
model <- cache_fetch("my_model", {
train_expensive_model(data)
})
Save analysis results with metadata.
result_save("summary_stats", stats_df, type = "table")
Create new files from templates.
make_notebook("additional-slides", stub = "revealjs")
This is a presentation project with minimal structure.
Edit presentation.qmd for your slides.
quarto render presentation.qmd
make_notebook("backup-slides", stub = "revealjs")
Add your project-specific notes, conventions, and documentation here.
This section is never modified by ai_regenerate().
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.