The uszip5 question type accepts five digit responses that match known ZIP codes in the United States.
1. What is your ZIP Code?
type: uszip5
Details
-
type: uszip5
creates a numeric text input field. - When
type: uszip5
is used, hidden variables are automatically generated and populated with Census data. - To create these hidden variables, the ZIP code is "looked up" in the system sheet zip_db_dlxbus and matched to specific values in that sheet. Then, the corresponding values are matched to additional system sheets to populate the data for State, Region, Division, etc.
- Each of the variables generated default to
translate: n
. - Each of the variables generated are placed in the same chapter as the parent question. Include the
chapter
tag to change its location.
Auto-generated ZIP code variables
Below is a complete list of the variables created and the corresponding system sheets used to auto-populate the Census data. Assume Q1 is the question driving the variables below.
Variable | Description | 'optsfrom' (System sheet name) |
---|---|---|
Q1_STATE | The state; also includes Washington, DC and 'State not found'. | system.states |
Q1_REGION | The region — Northeast, Midwest, South, or West. | system.rgopts |
Q1_DIVISION | The division — New England, Middle Atlantic, East North Central, West North Central, South Atlantic, East South Central, West South Central, Mountain, or Pacific. | system.dvopts |
Q1_CBSA | The Core Based Statistical Area (CBSA) which consists of metropolitan and micropolitan areas, e.g., Miami-Fort Lauderdale-West Palm Beach FL. | system.cbsaopts |
Q1_MSA |
The Metropolitan Statistical Area (MSA), e.g., Miami-Fort Lauderdale FL. | system.msaopts |
Q1_USR | The Urban-Suburban-Rural (USR) designation — Urban, Suburban, Rural, or Not categorized. | system.usropts |
Tags
The following tags can be included with uszip5 questions.
Tag | Description |
build click balance quotas from |
Creates a click balance quota using variables generated from a Aliases include: |
build quotas from |
Creates a quota using variables generated from a uszip5 question. |
chapter |
Specifies the chapter or sub-section of the survey where the data for a given variable should be located. |
exclude derived |
Specifies not to auto-build any specified derived uszip5 variables; e.g., |
matchto |
Checks a response against values in a specified spreadsheet. This is not required for uszip5 questions, but may be included to check against local sheets as needed for custom lookups. |
systemvar |
Accepts 'y' and 'n' inputs. Setting to 'y' moves the variable to the System fields category in the reporting field tree. |
Additional examples
Creating quotas
Questions with type: uszip5
can also be used to create quotas by using the build quotas from
tag. A single uszip5 question can support multiple build quotas from
tags.
In the following example, Q1 will create all hidden variables listed in the table above, but quotas will only be created from variables Q1_STATE and Q1_REGION.
1. What is your ZIP code?
type: uszip5
build quotas from: state
build quotas from: region
Note: The build quotas from
tag requires all input be in lowercase letters.
Using 'matchto' for local sheet lookup
In the example below, a ZIP code spreadsheet was provided by the client to map the respondent to a set of client-defined regions. We imagine that this custom spreadsheet includes a column called 'segment' filled with three values: 1, 2, and 3.
The use of matchto
and derivefrom
on Q4 and QCUSTSEG, respectively, pairs these questions to perform a lookup of the ZIP entered at Q4 to the surveyid.customersegment sheet. The value at this intersection of the ZIP code and value in column 'segment' will be populated into QCUSTSEG.
4. What is your ZIP code? type: uszip5 matchto: surveyid.customersegment CUSTSEG. Customer segment defined by ZIP type: radio derivefrom: Q4 segment 1. Segment A - Northern US (Along Canada Border) 2. Segment B - South East US 3. Segment C - South West US
Comments
0 comments
Please sign in to leave a comment.