Project files for an article titled: "The Search for Human Rights: A Global Analysis Using Google Data", conditionally accepted at American Political Science Review. The files in this reproduction archive exist here: https://github.com/CJFariss/Human-Rights-Search; and a static version exists at the APSR dataverse archive here: https://dataverse.harvard.edu/dataverse/the_review. The dataverse citation is as follows:
Dancy, Geoff; Fariss, Christopher J., 2022, "Replication Data for: The Global Resonance of Human Rights: What Google Trends Can Tell Us", https://doi.org/10.7910/DVN/AV0CMJ, Harvard Dataverse
Preprints of the article and appendix files are available at the Open Science Foundation here https://osf.io/78c5z/.
Where is the human rights discourse most resonant? We use aggregated cross-national Google search data to test two divergent accounts of why human rights appeal to some populations but not others. The top-down model predicts that nationwide interest in human rights is attributable mainly to external factors like foreign direct investment, transnational NGO campaigns, or international legalization, where the bottom-up model highlights the importance of internal factors like economic growth and persistent repression. We find more evidence for the latter model: not only is interest in human rights more concentrated in the Global South, the discourse is most resonant where people face regular violence at the hands of their home government. In drawing these inferences, this article confronts high-level debates over whether human rights will remain relevant in the future, and whether the discourse still animates counter-hegemonic modes of resistance. These answer to both questions, our research suggests, is “yes.”
We have created this complete Github repository with all the R code and datasets necessary to replicate or reproduce all reported data analyses presented in the main manuscript and the supplementary appendix. Every single step in our data processing and analysis sequence is available in this repository, such that all procedures and results are fully accessible to any interested reader.
Note about the supplementary appendix: There are two versions of the supplmentary appendix. Both versions are identical with respect to the information contained in the first 25 pages of each document. The 25 page version does not included all tables. An extended, archive-only appendix located at the Github repository (https://github.com/CJFariss/Human-Rights-Search) and Dataverse repository (https://doi.org/10.7910/DVN/AV0CMJ) contains all tables that correspond to coefficient plots in the 25 page supplementary appendix.
- Supplementary_Appendices: contains both versions of the Supplementary Appendix document.
The primary data source we use in this project is search term rates from trends.google.com. We access the data available at this site through the API using the R package gtrendsR and its gtrends() function.
Many of the folders below contain search term datasets or R files (.RDS files) necessary to create these datasets. When pulling datasets from the google trends APIs, specifically from trends.google.com (the primary data source), we have saved the resulting datasets and the code that pulls the data. This will allow interested readers to reproduce the reported analyses with the same data we used, but readers can also reproduce the search term datasets themselves.
Note that lowsearch is in reference to the low_search_volume argument in the gtrends() function.
- Data_Input: contains datasets obtained from sources outside of our project code
- Data_Ouput: contains datasets produced or updated by our project code
- Data_output_global_search_lists: RDS files that contain list objects with google trends search results for all countries within a five-year range for a specific search term (lowsearch is off or set to FALSE)
- Data_output_global_search_lists_lowsearch: RDS files that contain list objects with google trends search results for all countries within a five-year range for a specific search term (lowsearch is on or set to TRUE)
- Data_output_location_search_lists: RDS files that contain list objects with google trends search results for country-weeks within a five-year range for a specific search term (lowsearch is off or set to FALSE)
- Data_output_location_search_lists_lowsearch: RDS files that contain list objects with google trends search results for country-weeks within a five-year range for a specific search term (lowsearch is on or set to TRUE)
- Data_output_search_cy_datasets: csv dataset files for each search term, time period combination (search terms are 'human rights' in several languages)
- Data_output_search_cy_datasets_lowsearch: csv dataset files for each search term, time period combination (search terms are 'human rights' in several languages)
- Data_output_search_cy_datasets_lowsearch_AI: csv dataset files for each search term, time period combination (search terms are 'Amnesty International' in several languages)
- Data_output_search_cy_topic_datasets: csv dataset files for each search term, time period combination (search terms are 'human rights' using the internal google trends topic model)
- Rcode_ACLED_analysis: Rcode to pull ACLED data for weekly level analysis
- Rcode_Amnesty_article_coverage: Rcode and files to scrape Amnesty report files from the amnesty.org website
- Rcode_Descriptive_Stats: Rcode that generates descriptive statistics
- Rcode_Global_Survey_analysis: Rcode for analyzing several surveys (World Values Survey, Latin American Public Opinion Project, Afrobarometer, and Open Global Rights)
- Rcode_gtrends_related_topics: Rcode to create co-occuring topics data and Rplots
- Rcode_HR_treaty: Rcode to update country-year UN human rights treaty dataset
- Rcode_Human_Rights_google_ngrams: Rcode for analyzing google ngrams data
- Rcode_Human_Rights_google_search_country: country-year analysis files
- Rcode_Human_Rights_google_search_global: global analysis files
- Rcode_Human_Rights_google_search_Maps: Rcode for generating global maps of relative search rates across countries
- Rcode_min_max_examples: Rcode examples using the min-max transformation
- Rcode_Search_engine_use_analysis: Rcode for analyzing variation in search engine use across regions and countries
- Rcode_WDI: Rcode for pulling World Development Indicators directly from the WDI API
- Rplot_Related_Topics: Rplot graphs of related topics and within-country regions for all country-language search terms
- Rplot_search_rate_examples: Rplot graphs with relative search rate examples
- Rplots: Rplot graphs (all the other Rplots)
- Rplots_coefplots: Rplot graphs coefficient plots from regression models
- Rplots_country_search_ranks: Rplot graphs of within-country weekly time series data, ranked by overall country search rates (all langugage groups and topics)
- Rplots_survey_data: Rplot graphs from the analyses of the global survey datasets
- Supplementary_Appendices: contains both versions of the Supplementary Appendix document.
- Tex tables: contains all latex tablular output.
There are many folders that contain many files. In an effort to make the production of each result presented in our article as transparent as possible, we describe the resources necessary (contained in the project folders described above) to reproduce each figure or table in the main article and by section in the supplementary appendix.
groundhog_library_func.R is a function that loads all the necessary R libraries. There are three options in the function: (1) load libraries using the version from when the scripts were originally run, (2) load libraries using their most recent versions, or (3) install the current version of all the libraries. This function will hopefully ensure that all the results reported in the article and supplementary appendix can always be reproduced using the original function versions, even if any updated functions produce dissimilar results in the future.
Article Figure 2: Global weekly search rates from Google Trends for five language groups (2015- 2019)
Article Figure 3: Map of Google search rates for “human rights” in the English language (also for other language groups, Github only)
Article Figure 4: Rate of Google searches for “human rights” in the English language for country-weeks from 2015-2019
Article Figure 5: Map of Google search rates for “derechos humanos” in the Spanish language (also for other language groups, Github only)
Article Figure 6: Rate of google searches for “derechos humanos” in the Spanish language for country-weeks from 2015-2019
Article Figure 10: Related co-occurring search queries and search topics for Guatemala (top row) and relative search rates by city and region (bottom row)
- Rcode_gtrends_related_topics/
- Rplot_Related_Topics/
- related_topics_gsearch_location_data_lists_human_rights_2015-01-01_2019-12-31_saved_2022-05-12.pdf
- related_topics_gsearch_location_data_lists_derechos_humanos_2015-01-01_2019-12-31_saved_2022-05-12.pdf
- related_topics_gsearch_location_data_lists_direitos_humanos_2015-01-01_2019-12-31_saved_2022-05-12.pdf
- Rcode_Human_Rights_google_search_global/
- Rcode_Human_Rights_google_search_country/
- google_search_data_country_Rplot_function.R -Rplots_country_search_ranks/
- human_rights_country_week_time_series_lowsearch_2015-01-01_2019-12-31.pdf
- derechos_humanos_country_week_time_series_lowsearch_2015-01-01_2019-12-31.pdf
- direitos_humanos_country_week_time_series_lowsearch_2015-01-01_2019-12-31.pdf
- droit_country_week_time_series_lowsearch_2015-01-01_2019-12-31.pdf
- huquq_alansan_country_week_time_series_lowsearch_2015-01-01_2019-12-31.pdf