Useful Stuff

Data Management


The following .do file appends Gleditsch-Ward numbers to datasets based off of the country name.  The file accommodates many, though not all, alternative spellings, and has been amended over time to include the spellings used in most frequently-used and publicly available datasets in IR.  It can also be easily amended as you go to add the 2 or 3 new spellings necessary a new datasource.

There are two versions of the file -- one for standard capitalization and one for all-caps country names.  


These .do files were first created by Håvard Strand and others at the Center for the Study of Civil War at PRIO, and I have merely expanded them.  




This .do file provides a template for reshaping data downloaded from the World Development Indicators.  

Download the entire WDI dataset, all countries, all variables, all years, save it as a .csv (the excel file is too large to load into stata). Then use the .do file below to merge prep the data.

Much thanks to Jacob Tucker for help tightening up the code in this file.

WDI Data Prep .do File