📊 Code and data for Judith G. Kelley. 2017. Scorecard Diplomacy: Grading States to Influence their Reputation and Behavior. Cambridge: Cambridge University Press. (ISBN 978-1316649138)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
analysis
bin
data
misc
output
survey
.Rprofile
.gitignore
LICENSE
README.md
book_appendix_tables.R
book_figures.R
scorecard-diplomacy.Rproj
shared_functions.R

README.md

Scorecard Diplomacy code repository

Judith G. KelleySanford School of Public PolicyDuke University


Judith G. Kelley. 2017. Scorecard Diplomacy: Grading States to Influence their Reputation and Behavior. Cambridge: Cambridge University Press. (ISBN 978-1316649138)


This repository contains all the code and data for Judith Kelley's Scorecard Diplomacy book project.

The commit history for each file is truncated, however. Heavy development on the code occurred in a separate repository between August 2015 and September 2016, but that repository was poorly structured, could not be run cleanly, and contained code for other projects. This repository was created as a simpler, fully reproducible, standalone repository. Those interested in the full development history of each file can visit the jk_misc repository.

The book also uses code and data two other repositories (though these are not needed to generate the figures and tables for the book):

Prerequisites

All the results, figures, and tables in the book can be recreated using R 3.3 (preferably within RStudio, since the code is structured as an RStudio project).

You'll also need to install the following R packages from CRAN:

  • tidyverse: Hadley Wickham's universe of tidy-friendly packages (automatically installs dplyr, tidyr, ggplot2, and friends)
  • ggstance: Adds horizontal geoms for ggplot2
  • ggrepel: Automatically repel overlapping labels in ggplot2 plots
  • gridExtra: Layout multiple ggplot2 plots
  • pander: A convenient interface for Pandoc
  • stargazer: Create pretty regression tables
  • Cairo: Nicer graphics creation library that correctly embeds fonts into PDF plots and correctly generates high resolution PNG plots
  • countrycode: Convert between country names and ISO/COW codes
  • WDI: Access the World Bank's World Development Indicator API
  • maptools: Read spatial objects
  • rgdal: Use spatial objects with gdal
  • testthat: Perform unit tests
  • zoo: Various time series-related functions