BOX 6.8 MANAGING OUTPUTS: A CASE STUDY FROM THE DEMAND FOR SAFE SPACES PROJECT It is important to document which data sets are required as inputs in each script and what data sets or output files are created by each script. The Demand for Safe Spaces team documented this information both in the header of each script and in a comment in the master do-file where the script was called. The following is a header of an analysis script called response.do that requires the file
platform_survey_constructed.dta and generates the file response.tex. Having this
information on the header allows people reading the code to check that they have access to all of the necessary files before trying to run a script. 1 /**************************************************************************************** 2 *
Demand for "Safe Spaces": Avoiding Harassment and Stigma
*
3 ***************************************************************************************** 4
OUTLINE:
PART 1: Load data
5
PART 2: Run regressions
6
PART 3: Export table
7
REQUIRES: ${dt_final}/platform_survey_constructed.dta
8
CREATES:
${out_tables}/response.tex
9 ****************************************************************************************/
To provide an overview of the different subscripts involved in a project, this information was copied into the master do-file where the script above is called, and the same was done for all of the script called from that master, as follows: 1 * Appendix tables ======================================================================= 2 3 ***************************************************************************************** 4 *
Table A1: Sample size description
*
5 *---------------------------------------------------------------------------------------* 6 *
REQUIRES: ${dt_final}/pooled_rider_audit_constructed.dta
7 * 8 *
CREATES:
*
${dt_final}/platform_survey_constructed.dta
*
${out_tables}/sample_table.tex
*
9 ***************************************************************************************** 10 11
do "${do_tables}/sample_table.do"
12 13 ***************************************************************************************** 14 *
Table A3: Correlation between platform observations data and rider reports
*
15 *---------------------------------------------------------------------------------------* 16 *
REQUIRES: ${dt_final}/pooled_rider_audit_constructed.dta
*
17 *
CREATES:
*
${out_tables}/mappingridercorr.tex
18 ***************************************************************************************** 19 20
do "${do_tables}/mappingridercorr.do"
21 22 *****************************************************************************************
(Box continues on next page) CHAPTER 6: CONSTRUCTING AND ANALYZING RESEARCH DATA
143