
* -----------------------------------------------------------------------------*
*
*     	HIGH FREQUENCY SURVEY  
*     	SOUTH SUDAN (HFSSS) Market Linkages Survey 2017 (MLS)
*         
*------------------------------------------------------------------------------*

For users interested in directly accessing the final cleaned data, simply download and unzip the the "1-CleanOutput.zip" file and use dataset MLS_clean.dta


For users interested in carrying out the analysis exactly as it was done by HFSSS Team, simply follow the instructions below:


A) SETTING UP THE FOLDER STRUCTURE IN YOUR COMPUTER

   1 - Download the "setup.do" file from the Microdata Library and open it. Define a directory in your computer and include the folder location in line 7 
       of the do file (Example of line 7: local swdLocal = "C:\Users\JohnStata\Desktop\HFSSS").This location will contain the files from the Microdata 
       Library in a specific folder structure (see next steps), and where the output datasets and figures for the analysis will be placed.

   2 - Next, run the "setup.do" file. This process will automatically create the folder structure required 
       for the analysis in your computer. In the selected location, you will now have 4 folders 
       (Data, Do, Output & Temp). The "Data" folder will contain a two subfolders with the following structure:

	.../Data/1-CleanInput"
	.../Data/1-CleanOutput"

B) DOWNLOADING THE FILES TO THE CORRECT FOLDERS 

   3 - From the Microdata library, download the "Do.zip" file, unzip it and place its content (5 do files) in the "Do" folder created by "setup.do".

   4 - From the Microdata library, download the "1-CleanInput.zip" files, unzip it and place its contents in the "1-CleanInput" subfolder in the "Data"
       folder created by the "setup.do" file. In the 1-CleanInput folder, you should have one dataset called MLS.dta. 


C) USING THE DO FILES TO RUN THE CLEANING AND ANAYLSIS 

   5 - In order to recreate the figures from the "Reducing Poverty Through Improved Agro-logistics in a Fragile Country" note, first place the excel sheet named 
       "MLS_Graphs.xlsx" in the "Output" folder. 

   6 - To run the sequence of do files that carry out the cleaning and analysis, first run "setup.do" in order to define the paths required in the analysis. 

   7 - Then run the "run.do" file, this do-file will call all of the do-files in the "Do" folder in the appropriate sequence to carry out the cleaning and 
       analysis.


NOTE: The results from the "Poverty, Livelihoods, and Perceptions in a High Inflation Environment" note and those contained in "Figures.xlsx" 
      were obtained with the data and code provided (as described) using Stata Version 14.2. Using any other version of Stata might result in slight 
      differences from the figures contained in these files.



