# Ethnic Discrimination in the Swiss Housing Market
## Replication Material
For the time being, we share data for replication and documentation purposes. Please get in touch for the document enabling linking the data to Swiss ZIP codes and BFS/OFS municipality numbers.
### EJPR - How one gesture curbed ethnic discrimination
#### Data
* Auer_Ruedin_EJPR_experiment_pseudo.dta --- individual-level data of the correspondence test, with municipalities and cantons pseudo-anonymized (Stata).
* Variables_Auer_Ruedin_EJPR_experiment_pseudo.txt --- corresponding description of variables.
* Auer_Ruedin_EJPR_google_trends.dta --- aggregated data from Google Trends (search volume, Stata).
* Variables_Auer_Ruedin_EJPR_google_trends.txt --- corresponding description of variables.
* Auer_Ruedin_EJPR_housing_indicators.dta --- indicators of number of moves at the level of cantons (Stata).
* Variables_Auer_Ruedin_EJPR_housing_indicators.txt --- corresponding description of variables.
* Auer_Ruedin_EJPR_names_survey.dta --- aggregated data from the names survey (verifying the names signal, Stata).
* Variables_Auer_Ruedin_EJPR_names_survey.txt --- corresponding description of variables.
* Auer_Ruedin_EJPR_newspaper_hits.dta --- number of articles in newspapers (Stata).
* Variables_Auer_Ruedin_EJPR_newspaper_hits.txt --- corresponding description of variables.
* Auer_Ruedin_EJPR_wikipedia.dta --- Wikipedia access data (Stata)-
* Variables_Auer_Ruedin_EJPR_wikipedia.txt --- corresponding description of variables.
Also included are (subfolder "Wikipedia and Twitter":
* wikipedia_replicate.R --- Core of the code to obtain Wikipedia access statistics. The relevant page titles are in the spreadsheet Nationalteams_CH_DE.xlsx.
* twitter_replicate.R --- Core of the code to get Twitter data. Note that we cannot share these data, and that you need a developer account to download tweets from the Twitter archive. Access tokens were removed in the code.
* twitter_sentiment_replicate.R --- Core of the code for the sentiment analysis. Note that the dictionary used is not include in the replication material, but freely available from https://wortschatz.uni-leipzig.de/de/download#sentiWSDownload. There are two functions, one for calculating the sentiment scores, and one for plotting.
* Nationalteams_CH_DE.xlsx --- Spreadsheet with Wikipedia page names and Twitter handles of the players. Because not all players had their own Twitter account, we ended up searching names only.
Publicly available data
* https://www.bfs.admin.ch/bfs/en/home/statistics/regional-statistics/regional-portraits-key-figures/communes.html --- data on Swiss municipality characteristics over time.
* https://www.bfs.admin.ch/bfs/en/home/statistics/politics/popular-votes.html --- data on popular votes and initiative results in Switzerland.
#### Code
* Syntax_Auer_Ruedin_2022_EJPR.do --- replication code (Stata). Some labels were manually added to the figures in the publication.
#### Citation
Auer, Daniel, and Didier Ruedin. 2022. ‘How One Gesture Curbed Ethnic Discrimination’. *European Journal of Political Research*. Forthcoming. https://doi.org/10.1111/1475-6765.12547
Online supplement: https://ejpr.onlinelibrary.wiley.com/action/downloadSupplement?doi=10.1111%2F1475-6765.12547&file=ejpr12547-sup-0001-OnlineAppendix.pdf
### ESR - Discrimination Driven by Variation in Social and Economic Conservatism
Data: https://osf.io/6m8ph
Code: https://osf.io/7cb32
#### Citation
Lacroix, Julie, Didier Ruedin, and Eva Zschirnt. 2022. “Discrimination Driven by Variation in Local Conservatism: Evidence from a Nationwide Field Experiment.” *European Sociological Review*. doi: 10.1093/esr/jcac051.
Post-print: https://druedin.files.wordpress.com/2022/11/postprint.pdf (hosted on personal website)
Pre-print: https://osf.io/b7r95
### SER - No Sign of Increased Ethnic Discrimination during a Crisis
#### Pre-registration
https://aspredicted.org/wq8xy.pdf
#### Citation
Auer, Daniel, Didier Ruedin, and Eva Van Belle. 2023. ‘No Sign of Increased Ethnic Discrimination during a Crisis: Evidence from the Covid-19 Pandemic’. *Socio-Economic Review*. https://doi.org/10.1093/ser/mwac069
Pre-print: https://osf.io/5jh3k
Post-print: https://druedin.files.wordpress.com/2023/01/auer-et-al.-2023-crisis-postprint.pdf (hosted on personal website)
Supplement: https://osf.io/rjvtf
## Documentation
Full documentation on the experiments is available on separate pages of the wiki:
- <a href="https://osf.io/ru8y6/wiki/Documentation/">Documentation</a>: general documentation, ethics, background, choice of property, sampling
- <a href="https://osf.io/ru8y6/wiki/Choice%20of%20Profiles/">Choice of Profiles</a>: rationale, list of names, list of occupations
- <a href="https://osf.io/ru8y6/wiki/Implementation/">Implementation</a>: instructions provided to the coders
- <a href="https://osf.io/ru8y6/wiki/Randomizer%20Software/">Randomizer Software</a>: information on the software
- <a href="https://osf.io/ru8y6/wiki/Templates/">Templates</a>: details on the information included in different templates; all templates can be downloaded from the "Files" section
- <a href="https://osf.io/ru8y6/wiki/Dataset/">Dataset</a>: identifying agencies, anonymity
## Software
* Housing Randomizer: https://github.com/druedin/housing_randomizer --- custom-built software to create the profiles and queries (LiveCode)
[1]: https://osf.io/ru8y6/wiki/Documentation/