Skip to content

Commit 340cb03

Browse files
authored
Merge pull request #312 from worldbank/prepare-v7.0
Merging v7.0 to main
2 parents a12ecb4 + ee3188f commit 340cb03

File tree

162 files changed

+14115
-3833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+14115
-3833
lines changed

.gitignore

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ _config.yml
4343
!/**/*.do
4444
!/**/*.ado
4545
!/**/*.sthlp
46+
!/**/output/iesave/reports/*.csv
47+
!/**/*.stpr
4648

4749
# R
4850
!/**/*.R
4951

50-
# LaTeX
52+
# Outputs
5153
!/**/*.tex
54+
!/**/*.csv
5255

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

65-
#Outputs in the run/outputs folder
66-
run/output
68+
###########
69+
# Outputs in the run/outputs folder
70+
!/**/output/**/*.csv
71+
72+

admin/description-SSC.md

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,65 @@ If you are not updating this meta information when updating the files in the `sc
1010
***
1111

1212
### Title
13-
'IETOOLKIT': module providing commands specially developed for Impact Evaluations
13+
'IETOOLKIT': module providing commands for reproducible research
1414

1515
### Description
1616

17-
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.
18-
17+
ietoolkit provides a set of commands that
18+
automates common tasks in reproducible research.
19+
This package is developed at the World Bank's
20+
department for impact evaluations (DIME)
21+
and some features are therefore specific to impact evaluation,
22+
but the vast majority of the features are general to any reproducible research.
23+
The practices in these commands are based on experiences in
24+
the 200+ projects within DIME.
25+
Some commands, like iebaltab and ieddtab, simplifies and standardizes analysis
26+
making it less error prone.
27+
Other commands, like ieboilstart and iesave, applies best practices
28+
gathered from across all of DIME's portfolio.
29+
See https://github.com/worldbank/ietoolkit and
30+
https://dimewiki.worldbank.org/wiki/Stata_Coding_Practices for more details.
1931

2032
### Keywords
21-
* impact evaluations
33+
* reproducible research
2234
* data management
23-
* survey data
2435
* data analysis
2536
* balance tables
2637
* difference-in-differences
2738
* matching
39+
* impact evaluations
2840

2941
### Required Stata Version
30-
Stata 11
42+
Stata 12
43+
44+
### AUTHOR:
45+
"DIME Analytics, DIME, The World Bank Group", dimeanalytics@worldbank.org
3146

32-
### Author and Email
33-
* Author: DIME Analytics, The World Bank, DECIE
34-
* Support: email dimeanalytics@worldbank.org
47+
### FILES REQUIRED TO BE IN PACKAGE:
48+
- iebaltab.ado
49+
- ieboilstart.ado
50+
- ieddtab.ado
51+
- iedorep.ado
52+
- iedropone.ado
53+
- iefolder.ado
54+
- iegitaddmd.ado
55+
- iegraph.ado
56+
- iekdensity.ado
57+
- iematch.ado
58+
- iesave.ado
59+
- ietoolkit.ado
60+
- iebaltab.sthlp
61+
- ieboilstart.sthlp
62+
- ieddtab.sthlp
63+
- iedorep.sthlp
64+
- iedropone.sthlp
65+
- iefolder.sthlp
66+
- iegitaddmd.sthlp
67+
- iegraph.sthlp
68+
- iekdensity.sthlp
69+
- iematch.sthlp
70+
- iesave.sthlp
71+
- ietoolkit.sthlp
3572

3673

3774
***

ietoolkit.stpr

528 Bytes
Binary file not shown.

run/ie_recurse_mkdir.do

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
* This create folders recursively. If path "c:/folder1/folder2/folder3" is
2+
* passed then the command creates folder1 if it does not exists, and then
3+
* folder2 if it does not exists and then folder3 if it does not exist
4+
5+
cap program drop ie_recurse_mkdir
6+
program define ie_recurse_mkdir
7+
8+
qui {
9+
syntax, folder(string) [dryrun]
10+
11+
/*
12+
folder - full path to folder which should be created
13+
dryrun - just list and do not create the folder that would have been created without this option
14+
*/
15+
16+
*Standardiize to forward slashes
17+
local folder = subinstr(`"`folder'"',"\","/",.)
18+
19+
*Test if this folder exists
20+
mata : st_numscalar("r(dirExist)", direxists(`"`folder'"'))
21+
22+
*Folder does not exist, find parent folder and make recursive call
23+
if (`r(dirExist)' == 0) {
24+
25+
*Get the parent folder of folder
26+
local lastSlash = strpos(strreverse(`"`folder'"'),"/")
27+
local parentFolder = substr(`"`folder'"',1,strlen("`folder'")-`lastSlash')
28+
local thisFolder = substr(`"`folder'"', (-1 * `lastSlash')+1 ,.)
29+
30+
*Recursively make sure that the partent folders and its parent folders exists
31+
noi ie_recurse_mkdir , folder(`"`parentFolder'"') `dryrun'
32+
33+
*Create this folder as the parent folder is ceratain to exist now
34+
if missing("`dryrun'") {
35+
noi mkdir "`folder'"
36+
noi di as result "{pstd}Folder created: [`folder']{p_end}"
37+
}
38+
else {
39+
noi di as result "{pstd}DRY RUN! Without option {bf:dryrun} folder [`folder'] would have been created.{p_end}"
40+
}
41+
}
42+
else {
43+
if missing("`dryrun'") noi di as result "{pstd}Folder existed: [`folder']{p_end}"
44+
else noi di as result "{pstd}DRY RUN! Folder [`folder'] already existed.{p_end}"
45+
}
46+
}
47+
end

0 commit comments

Comments
 (0)