Skip to content

Commit 8034752

Browse files
Merge pull request #93 from worldbank/dev
version 010.10
2 parents c05381b + eb91cd0 commit 8034752

18 files changed

+1263
-357
lines changed

make.do

+5-2
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@ local ms = "`r(files)'"
3636
getfiles "*.dlg"
3737
local ds = "`r(files)'"
3838

39+
getfiles "*.dta"
40+
local dtas = "`r(files)'"
3941

40-
local toins "`as';`hs';`ms';`ds'"
42+
43+
local toins "`as';`hs';`ms';`ds';`dtas'"
4144
disp "`toins'"
4245

4346

4447
make pip, replace toc pkg /// readme
45-
version(0.10.9) ///
48+
version(0.10.10) ///
4649
license("MIT") ///
4750
author("R.Andres Castaneda") ///
4851
affiliation("The World Bank") ///

pip.ado

+116-108
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ program define pip, rclass
2525

2626
//------------ Parsing args
2727
pip_parseopts `0' // parse whatever the user gives
28-
local returnnames "`r(returnnames)'" // name of all return object
28+
local returnnames "`r(returnnames)'" // name of all returned object
2929
local optnames "`r(optnames)'" // names of options (after the comma)
3030
mata: pip_retlist2locals("`returnnames'") // convert return to locals
3131

@@ -117,7 +117,6 @@ program define pip, rclass
117117
exit
118118
}
119119

