Track D Workbook: Business Statistics for Accounting Data
Start here (students)
If you’re a student, begin with Track D Student Edition (Workbook Landing). It explains the case story, the dataset contract, and the recommended “what to run” path.
Tip
If you’re in a lab section, your TA may also assign Track D Lab 0/1 (PyPI-only).
Track D is a Business Statistics & Forecasting track built around a realistic accounting running case (North Shore Outfitters, “NSO”).
The Track D Workbook is a PyPI-first student experience. You can install PyStatsV1, create a Track D workbook folder, and run Track D only (no repo clone required).
If you haven’t seen the Track D overview yet, start here:
What you get
When you run pystatsv1 workbook init --track d, PyStatsV1 creates a local
folder containing:
Big picture map (recommended)
If you feel like you are learning lots of commands but losing the “why”, read:
convenience runner scripts (
d01…d23) that map to Track D chaptersa reproducible, pre-installed dataset under
data/synthetic/(seed=123)an
outputs/track_d/folder where results are writtena small smoke test so you can quickly confirm everything is working
Quickstart (PyPI-only)
Create a virtual environment and install the workbook extras.
python -m venv .venv
# Windows (Git Bash):
source .venv/Scripts/activate
python -m pip install -U pip
pip install "pystatsv1[workbook]"
Create a Track D workbook folder.
pystatsv1 workbook init --track d --dest track_d_workbook
cd track_d_workbook
See what you can run.
pystatsv1 workbook list --track d
Peek the data (recommended first step).
pystatsv1 workbook run d00_peek_data
This prints the row counts and column names for the key CSV files and writes a
short markdown summary into outputs/track_d/.
Run the first chapter.
pystatsv1 workbook run d01
Run a quick self-check.
pystatsv1 workbook check business_smoke
Tip
You can re-run any chapter as many times as you want. The scripts overwrite outputs deterministically as long as you keep the dataset unchanged.
What data you are working with
Track D ships two canonical datasets. They are synthetic but realistic, and are the same every time (seed=123).
LedgerLab (Ch01) — a small “starter ledger”
purpose: introduce the accounting equation, debits/credits, and how a general ledger becomes an analysis-ready table
location:
data/synthetic/ledgerlab_ch01/key files:
chart_of_accounts.csvgl_journal.csvmonthly outputs like
trial_balance_monthly.csvandstatements_*_monthly.csv
NSO v1 running case — a richer business dataset
purpose: practice the real analyst workflow: reconcile, validate, reshape, summarize, model, and forecast
location:
data/synthetic/nso_v1/key files include event logs (AR/AP/payroll/inventory), a bank statement feed, a generated general ledger, and monthly statements and trial balances
Before you run deeper chapters, skim:
Track D Dataset Map — what each table is, how tables relate, and why some rows look “weird” on purpose
If you want to see the full data dictionary for NSO v1:
Resetting (or regenerating) the datasets
Datasets are installed automatically during workbook init.
If you edit anything under data/synthetic/ and want to return to the
canonical seed=123 version:
pystatsv1 workbook run d00_setup_data --force
This restores the canonical dataset files and re-runs a few lightweight checks.
Where your results go
By default, Track D scripts write artifacts to:
outputs/track_d/— tables, memos, and small machine-readable summariesoutputs/track_d/figures/— charts created by chapters that plot results
For a practical walkthrough of the most common output files (CSV/JSON/PNG) and how to use them in a write-up, see Track D Outputs Guide. To apply the same workflow to your own exports, see Track D: Apply what you learned to your data.
A typical chapter produces:
one or more
.csvartifacts (tables you can open in Excel)a short
.mdmemo describing what the script did and what to look fora “manifest” CSV listing outputs (useful for grading or reproducible reports)
How Track D helps you become a better accounting-data analyst
Track D is not “statistics in isolation.” The goal is to practice the full loop:
Measurement + integrity: understand what the numbers mean and what can go wrong
Quality control: detect issues early (duplicates, broken keys, imbalances)
Summarization: build monthly statements and diagnostic KPIs from transactions
Explanation: connect changes in performance to drivers (mix, price, volume)
Forecasting: build baselines, add drivers, run scenarios, and communicate uncertainty
Most chapters are designed to leave you with a concrete artifact you can show:
an analysis table (CSV)
a chart
a short memo with the “story” and the assumptions
Suggested workflow by week
A simple way to work through Track D:
Start each week with
d00_peek_datato remind yourself what tables exist.Run the chapter wrapper (
dNN).Open
outputs/track_d/and read the newest memo first.Use the artifacts for your write-up.
To connect the workbook runs to the textbook pages, use the Track D chapter docs as your “book”:
Troubleshooting
If a chapter fails, try running
pystatsv1 workbook check business_smoketo confirm your environment is healthy.If you modified data and things look “weird,” reset with
pystatsv1 workbook run d00_setup_data --force.For general workbook workflow tips, see Workflow: Run → Inspect → Check.