from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) doc = 'End of Experiment Questionaire' class Constants(BaseConstants): name_in_url = 'questionnaire' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): postalcode = models.StringField(label='What is your postal code/zip code of residence?') age = models.IntegerField(label='What is your age?', max=100, min=17) gender = models.StringField(choices=[['Male', 'Male'], ['Female', 'Female']], label='What is your sex') ethnicty = models.StringField(choices=[['African', 'African'], ['Asian', 'Asian'], ['First Nations', 'First Nations'], ['White', 'White']], label='What best describes your race/ethnicity?', widget=widgets.RadioSelect) educ = models.StringField(choices=[['Below high school', 'Below high school'], ['High school graduate', 'High school graduate'], ['Professional certificate', 'Professional certificate'], ['Undergraduate', 'Undergraduate'], ['Graduate school', 'Graduate school']], label='What is your highest educational attainment?', widget=widgets.RadioSelect) profession = models.StringField(label='What is your profession?') workhours = models.StringField(choices=[['Part-time, less than 40 hours per week', 'Part-time, less than 40 hours per week'], ['Full-time, approximately 40 hours per week', 'Full-time, approximately 40 hours per week'], ['Full-time, more than 50 hours per week', 'Full-time, more than 50 hours per week']], label='How many hours do you work each week?', widget=widgets.RadioSelect) income = models.StringField(choices=[['Below 20,000 USD', 'Below 20,000 USD'], ['20,000 USD – 39,999 USD', '20,000 USD – 39,999 USD'], ['40,000 USD – 59,999 USD', '40,000 USD – 59,999 USD'], ['60,000 USD – 79,999 USD', '60,000 USD – 79,999 USD'], ['80,000 USD – 99,999 USD', '80,000 USD – 99,999 USD'], ['100,000 USD – 149,999 USD', '100,000 USD – 149,999 USD'], ['Above 150,000 USD', 'Above 150,000 USD']], label='What was your annual household income in 2019?', widget=widgets.RadioSelect) maritalstatus = models.StringField(choices=[['Single', 'Single'], ['Married or common-law partnered', 'Married or common-law partnered'], ['Divorced', 'Divorced'], ['Separated', 'Separated'], ['Widowed', 'Widowed']], label='What is your current marital status?', widget=widgets.RadioSelect) nos_house = models.StringField(choices=[['I live alone', 'I live alone'], ['2 ', '2 '], ['3', '3'], ['4', '4'], ['More than 5 ', 'More than 5 ']], label='Including yourself, how many people live in your household?', widget=widgets.RadioSelect) older60 = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='Including yourself, is there anyone in your household who is older than 60?', widget=widgets.RadioSelect) under18 = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='Do you have children under 18 in your household?', widget=widgets.RadioSelect) highrisk = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No'], ['Not Sure', 'Not Sure']], label='Are you among individuals who are at high risk for severe illness from COVID-19?', widget=widgets.RadioSelect) virus_aff = models.StringField(blank=True) virus_nores = models.StringField(blank=True) virus_iso = models.StringField(blank=True) virus_qua = models.StringField(blank=True) shop_none = models.StringField(blank=True) shop_more = models.StringField(blank=True) shop_out = models.StringField(blank=True) shop_over = models.StringField(blank=True) job_none = models.StringField(blank=True) job_wfh = models.StringField(blank=True) job_loss = models.StringField(blank=True) job_fired = models.StringField(blank=True) difficulties = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No']], label='Are you currently facing other difficulties because of the COVID-19 pandemic?') difficulties_specify = models.StringField(blank=True, label='If you answered yes above, please specify') diff_none = models.StringField(blank=True) diff_planet = models.StringField(blank=True) diff_int = models.StringField(blank=True) diff_nat = models.StringField(blank=True) diff_loc = models.StringField(blank=True) diff_socmed = models.StringField(blank=True) diff_media = models.StringField(blank=True) diff_other = models.StringField(blank=True) diff_notaff = models.StringField(blank=True) severity = models.IntegerField(label='How severe do you think is the COVID-19 pandemic? (0 – not severe at all, 10 – extremely severe)', max=10, min=0) best_option = models.StringField(choices=[['1', 'Test-and-control, where the government aggressively tests large numbers of people and employs digital surveillance to track the spread of the virus through a central tracking app that publicly informs citizens of known cases around them.'], ['2', 'Hard quarantine, where citizens are forced to stay inside and the law is seriously enforced by force.'], ['3', 'Soft quarantine, where citizens are required by law to stay inside but the law is not rigorously enforced.'], ['4', 'Mild quarantine, where citizens are asked to stay inside but are allowed to go out as long as they follow social distancing rules.'], ['5', 'Voluntary quarantine, where only older people and people with sacrificed immune systems self-isolate and the general public practice cautionary measures.']], label='In the absence of any vaccine or treatment, what do you think is the best option against the spread of COVID-19?', widget=widgets.RadioSelect) prior_free = models.IntegerField(label='(a) Freedom', max=9, min=1) prior_conf = models.IntegerField(label='(b) Conformity', max=9, min=1) prior_pershe = models.IntegerField(label='(c) Personal Health', max=9, min=1) prior_pubhe = models.IntegerField(label='(d) Public Health', max=9, min=0) prior_adv = models.IntegerField(label='(e) Adventure', max=9, min=0) prior_fun = models.IntegerField(label='(f) Fun', max=9, min=0) prior_surv = models.IntegerField(label='(g) Survival', max=9, min=0) prior_educ = models.IntegerField(label='(h) Education', max=9, min=0) prior_work = models.IntegerField(label='(i) Work', max=9, min=0) beh_risk = models.IntegerField(label='In a scale from 1 to 10, how willing or unwilling are you to take risks (1 – completely unwilling to take risks, 10 – very willing to take risks)?', max=10, min=0) beh_pun1 = models.IntegerField(label='How willing are you to punish someone who treats you unfairly, even if there may be costs to yourself to punish them (1 – completely unwilling to do so, 10 – very willing to do so)?', max=10, min=0) beh_pun2 = models.IntegerField(label='How willing are you to punish someone who treats other people unfairly, even if there may be costs to yourself to punish them (1 – completely unwilling to do so, 10 – very willing to do so)?', max=10, min=0) beh_favor = models.IntegerField(label='How well does the following statement describe you as a person: “When someone does me a favor, I am willing to return it” (1 – does not describe me at all, 10 – describes me perfectly)?', max=10, min=0) beh_econ = models.StringField(choices=[['Very Liberal', 'Very Liberal'], ['Liberal', 'Liberal'], ['Moderate', 'Moderate'], ['Conservative', 'Conservative'], ['Very Conservative', 'Very Conservative'], ['Other', 'Other'], ['No Opinion', 'No Opinion']], label='In terms of your economic views, are you:', widget=widgets.RadioSelect) beh_econ_oth = models.StringField(label='If you picked "OTHER" above, please specify:') beh_pol = models.StringField(choices=[['Very Liberal', 'Very Liberal'], ['Liberal', 'Liberal'], ['Moderate', 'Moderate'], ['Conservative', 'Conservative'], ['Very Conservative', 'Very Conservative'], ['Other', 'Other'], ['No Opinion', 'No Opinion']], label='Are you politically:') beh_pol_oth = models.StringField(label='If you picked "OTHER" above, please specify:') prior2_educ = models.IntegerField(label='(a) Education', max=6, min=1) prior2_env = models.IntegerField(label='(b) Environment (e.g., climate change and air pollution)', max=6, min=1) prior2_md = models.IntegerField(label='(c) Military defense', max=6, min=1) prior2_natinf = models.IntegerField(label='(d) National infrastructure (e.g., roads and public transportation)', max=6, min=1) prior2_pubhe = models.IntegerField(label='(e) Public health (e.g., universal health care and hospitals)', max=6, min=1) prior2_ss = models.IntegerField(label='(f) Social security (e.g., retirement and unemployment benefits)', max=6, min=1) difficulties_text = models.StringField(label='If you picked "OTHER" above, please specify:') perf_who = models.StringField(choices=[['1', 'Excellent'], ['2', 'Good'], ['3', 'Not Sure'], ['4', 'Poor'], ['5', 'Terrible']], label='(a) World Health Organization', widget=widgets.RadioSelectHorizontal) perf_io = models.StringField(choices=[['1', 'Excellent'], ['2', 'Good'], ['3', 'Not sure'], ['4', 'Poor'], ['5', 'Terrible']], label='(b) Other international organizations (EU, AU, UN, etc.)', widget=widgets.RadioSelectHorizontal) perf_ng = models.StringField(choices=[['1', 'Excellent'], ['2', 'Good'], ['3', 'Not sure'], ['4', 'Poor'], ['5', 'Terrible']], label='(c) Your federal/national government', widget=widgets.RadioSelectHorizontal) perf_co = models.StringField(choices=[['1', 'Excellent'], ['2', 'Good'], ['3', 'Not sure'], ['4', 'Poor'], ['5', 'Terrible']], label='(d) Your city officials', widget=widgets.RadioSelectHorizontal) perf_ot = models.StringField(choices=[['1', 'Excellent'], ['2', 'Good'], ['3', 'Not sure'], ['4', 'Poor'], ['5', 'Terrible']], label='(e) Other people in your city', widget=widgets.RadioSelectHorizontal) perf_md = models.StringField(choices=[['1', 'Excellent'], ['2', 'Good'], ['3', 'Not sure'], ['4', 'Poor'], ['5', 'Terrible']], label='(f) Medical community', widget=widgets.RadioSelectHorizontal) perf_mdc = models.StringField(choices=[['1', 'Excellent'], ['2', 'Good'], ['3', 'Not sure'], ['4', 'Poor'], ['5', 'Terrible']], label='(g) Medical research community', widget=widgets.RadioSelectHorizontal) perf_pmc = models.StringField(choices=[['1', 'Excellent'], ['2', 'Good'], ['3', 'Not sure'], ['4', 'Poor'], ['5', 'Terrible']], label='(h) Private medical companies', widget=widgets.RadioSelectHorizontal) perf_med = models.StringField(choices=[['1', 'Excellent'], ['2', 'Good'], ['3', 'Not sure'], ['4', 'Poor'], ['5', 'Terrible']], label='(i) News media (newspaper, tv, radio, website)', widget=widgets.RadioSelectHorizontal)