120-
121120
//------------Install and Uninstall
122121
if regexm("`subcmd'", "^install") {
123122
if ( ("`gh'" == "" & "`ssc'" == "") | /*
@@ -146,7 +145,7 @@ program define pip, rclass
146145
pip_timer pip, off
147146
exit
148147
}
149-
148+
150149
//========================================================
151150
// Print information
152151
//========================================================
@@ -298,6 +297,12 @@ program define pip, rclass
298297
pip_cp, `est_opts' `clear' `n2disp' `cachedir'
299298
noi pip_timer pip, off `printtimer'
300299
}
300+
//------------ Grouped data
301+
else if ("`subcmd'" == "gd") {
302+
noi pip_gd, `est_opts' `clear' `n2disp' `cachedir'
303+
return add
304+
noi pip_timer pip, off `printtimer'
305+
}
301306

302307
//========================================================
303308
// closing actions
@@ -358,110 +363,113 @@ Version Control:
358363

359364

360365

361-
*! version 0.10.9 <2024aug28>
362-
*! -- Allow upper case in server option
363-
*! -- add pause message in formating
364-
*! -- Add estiamte_type as string variable and leave it optional for now
365-
*! -- Update help file.
366-
367-
*! version 0.10.8 <2024jan11>
368-
*! -- fix bug in pip-grp. Now group_by=wb is called explicitly.
369-
*! -- fix bug with version in pip_cl.
370-
*! -- force proper formatting.
371-
*! -- improve message for setting up cache dir
372-
*! -- fix problem in scmd tables not working with server()
373-
*! -- Add server to cache info
374-
*! version 0.10.7 <2023Aug17>
375-
*! --fix problem with setting globals and not being able to use the general options.
376-
*! --fix messages when year is out of boundries
377-
*! --fix issue with last and mrv in year()
378-
*! -- change ppp and ppp_year for ppp_version()
379-
*! -- fix getting pip_version stick
380-
*! -- move pip_check_args to specific functions per subcmd
381-
*! -- fix issue with ppp_year()
382-
*! version 0.10.6 <2023Jun23>
383-
*! -- Fix big bug about ppp year and wrong url query.
384-
*! version 0.10.5 <2023Jun06>
385-
*! -- Incorporate pip_cp by Tefera
386-
*! -- update helpfile with new subcommand test
387-
*! -- add pip_test
388-
*! -- make local cachedir prevail over global pip_cachedir
389-
*! -- add cachedir in each pip_get call
390-
*! -- update format
391-
*! -- add help for pip wb (which points to pip_cl) and for pip setup (init)
392-
*! -- add cache info to help file
393-
*! -- info of cache memory
394-
*! -- update print and tables help file
395-
*! -- complete pip_tables help file
396-
*! -- fix issue with `pip cache, iscache` working now
397-
*! -- Allow user to see Cache inventory `pip cache, inventory`
398-
*! -- update to version 16.1
399-
*! -- update abbreviation of general and pip_cl help files
400-
*! -- replacre optnames for returnnames and add optnames only for options
401-
*! -- add abbreviation program`
402-
*! -- fix formatting
403-
*! -- add fillgaps to check in pov_check_args
404-
*! -- provide table of countries when wrong country is selected
405-
*! -- delete lukup auxiliary frame. We don't need it anymore
406-
*! -- refactor pip_info to pip_utils click
407-
*! -- get length of string for formatting in pip_utils_cliackable
408-
*! -- comment message of repeated timer
409-
*! -- fix issue of building the mata lib all the time
410-
*! -- delete pip_clean as we don't need it anymore
411-
*! version 0.10.4 <2023May31>
412-
*! -- Modular Helpfile (Incomplete)
413-
*! -- Improve cache manipulation, specially with cachedir() option
414-
*! -- Add more print options
415-
*! -- BREAKING CHANGE: `pip versions` is now `pip print, version`
416-
*! -- Fix coverage issue
417-
*! version 0.10.3 <2023May24>
418-
*! -- Add interactive management of cache info
419-
*! -- add pip_get to pip_versions
420-
*! -- Fix bug in pip_table query
421-
*! -- Create clickable table program
422-
*! -- add version() option to install from GitHub
423-
*! version 0.10.2 <2023May23>
424-
*! -- Hot fix on query
425-
*! version 0.10.1 <2023May22>
426-
*1 -- Fix bug
427-
*! -- Add dialog box for cache directory
428-
*! -- Fix issue with pip_find_src
429-
*! -- Fix circularity when building MATA library.
366+
*! version 0.0.1 <2021dec01>
367+
*! version 0.1.0 <2022feb01>
368+
*! version 0.2.0 <2022apr01>
369+
*! version 0.3.0 <2022apr07>
370+
*! version 0.3.1 <2022apr08>
371+
*! version 0.3.2 <2022apr26>
372+
*! version 0.3.3 <2022may25>
373+
*! version 0.3.4 <2022Jun10>
374+
*! version 0.3.5 <2022Jul06>
375+
*! version 0.3.6 <2022Sep08>
376+
*! version 0.3.7 <2022Oct06>
377+
*! version 0.3.8 <2022Oct06>
378+
*! version 0.9.5 <2023Feb14> (Stable version)
379+
*! ^^^^^^^^ DEPRECATED DEVELOPMENT^^^^^^^^^^
430380
*! version 0.10.0 <2023May19>
431-
*! -- Complete refactoring of pip. many breaking changes
432-
*! -- All callings of data are done with pip_get
433-
*! -- local Caching is enabled for all calls
434-
*! -- new timer functionality
435-
*! -- new modular structure for future additions
436-
*! -- efficient execution of code
437-
*! -- add MATA functionality
438-
*! -- add setup of variables for many future uses
439-
*! -- dismiss dependency of {missings} command
440-
*! -- BREAK CHANGE: options names MUST be parsed completely. Partial naming breaks
441-
*! -- Remove old code.
442-
*! -- several improvements to caching and setup.do
443-
*! -- add caching to aux tables
444-
*! -- add pip_setup.do file... this should be created internally
445-
*! -- add mata functions to edit pip_setup.do
446-
*! -- add pip_setup.ado to run mata and pip_setup.do
447-
*! -- First attempt of caching... not fully working
448-
*! -- Fix link of country info in pip_info
449-
*! -- Add general troubleshooting to documentation.
450-
*! -- Change some variable labels for clarity
451381
*! -- Update help file with installation instructions.
452-
*! ---------- DEPRECATED DEVELOPMENT
453-
*! version 0.9.5 <2023Feb14> (Stable version)
454-
*! version 0.3.8 <2022Oct06>
455-
*! version 0.3.7 <2022Oct06>
456-
*! version 0.3.6 <2022Sep08>
457-
*! version 0.3.5 <2022Jul06>
458-
*! version 0.3.4 <2022Jun10>
459-
*! version 0.3.3 <2022may25>
460-
*! version 0.3.2 <2022apr26>
461-
*! version 0.3.1 <2022apr08>
462-
*! version 0.3.0 <2022apr07>
463-
*! version 0.2.0 <2022apr01>
464-
*! version 0.1.0 <2022feb01>
465-
*! version 0.0.1 <2021dec01>
466-
467-
382+
*! -- Change some variable labels for clarity
383+
*! -- Add general troubleshooting to documentation.
384+
*! -- Fix link of country info in pip_info
385+
*! -- First attempt of caching... not fully working
386+
*! -- add pip_setup.ado to run mata and pip_setup.do
387+
*! -- add mata functions to edit pip_setup.do
388+
*! -- add pip_setup.do file... this should be created internally
389+
*! -- add caching to aux tables
390+
*! -- several improvements to caching and setup.do
391+
*! -- Remove old code.
392+
*! -- BREAK CHANGE: options names MUST be parsed completely. Partial naming breaks
393+
*! -- dismiss dependency of {missings} command
394+
*! -- add setup of variables for many future uses
395+
*! -- add MATA functionality
396+
*! -- efficient execution of code
397+
*! -- new modular structure for future additions
398+
*! -- new timer functionality
399+
*! -- local Caching is enabled for all calls
400+
*! -- All callings of data are done with pip_get
401+
*! -- Complete refactoring of pip. many breaking changes
402+
*! version 0.10.1 <2023May22>
403+
*! -- Fix circularity when building MATA library.
404+
*! -- Fix issue with pip_find_src
405+
*! -- Add dialog box for cache directory
406+
*1 -- Fix bug
407+
*! version 0.10.2 <2023May23>
408+
*! -- Hot fix on query
409+
*! version 0.10.3 <2023May24>
410+
*! -- add version() option to install from GitHub
411+
*! -- Create clickable table program
412+
*! -- Fix bug in pip_table query
413+
*! -- add pip_get to pip_versions
414+
*! -- Add interactive management of cache info
415+
*! version 0.10.4 <2023May31>
416+
*! -- Fix coverage issue
417+
*! -- BREAKING CHANGE: `pip versions` is now `pip print, version`
418+
*! -- Add more print options
419+
*! -- Improve cache manipulation, specially with cachedir() option
420+
*! -- Modular Helpfile (Incomplete)
421+
*! version 0.10.5 <2023Jun06>
422+
*! -- delete pip_clean as we don't need it anymore
423+
*! -- fix issue of building the mata lib all the time
424+
*! -- comment message of repeated timer
425+
*! -- get length of string for formatting in pip_utils_cliackable
426+
*! -- refactor pip_info to pip_utils click
427+
*! -- delete lukup auxiliary frame. We don't need it anymore
428+
*! -- provide table of countries when wrong country is selected
429+
*! -- add fillgaps to check in pov_check_args
430+
*! -- replacre optnames for returnnames and add optnames only for options
431+
*! -- update abbreviation of general and pip_cl help files
432+
*! -- update to version 16.1
433+
*! -- Allow user to see Cache inventory `pip cache, inventory`
434+
*! -- fix issue with `pip cache, iscache` working now
435+
*! -- complete pip_tables help file
436+
*! -- update print and tables help file
437+
*! -- info of cache memory
438+
*! -- add cache info to help file
439+
*! -- add help for pip wb (which points to pip_cl) and for pip setup (init)
440+
*! -- update format
441+
*! -- add cachedir in each pip_get call
442+
*! -- make local cachedir prevail over global pip_cachedir
443+
*! -- add pip_test
444+
*! -- update helpfile with new subcommand test
445+
*! -- Incorporate pip_cp by Tefera
446+
*! version 0.10.6 <2023Jun23>
447+
*! -- Fix big bug about ppp year and wrong url query.
448+
*! version 0.10.7 <2023Aug17>
449+
*! -- fix issue with ppp_year()
450+
*! -- move pip_check_args to specific functions per subcmd
451+
*! -- fix getting pip_version stick
452+
*! -- change ppp and ppp_year for ppp_version()
453+
*! --fix issue with last and mrv in year()
454+
*! --fix messages when year is out of boundries
455+
*! --fix problem with setting globals and not being able to use the general options.
456+
*! version 0.10.8 <2024jan11>
457+
*! -- Add server to cache info
458+
*! -- fix problem in scmd tables not working with server()
459+
*! -- improve message for setting up cache dir
460+
*! -- force proper formatting.
461+
*! -- fix bug with version in pip_cl.
462+
*! -- fix bug in pip-grp. Now group_by=wb is called explicitly.
463+
*! version 0.10.9 <2024aug28>
464+
*! -- Update help file.
465+
*! -- Add estiamte_type as string variable and leave it optional for now
466+
*! -- add pause message in formating
467+
*! -- Allow upper case in server option
468+
*! version 0.10.10 <2024sep27>
469+
*! -- implement fillgaps and nowcasts options at both country and regional levels
470+
*! -- Add Datt data
471+
*! -- Add add gd subcommand
472+
*! -- save results of pip_gd in separate frames
473+
*! -- add pip_utils_frame2locals
474+
*! -- add examples
475+
*! -- Update help file

pip.pkg

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
v 0.10.9
1+
v 0.10.10
22
d 'PIP': Poverty and Inequality Platform Stata wrapper
33
d
44
d World Bank PIP API Stata wrapper
55
d
6-
d Distribution-Date: 20240828
6+
d Distribution-Date: 20240927
77
d License: MIT
88
d
99
F pip.ado
@@ -18,10 +18,13 @@ F pip_cleanup.ado
1818
F pip_countries.sthlp
1919
F pip_cp.ado
2020
F pip_cp.sthlp
21+
F pip_datt.dta
2122
F pip_drop.ado
2223
F pip_examples.ado
2324
F pip_find_src.ado
2425
F pip_fun.mata
26+
F pip_gd.ado
27+
F pip_gd.sthlp
2528
F pip_get.ado
2629
F pip_gh.ado
2730
F pip_help_temp.sthlp

pip.sthlp

+18-10
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
{p 4 4 2}Main subcommands{p_end}
3636
{synopt :{helpb pip_cl:cl}}Country-level poverty and inequality estimates. {help pip_cl##options:options}{p_end}
3737
{synopt :{helpb pip_cl:wb}}World Bank's regional and global aggregation. {help pip_cl##options:options}{p_end}
38-
{synopt :{helpb pip_cp:cp}}Country Profile estimates. {help pip_cl##options:options}{p_end}
38+
{synopt :{helpb pip_cp:cp}}Country Profile estimates. {help pip_cp##options:options}{p_end}
39+
{synopt :{helpb pip_gd:gd}}Grouped Data estimates. {help pip_gd##options:options}{p_end}
3940
{synopt :{helpb pip_tables:tables}}Clickable list of auxiliary tables. {help pip_tables##options:options}{p_end}
4041
{synopt :{helpb pip_cache:cache}}Manage local cache. {help pip_cache##options:options}{p_end}
4142
{synopt :{helpb pip_print:print}}Print useful information. {help pip_print##options:options}{p_end}
@@ -88,7 +89,7 @@ The rest of this document contains general information about PIP and the {cmd:pi
8889

8990
{pstd}
9091
The options below work for any subcommad that returns vintaged data
91-
(e.g., {cmd:cl}, {cmd:wb}, {cmd:tables})
92+
(e.g., {cmd:cl}, {cmd:wb}, {cmd:cp}, {cmd:gd}, {cmd:tables})
9293

9394
{marker general_options}{...}
9495
{synoptset 27 tabbed}{...}
@@ -118,8 +119,9 @@ these three parameters uniquely identifies a dataset.{p_end}
118119
{title:Examples}
119120

120121
{pstd}
121-
The examples below do not comprehend all {cmd:pip}'s features. Please refer
122-
to the {it:examples} section of {help pip##sbc_table:each subcommad}'s help file.
122+
The examples below should not be considered as a comprehensive documentation of
123+
{cmd:pip}'s features. Please refer
124+
to the {it:examples} section of {help pip##sbc_table:each subcommand}'s help file.
123125

124126
{ul:Basic examples}
125127

@@ -192,13 +194,13 @@ marked by an {it:*}, meaning they have not been saved. If you do not wish to sav
192194
{ul:Cache memory}
193195

194196
{pstd}
195-
By default, {cmd:pip} will create cache data of all the queries you make. The first you
196-
use {cmd:pip} you will have the option to store cache data in your local machine
197+
By default, {cmd:pip} will create cache data of all the queries you make. The first time you
198+
use {cmd:pip} you will have the option to store cache data on your local machine
197199
or in any drive Stata has access to. By default, {cmd:pip} will check whether it could
198200
save cache data in your PERSONAL directory (see {help sysdir: search path}). In case it can't, it will try in PLUS, then
199201
in your current directory and then in SITE. The first time you execute {cmd:pip}, you are
200202
required to either confirm the default cache directory or provide your own directory
201-
path. Also you can opt out and don't save cache data. Just follow the instructions of
203+
path. Also you can opt out and not save cache data. Just follow the instructions of
202204
the pop-up messages.
203205

204206
{ul:pip_setup.do}
@@ -378,11 +380,17 @@ povcalnet command, which was developed with the help of Espen Prydz, Jorge Soler
378380

379381
{p 40 20 2}(Go up to {it:{help pip##sections:Sections Menu}}){p_end}
380382
{marker authors}{...}
381-
{title:Author}
383+
{title:Authors}
384+
382385
{p 4 4 4}R.Andres Castaneda, The World Bank{p_end}
383386
{p 6 6 4}Email: {browse "mailto: [email protected]": [email protected]}{p_end}
384387
{p 6 6 4}GitHub:{browse "https://github.com/randrescastaneda": randrescastaneda }{p_end}
385388

389+
{p 4 4 4}Damian Clarke, Department of Economics, University of Exeter{p_end}
390+
{p 6 6 4}Email: {browse "mailto: [email protected]": [email protected]}{p_end}
391+
{p 6 6 4}Email: {browse "mailto: [email protected]": [email protected]}{p_end}
392+
{p 6 6 4}GitHub:{browse "https://github.com/damiancclarke": damiancclarke }{p_end}
393+
386394
{title:Contributors}
387395
{pstd}
388396
- Tefera Bekele Degefu{p_end}
@@ -403,9 +411,9 @@ All the files are available in the {browse "https://github.com/worldbank/pip":Gi
403411
{marker howtocite}{...}
404412
{title:Thanks for citing this Stata command as follows}
405413

406-
{p 4 8 2}Castaneda, R.Andres. (2023)
414+
{p 4 8 2}Castaneda, R.Andres and Damian Clarke. (2024)
407415
"pip: Stata Module to Access World Bank’s Global Poverty and Inequality Data"
408-
(version 0.9.0). Stata. Washington, DC: World Bank Group.
416+
(version 0.11.0). Stata. Washington, DC: World Bank Group.
409417
https://worldbank.github.io/pip/ {p_end}
410418

411419
{title:Thanks for citing {cmd:pip} data as follows}

0 commit comments

Comments
 (0)