Skip to content

Commit

Permalink
Merge pull request #312 from worldbank/prepare-v7.0
Browse files Browse the repository at this point in the history
Merging v7.0 to main
  • Loading branch information
kbjarkefur authored Jan 19, 2023
2 parents a12ecb4 + ee3188f commit 340cb03
Show file tree
Hide file tree
Showing 162 changed files with 14,115 additions and 3,833 deletions.
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ _config.yml
!/**/*.do
!/**/*.ado
!/**/*.sthlp
!/**/output/iesave/reports/*.csv
!/**/*.stpr

# R
!/**/*.R

# LaTeX
# Outputs
!/**/*.tex
!/**/*.csv

# Python
!/**/*.py
Expand All @@ -62,5 +65,8 @@ _config.yml
#the folder test/ is used for peoples individual testing, this is different from test_scripts/
test/

#Outputs in the run/outputs folder
run/output
###########
# Outputs in the run/outputs folder
!/**/output/**/*.csv


55 changes: 46 additions & 9 deletions admin/description-SSC.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,65 @@ If you are not updating this meta information when updating the files in the `sc
***

### Title
'IETOOLKIT': module providing commands specially developed for Impact Evaluations
'IETOOLKIT': module providing commands for reproducible research

### Description

ietoolkit provides a set of commands that address different aspects of data management and data analysis in relation to Impact Evaluations. The list of commands will be extended continuously, and suggestions on new commands are highly appreciated. The commands were developed to standardize and simplify best practices across the World Bank's unit for Impact Evaluations (DIME). They are developed to be applicable to different contexts, but some might not apply to practices adopted at other institutions. For these commands, the corresponding help files provide justifications for the standardized practices applied. See https://github.com/worldbank/ietoolkit and https://dimewiki.worldbank.org/wiki/Stata_Coding_Practices for more details.

ietoolkit provides a set of commands that
automates common tasks in reproducible research.
This package is developed at the World Bank's
department for impact evaluations (DIME)
and some features are therefore specific to impact evaluation,
but the vast majority of the features are general to any reproducible research.
The practices in these commands are based on experiences in
the 200+ projects within DIME.
Some commands, like iebaltab and ieddtab, simplifies and standardizes analysis
making it less error prone.
Other commands, like ieboilstart and iesave, applies best practices
gathered from across all of DIME's portfolio.
See https://github.com/worldbank/ietoolkit and
https://dimewiki.worldbank.org/wiki/Stata_Coding_Practices for more details.

### Keywords
* impact evaluations
* reproducible research
* data management
* survey data
* data analysis
* balance tables
* difference-in-differences
* matching
* impact evaluations

### Required Stata Version
Stata 11
Stata 12

### AUTHOR:
"DIME Analytics, DIME, The World Bank Group", dimeanalytics@worldbank.org

### Author and Email
* Author: DIME Analytics, The World Bank, DECIE
* Support: email dimeanalytics@worldbank.org
### FILES REQUIRED TO BE IN PACKAGE:
- iebaltab.ado
- ieboilstart.ado
- ieddtab.ado
- iedorep.ado
- iedropone.ado
- iefolder.ado
- iegitaddmd.ado
- iegraph.ado
- iekdensity.ado
- iematch.ado
- iesave.ado
- ietoolkit.ado
- iebaltab.sthlp
- ieboilstart.sthlp
- ieddtab.sthlp
- iedorep.sthlp
- iedropone.sthlp
- iefolder.sthlp
- iegitaddmd.sthlp
- iegraph.sthlp
- iekdensity.sthlp
- iematch.sthlp
- iesave.sthlp
- ietoolkit.sthlp


***
Expand Down
Binary file added ietoolkit.stpr
Binary file not shown.
47 changes: 47 additions & 0 deletions run/ie_recurse_mkdir.do
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
* This create folders recursively. If path "c:/folder1/folder2/folder3" is
* passed then the command creates folder1 if it does not exists, and then
* folder2 if it does not exists and then folder3 if it does not exist

cap program drop ie_recurse_mkdir
program define ie_recurse_mkdir

qui {
syntax, folder(string) [dryrun]

/*
folder - full path to folder which should be created
dryrun - just list and do not create the folder that would have been created without this option
*/

*Standardiize to forward slashes
local folder = subinstr(`"`folder'"',"\","/",.)

*Test if this folder exists
mata : st_numscalar("r(dirExist)", direxists(`"`folder'"'))

*Folder does not exist, find parent folder and make recursive call
if (`r(dirExist)' == 0) {

*Get the parent folder of folder
local lastSlash = strpos(strreverse(`"`folder'"'),"/")
local parentFolder = substr(`"`folder'"',1,strlen("`folder'")-`lastSlash')
local thisFolder = substr(`"`folder'"', (-1 * `lastSlash')+1 ,.)

*Recursively make sure that the partent folders and its parent folders exists
noi ie_recurse_mkdir , folder(`"`parentFolder'"') `dryrun'

*Create this folder as the parent folder is ceratain to exist now
if missing("`dryrun'") {
noi mkdir "`folder'"
noi di as result "{pstd}Folder created: [`folder']{p_end}"
}
else {
noi di as result "{pstd}DRY RUN! Without option {bf:dryrun} folder [`folder'] would have been created.{p_end}"
}
}
else {
if missing("`dryrun'") noi di as result "{pstd}Folder existed: [`folder']{p_end}"
else noi di as result "{pstd}DRY RUN! Folder [`folder'] already existed.{p_end}"
}
}
end
Loading

0 comments on commit 340cb03

Please sign in to comment.