Article
Standard Screeners
When & Why to Use
Call standard_screener() when you need a ready-made demographic screener that —
- Adds the core demo questions (age, gender, region, etc.) in the right order
- Weights the data to national census proportions for the chosen country
- Closes quotas automatically once the targets are met
Use it to jump-start GenPop surveys or any study that just needs a quick, balanced sample without hand-building the screener every time.
Supported Screeners
| Country code | Available templates | Typical use-case |
|---|---|---|
| US | GenPop, NestedGenPop | General population or nested quotas |
| GB | GenPop, 16to54 | UK GenPop or younger audience |
| AU | GenPop | Australian general population |
Need something else? Register a new template in SCREENER_REGISTRY and it becomes instantly callable.
Function Signature
standard_screener(country: str, name: str = "GenPop") -> None
| Arg | Type | Required | Default | Description |
|---|---|---|---|---|
| country | str | ✓ | — | ISO-style code used by MX8 Labs ("US", "GB", "AU", …) |
| name | str | ✗ | "GenPop" | Template name listed in Supported Screeners |
What Happens Under the Hood
- Looks up the template in SCREENER_REGISTRY.
- Injects the questions into the current survey (self).
- Applies built-in quota weights so fieldwork stays on-target.
No return value; the survey object is modified in place.
Example Code
# US general population survey s.standard_screener("US") # UK younger audience, ages 16–54 s.standard_screener("GB", "16to54") # Nested quotas in a US screener s.standard_screener(country="US", name="NestedGenPop")
Notes & Tips
- Chainable – call other survey builders before or after; order doesn’t matter.
- Extensible – create custom screeners by adding lambdas to SCREENER_REGISTRY.
- Idempotent – calling the same screener twice only adds one set of questions.
- Compliance – questions are locally adapted (e.g., ethnicity lists) to each market.
That’s it. One line, instant, census-weighted screener.