SynthPopCan Documentation
SynthPopCan is early-stage tooling for Canadian synthetic population work: control tables, iterative proportional fitting, Statistics Canada source inspection, census microdata adapters, linked household/person tree models, and validation reports.
Most SynthPopCan workflows have the same basic shape. We begin by inspecting sources and deciding which categories, geographies, and constraints are relevant to the research question. We then prepare inputs such as controls, seed rows, or model packages; generate outputs such as weights or linked household/person rows; validate the result against controls and linkage rules; and keep the evidence with the output. The final CSV is only part of the work: the source notes, category mappings, commands, random seeds, and validation reports are what make the generated population interpretable.
Start By Task
If we are unsure where to begin, start with Which Workflow Should We Use?. It maps common research situations to the web app, command-line tools, notebook API, and advanced library pages.
Most new readers should start with one of two generation workflows:
- IPF from margin tables
Use this when we have seed rows and public control totals, or when we want to find a Statistics Canada WDS table and turn it into IPF inputs. The friendliest surface is the local web app. For scripts and methods sections, use Statistics Canada Sources, Controls, and IPF.
- Generate from existing model
Use this when we have a prepared household/person model package and want to generate linked synthetic households and people. Start with the web app for a guided local run, or use Tree Models when we need command-line details.
- Assign linked output to small areas
Use this after generating candidate household/person rows when we also have small-area Census Profile controls. Start with Small-Area Linked Synthesis for the current household-first workflow.
If we want to work in a notebook or teaching script, start with
Getting Started With the Beginner API. That
page uses import synthpopcan as spc and keeps advanced training,
auditing, and packaging out of the first path.
If we prefer the command line but want the same beginner lane as the web app, run:
synthpopcan guide ipf
synthpopcan guide model
Advanced source preparation, microdata adapters, model training, audit reports, and release-readiness checks are still documented, but they come after the beginner generation workflows.
Overview
- Introduction
- Which Workflow Should We Use?
- If We Want To Try SynthPopCan
- If We Want a Notebook or Teaching Script
- If We Have Seed Rows and Control Totals
- If We Have or Need Linked Households and People
- If We Need Small-Area Geography
- If We Are Still Inspecting Sources
- If We Need To Check an Output
- A Simple Decision Table
- What We Should Keep With Any Workflow
- Acknowledgments
- Field Primer
- Why Synthetic Populations Exist
- A Short Lineage
- What Makes Canadian Data Awkward
- Two Families of Methods
- Why Forests Are Not the First Tool Here
- Structural Zeros and Sampling Zeros
- Privacy, Disclosure, and Model Artifacts
- Evaluation Is Not One Number
- What Humanities Readers Can Bring
- Reading Map
- Tool Reference Map
- Further Reading
- Glossary
- Installation
Beginner Workflows
- Local Web App
- IPF
- Controls
- Statistics Canada Sources
- Generate From a Model Package
- Small-Area Linked Synthesis
- Step 0 — Prepare Boundary Files (once)
- Step 1 — Generate Candidates
- Step 2 — Build Controls from Census Profile
- Step 2.5 — Estimate Run Size
- Step 3 — Calibrate to Controls
- Step 4 — Explore Results as an Interactive Map
- Beginner API Shape
- Example: Quebec City CMA at Census-Tract Level
- Statistical Quality
- Current Limits
- Validate
Advanced Workflows