How m-clark/book-of-models works
Project type and purpose
• This is a Quarto-based book (“Models Demystified”) with intermixed R Markdown (.qmd), Jupyter notebooks (.ipynb), raw data, code demos, LaTeX templates and CSS.
• It generates a static documentation website (under /docs) and PDF via LaTeX. It combines tutorial content, data‐science demos (R & Python), and figures into a cohesive online book.
Main components
a. Content sources
• Quarto pages: .qmd files at repo root (e.g., introduction.qmd, machine_learning.qmd, etc.)
• Jupyter notebooks in chapter-notebooks and various ml/linear_models directories
• Markdown includes (.md), LaTeX snippets (latex/*.tex), CSS/Sass (css/style.scss)
b. Data assets
• /data (CSV, RData, pickle models), /ml/data, /linear_models/data, etc.
c. Code libraries
• R scripts: functions/utils.r, estimation/functions/*.R, ml/*.R, linear_models/functions/*.R
• Python support: setup.py, environment.yml, chapter-notebooks/python_chapter_notebooks/requirements.txt
d. Build system
• Quarto CLI invokes Pandoc, executes code chunks in R/Python, compiles Sass to CSS, uses LaTeX (krantz.cls) for PDF
e. Output & deployment
• Static HTML under /docs (GitHub Pages), PDF via Quarto’s LaTeX engine
• CI via .github workflows (issue templates present)
Relationships & interactions
• Author/Contributor edits source (.qmd, .ipynb, code, data).
• Quarto build reads _quarto.yml & quarto.yml, spins up R/Python kernels, runs code chunks in notebooks & .qmd, loads data assets, applies CSS/LaTeX templates.
• Pandoc converts executed notebooks & markdown into HTML (and PDF).
• Assets (img/, css/, latex/) are bundled.
• Final /docs folder is pushed to GitHub Pages for hosting.
Architectural patterns & design principles
• Content–Build–Deploy pipeline (a linear flow from source to static output)
• Polyglot execution: R and Python both supported, each via its own kernel
• Modular content: chapters living as independent units, reusable code/functions
• Data as code inputs: clear separation of data folder and processing scripts
Relevant technologies & frameworks
• Quarto (and underlying Pandoc)
• R (knitr, quarto-r, LaTeX via krantz.cls)
• Python (Jupyter, PyQuarto, dependencies in requirements.txt)
• Sass (via css/style.scss)
• GitHub Pages for static hosting
• CI/CD via .github workflows (implicit)
Final checklist
• Callouts for critical config files (_quarto.yml, environment.yml, setup.py)