Skip to main content

Question Type: this_or_that_rating_question

Let's get into the nuance

Updated over 3 weeks ago

When and Why to Use

Use this to gather nuanced preferences across paired options using a rating scale. Ideal for:

  • Capturing degrees of preference between two alternatives

  • Visualizing directional lean with intensity

  • Behavioral or brand comparison tasks

Supports slider, button, or star-based input styles with configurable point scales.

Portrait Experience

  • Each row shows a pair of options with a slider or buttons between them

  • The midpoint represents neutrality; endpoints indicate strong preference

  • Don't know option appears if configured

Landscape Experience

  • Pairs are displayed in tabular layout with rating scale between them

  • Works well with remote or keyboard navigation

  • Layout adapts to available screen width

Configuration Options

Option

Type

Required

Default

Description

question

string

yes

-

The prompt shown to the user

row_options

List[List[str]]

yes

-

List of 2-option comparisons per row

row_name

string

no

"scale"

Label for the row dimension in reporting

number_of_points

int

no

5

Number of scale points (e.g., 5 for -2 to +2)

first_point

int

no

1

Starting value for scale (optional)

style

string

no

"slider"

"slider", "button", or "star" input style

dont_know_option

str

no

""

Optional "Don't know" response per pair

randomize

bool

no

False

Randomize row order

default

Dict[str, int]

no

random

Default values for test data

recodes

Dict[str, str]

no

-

Map ranges or raw scores to grouped labels

image

MediaItem

no

-

Optional image above the task

custom_validator

`Callable[[Dict[str, int]], str

None]`

no

-

**topics

dict

no

-

Used in token substitution and reporting

Example Code

Basic usage:

s.this_or_that_rating_question( "Which of the following do you prefer?", number_of_points=5, row_options=[ ["Apples", "Oranges"], ["Coke", "Pepsi"], ["Dogs", "Cats"], ["Winter", "Summer"] ] )

With recodes:

s.this_or_that_rating_question( "Rate your preference for each pair", number_of_points=7, row_options=[["Tea", "Coffee"], ["Netflix", "YouTube"]], recodes={ "1": "Strongly Left", "4": "Neutral", "7": "Strongly Right" } )

With custom validation:

s.this_or_that_rating_question( "Indicate which you prefer in each pair", number_of_points=5, row_options=[["Texting", "Calling"], ["Books", "Podcasts"]], custom_validator=lambda d: "Please vary your responses" if len(set(d.values())) == 1 else None )

Notes

  • Use an odd number of points to include a neutral midpoint

  • The left option in each pair anchors the low end of the scale

  • recodes are useful for bucketing scale values into preference categories

  • custom_validator can prevent straight-lining or require balance

Did this answer your question?