Overall, I have been very impressed with the level of support of the foreign aid community globally for open data. The International Aid Transparency Initiative in particular has championed this cause and now functions as a centralized clearinghouse for such data in the IATI standard.
As a sociologist who sometimes analyzes aid data for my research or to help in my teaching, I have been frustrated on occasion by the inaccessibility of some IATI data, especially if I had hoped to do any sort of analysis in Stata (my statistical program of choice). A few years ago I spent too much time banging my head against the wall trying to convert Canada’s IATI data file from its original XML format via CSV into a workable Stata file. More recently, with the implementation of the IATI Datastore API and its handy CSV query builder, accessing this data has never been easier.
To save myself from manually importing every CSV file downloaded from the IATI datasore into Stata for analysis individually, I set about writing a basic program for Stata which calls upon the IATI Datastore API, converts, cleans, and saves donor activity files in Stata format, ready to be analyzed.
It is my first effort at programming a Stata command, so I expect it will undergo frequent revision over the next while. At present it is limited to importing the activity files of donors who publish to IATI and specifying the starting month of a fiscal year to account for different national practices. I have tested the program with many of the major bilateral and multilateral donor agencies publishing to IATI (see the help file for the iati command), but it should in theory work with any IATI publisher.
If you decide to try out the program, please let me know if you encounter any bugs or have suggestions for improvement. I hope a future version of the script will be able to include options for all of the functionalities of the IATI API, including downloading transaction and organization data files rather than only activities. Furthermore, some additional cleaning of the imported data may be required with some donors’ files, as there seems to be significant variability between publishers.
Update: I have received a question about the fiscal year option in this module. The iati command imports the original start and end dates of the aid activity, but also creates a starting and ending fiscal year variable for each activity. By specifying a different start month for the fiscal year in various countries, you are able to control which fiscal year a given set of activities is assigned to for start and end dates.
Download/Install
Version 1.0 of this program is available here. Files should be installed directly into your Stata ado folder.
iati is also available on the SSC Stata Program respository and can be installed within the Stata program by typing:
ssc install iati
Syntax
Use of the command is simple. The syntax is as follows:
iati donorcode, fy(month)
For example, if I want to import all the existing IATI activity data for Global Affairs Canada with a fiscal year starting in April, the syntax is:
iati CA-3, fy(4)
For USAID, with a FY starting in October:
iati US-1, fy(10)
For the World Bank:
iati 44000