Documentation

Standard Screeners

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 codeAvailable templatesTypical use-case
USGenPop, NestedGenPopGeneral population or nested quotas
GBGenPop, 16to54UK GenPop or younger audience
AUGenPopAustralian 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
ArgTypeRequiredDefaultDescription
countrystr-ISO-style code used by MX8 Labs ("US", "GB", "AU", ...)
namestr"GenPop"Template name listed in Supported Screeners
What Happens Under the Hood
  1. Looks up the template in SCREENER_REGISTRY.
  2. Injects the questions into the current survey (self).
  3. 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.