This repository contains code to support the analysis of the paper: "Modeling Simultaneous Preferences for Age, Gender, Race, and Professional Profiles in Government-Expense Spending: a Conjoint Analysis" published in the 2021 Proceedings of AAAI Conference on Human Computation and Crowdsourcing.
This repository and associated work may be cited as follows:
@inproceedings{ibrahim2021modeling,
title={Modeling Simultaneous Preferences for Age, Gender, Race, and Professional
Profiles in Government-Expense Spending: a Conjoint Analysis},
author={Ibrahim, Lujain and Ghassemi, Mohammad M. and Alhanai, Tuka},
booktitle={Proceedings of the AAAI Conference on Human Computation and Crowdsourcing},
year={2021}
}
datasets
: contains three csv files:suggestedadvisor-expense-pairs.csv
: the file that is sampled to show advisor profiles and expenses during the experimentresults.csv
: the file with all the data collected from the experimentsusers.csv
: the file with information on each of the experiment respondents
ip-map-datasets
: contains files used to create heatmap of geographical locations of respondentsrequirements.txt
: required python libraries for analysisdemographic-analysis.ipynb
: jupyter notebook to perform demographic analysis of respondentsglobal-conjoint-analysis.ipynb
: jupyter notebook to perform conjoint analysis on responses from all respondentsglobal-plots.ipynb
: jupyter notebook to generate sankey plots and bubble plots on respondents' choices for age, gender, race, and professionpolitical-party-conjoint-analysis.ipynb
: jupyter notebook to perform conjoint analysis on responses from (a) democrats and (b) republicanspolitical-party-plots.ipynb
: jupyter notebook to generate sankey plots and bubble plots on (a) democratic respondents' and (b) repiublican respondents' choices for gender and race
- To install Python 3, follow these instructions.
- To install Pip, follow these instructions.
- To install Jupyter Lab/Notebook, follow these instructions. To run Jupyter Lab/Notebook, follow these instructions.
- To set up a virtual environment and use it in Jupyter Lab/Notebook, follow these instructions.
- Clone this github repository
git clone <url-to-this-repo>
cd <cloned-repo>
cd public-repo
- Get Python requirements needed
pip3 install -r requirements.txt
There are two datasets used in the analysis:
datasets/results.csv
:session_id
: unique id of the each respondent's sessionresponse_id
: unique id of each task response in a respondent's sessionexpense_category
: category of the expense presented in taskexpense
: specific expense presented in taskage_suggested
: age of suggested advisorage_selected
: age of customized advisorage_changed
: 0 if age_selected=age_suggested, 1 otherwisegender_suggested
: gender of suggested advisorgender_selected
: gender of customized advisorgender_changed
: 0 if gender_selected=gender_suggested, 1 otherwiserace_suggested
: race of suggested advisorrace_selected
: race of customized advisorrace_changed
: 0 if race_selected=race_suggested, 1 otherwiseprofession_suggested
: profession of suggested advisorprofession_selected
: profession of customized advisorprofession_changed
: 0 if profession_selected=profession_suggested, 1 otherwiseprofession_option1
: 1st profession option in the customized advisor profession drop down menuprofession_option2
: 2nd profession option in the customized advisor profession drop down menuprofession_option3
: 3rd profession option in the customized advisor profession drop down menuprofession_option4
: 4th profession option in the customized advisor profession drop down menutask_submit_time
: task submission time
datasets/users.csv
:session_id
: unique id of the each respondent's sessionuser_state
: state the respondent completed the experiment fromuser_gender
: self-reported gender of respondent (survey response)user_age
: self-reported age of respondent (survey response)user_degree
: self-reported educational level of respondent (survey response)user_politics
: self-reported political party affiliation of respondent (survey response)user_vote
: self-reported voting behavior (yes/no/not sure) in 2020 national elections of respondent (survey response)user_religion
: self-reported religion of respondent (survey response)user_ethnicity
: self-reported ethnicity of respondent (survey response)user_income
: self-reported annual income of respondent (survey response)session_submit_time
: session submission time (survey response)
All the analysis notebooks used to generate the figures and results used in the publication can be found in this folder: