# Domain operations analytics lab

Original synthetic datasets for independently scoped business exercises. No rows describe real customers, suppliers, medical care, course fees or NeuraPath outcomes. Tables from different exercises must not be joined merely because an identifier looks similar.

Run `python build_and_verify.py` from this directory with Python 3.12 or a compatible later version. Only the standard library is required. The script writes CSVs and a SQLite schema, checks reference results and writes `verification-results.json`. `database()` loads a fresh in-memory database from the CSVs for article examples.

## Current datasets and contracts

- `retail_periods.csv`: two comparable products and two periods. Integer units and unit prices in paise. No returns, taxes, currencies or new/discontinued products. The bridge uses base-price volume/mix and current-quantity price effects; other interaction allocations are possible.
- `inventory_lots.csv`: remaining units and unit cost by receipt lot. For the January 31 snapshot, exclude the deliberately included future receipt L5. The remaining balances for eligible lots are assumed to describe that snapshot, not today's stock. Age is calendar days since receipt. No claim about obsolescence, expiry or realizable value follows from age alone.
- `availability.csv`: eight scheduled product-date observations at one consistent daily snapshot. Six have known availability; two are unknown. This supports a snapshot incidence rate, not stockout duration or lost-demand estimation. Sales cover the associated day and do not establish availability at every point in that day.
- `purchase_orders.csv` and `promise_history.csv`: four purchase orders originally due in January. A nonblank receipt means the entire order was received on that date; no partial receipts. One remains open and overdue at the January 31 cutoff. History preserves original and revised promises and dates the changes were recorded. Business acceptance and causation cannot be inferred beyond the provided reason label.
- `vendor_spend.csv` and `vendor_map.csv`: six INR invoices totaling 70,000 paise. Five source identities have assumed verified entity evidence; R4 remains unresolved. Similar names do not authorize merging. The map's unique raw key prevents join multiplication.
- `ar_invoices.csv`, `ar_payments.csv`, `ar_credits.csv`: independent receivables exercise at January 31. Applications and credits are dated; one February payment is deliberately outside the cutoff. F4 is overapplied and retains a negative balance as an exception/credit position. This is analytical reconciliation, not a prescribed accounting treatment.
- `billing_invoices.csv`, `billing_payments.csv`, `billing_refunds.csv`, `billing_credits.csv`: a separate two-invoice reconciliation. Status vocabulary is local to this fixture. One payment failed, one refund is pending and one settled payment is unallocated. Credit-note reductions and actual cash refunds are separate ledgers. All amounts are paise; no taxes, FX, fees or disputes are modeled here.
- `expenses.csv`, `cost_taxonomy.csv`: two periods and two classification versions. Both versions cover every cost code; compare periods using one selected version and preserve original amounts.
- `opportunities.csv`, `stage_history.csv`: opportunity amounts are deliberately constant; only stages change. History is complete from creation, with no tied change dates. Reconstruct stage strictly before the cutoff. A real pipeline also needs amount, currency and ownership histories when those change.
- `campaign_orders.csv`, `campaign_spend.csv`: separate December acquisition cohorts with observed thirty-day refund outcomes complete by January 31. Order amounts and costs are frozen at that outcome horizon. Marketing spend is assigned to the same cohorts, once per campaign/cohort. Recovered cost is the documented cost value restored by a return, not the cash refund. The resulting measure is contribution after the included acquisition spend, not full accounting profit or incremental marketing lift.
- `contacts.csv`: eight synthetic voice-queue contacts. Four answered, two abandoned, one callback request and one open contact. Local service-level rule uses answered within twenty seconds inclusive; an alternative excludes abandons within five seconds inclusive. Talk plus after-contact time is handle time here; no holds or transfers are modeled. These are explicit teaching definitions, not a promise of parity with a vendor dashboard.
- `appointments.csv`: entirely fictional appointment operations, no patient identities or clinical attributes. Naive timestamps all refer to one fixed local timezone with no DST transition. January 10 has six scheduled records: three completed, one no-show, one advance cancellation and one unknown outcome. A January 11 appointment is future at the cutoff. Six thirty-minute slots define a toy 180-minute planned session. No conclusion about care quality or clinical staffing follows from these counts.
- `learners.csv`, `class_sessions.csv`, `attendance.csv`: fictional teaching cohort, unrelated to real NeuraPath learners. Session eligibility begins on enrollment and ends before withdrawal; cancelled sessions are excluded. Missing attendance is unknown, not absence. Completion reporting uses the original enrollment cohort and a matured assessment deadline, keeping withdrawals visible.
- `inspections.csv`: disjoint inspected units in three batches. A defective unit can contain multiple defects. Different product types are deliberately confounded with production line, preventing a simple causal line ranking. Population generalization would require an appropriate inspection design.
- `shipments.csv`: five shipments promised before January 16, one of them still open; a sixth promise lies in the future. Dates describe full delivery, not dispatch. No partial shipments, business-calendar tolerances or timezones are modeled.
- `workload.csv`: a single aggregate queue planning scenario, with no employee-level data. Simple workload capacity is not a queueing model or a service-level guarantee.
- `room_nights.csv`: eight physical room-date rows, one out of service. Under the stated teaching contract, seven are available, three sold and one complimentary. Complimentary occupancy is shown separately; cancellation fees are not room revenue. External benchmarking requires matching the benchmark provider's reporting rules.
- `seller_cohorts.csv`: synthetic delivery-date cohorts with thirty-day refund outcomes. At February 1, S3 is immature. S4 has a different category and price band. S1 and S2 are comparable on the supplied fields only; small counts and unobserved differences remain.

Expected reference results are generated by the verifier. CSV headers and primary keys are checked on load; this compact loader is not a general production ingestion validator. Article examples state further assumptions and include their own expected-result assertions. SQL execution checks do not establish business-policy approval.
