Coder Social home page Coder Social logo

povcalnet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

povcalnet's Issues

Fix cl subcommand

cl is not working w=correctly. see

povcalnet cl, country(COL BRA ARG IND) year(2011) clear coverage("national national urban national"

fix issue in regional aggregate download - 0 observations

. povcalnet, region(SSA) year(all) aggregate clear

Query at $1.9 poverty line

Year: YearSelected=all
Country: Countries=AGO_3,BDI_3,BEN_3,BFA_3,BWA_3,CAF_3,CIV_3,CMR_3,COD_3,COG_3,COM_3,CPV

_3,ETH_1,ETH_3,GAB_3,GHA_3,GIN_3,GMB_3,GNB_3,KEN_3,LBR_3,LSO_3,MDG_3,MLI_3,MOZ_3,MRT_3,MUS_3,MWI
_3,NAM_3,NER_3,NGA_3,RWA_3,SDN_3,SEN_3,SLE_3,SSD_3,STP_3,SWZ_3,SYC_3,TCD_3,TGO_3,TZA_3,UGA_3,ZAF
_3,ZMB_3,ZWE_3
Poverty line: PovertyLine=1.9
Aggregation: &display=R
PPP:


No. Obs: 0

create povcalnet_test

add subcommand test when povcalnet fails, we could just type povcalnet test by parsing scalar pcn_query and create a link to be displayed in the browser and see what happened with the query

fix optios year(last)

There is a glitch on optiosn year(last). See for instances, povcalnet, region(all) year(last) agg clear

Using cl subcommand with the same country appearing multiple times

Hi Andres and colleagues,

I am having an issue with the cl suboption I haven't been able to solve.
The two examples below help illustrate my problem:

Example A:

local coun ALB AGO
local year 2008 2000 
local plin 1.9 1.8 
local cove national national 
povcalnet cl, country(`coun') year(`year') povline(`plin') coverage(`cove') clear 

Example B:

local coun ALB AGO AGO
local year 2008 2000 2008
local plin 1.9 1.8 1.7
local cove national national national
povcalnet cl, country(`coun') year(`year') povline(`plin') coverage(`cove') clear

On my end, example A works while example B returns an error.
Is there a way I can get the information I am trying to get in example B with only one line of povcalnet cl?

Many thanks,
Daniel

Limit to simultaneous queries with cl subcommand

Hi Andres and team,

When using the cl subcommand there seems to be a limit of ten one-on-one queries that can be done simultaneously. Is that correct? If so, is it feasible to have this limit raised?

Many thanks for your help as always.

Best,
Daniel

Add a section in help file for differences among executions

section of help file explaining the following differences

						
*----------  Understanding requests and aggregate
* regular 
povcalnet, country(COL BRA ARG IND) year(2015) clear 

* fill gaps
povcalnet, country(COL BRA ARG IND) year(2015) clear  fillgaps

* Customized Aggregate
povcalnet, country(COL BRA ARG IND) year(2015) clear  aggregate

* WB aggregates
povcalnet wb, clear  year(2015)
povcalnet wb, clear  region(SAR LAC)
povcalnet wb, clear             // all reference years

* one-on-one query
povcalnet cl, country(COL BRA ARG IND) year(2011) clear coverage("national national urban national")


Update examples in Help file

Examples have to be updated with new variable names. Also, more examples should be added to account for all the options

create povcalnet_query

Create povcalnet_query.ado that creates the query for any kind of request. Right now, the query is being built in each ado-file (_query, _aggquery, and _cl). This is clearly inefficient and inconsistent.

Suggestion to create unique country-year sample marker in povcalnet bulk download

(this repeats email sent to Andres and team June 21, copied to Github as per Andres' request)

Andres and colleagues,

Can I make one other suggestion โ€“ not so much for the API wrapper but for the data itself?

You will have lots of (somewhat superficial) users like me who just want one entry for each country-year. So for example for China/India/Indonesia some people will want to have just the national aggregate and not the rural/urban entries separately, and for a bunch of LAC and ECA countries you have many country-years where you have both and income- and consumption-based measures.

Having just spent a slightly tedious half-hour deduplicating these records manually (my decision rules below), I wonder if you might want to introduce one or more dummy variables in the dataset that define samples uniquely identified by country/year? What I did below for example is pick either the consumption or the income measure to ensure the longest possible time series (either all consumption, or all income), and I dropped the separate rural/urban entries.

If you had a dummy like this, then superficial users like me who want just one data point per country/year can simply filter on this dummy and then have a dataset that is amenable to merging based on country-year.

Aart

// Load data, define integer year variable by rounding fractional data_year
povcalnet
gen year=round(data_year)
gen wbcode=country_code

// Deduplicate lots of entries where there are multiple data points for same country/year
// Note data_type=1 for "Consumption", 2 for "Income"
// Note coverage_type=1 for Rural, 2 for Urban
drop if wbcode=="BGR" & year==2007 & data_type==1
drop if wbcode=="CHN" & coverage_type==1 | coverage_type==2
drop if wbcode=="EST" & year>=2003 & data_type==1
drop if wbcode=="HRV" & year>=2009 & data_type==1
drop if wbcode=="HTI" & year==2012 & data_type==1
drop if wbcode=="HUN" & year>=2004 & data_type==1
drop if wbcode=="IDN" & coverage_type==1 | coverage_type==2
drop if wbcode=="IND" & coverage_type==1
drop if wbcode=="LTU" & year>=2004 & data_type==1
drop if wbcode=="LVA" & year>=2004 & data_type==1
drop if wbcode=="MEX" & data_type==1
drop if wbcode=="NIC" & data_type==1
drop if wbcode=="PHL" & data_type==2
drop if wbcode=="POL" & year>=2004 & data_type==2
drop if wbcode=="ROU" & year>=2006 & data_type==2
drop if wbcode=="SRB" & data_type==2
drop if wbcode=="SVK" & year>=2004 & data_type==1

regarding stata povcal with alternative PPP

I am trying to use stata povcal with my own PPP.

For example, for Armenia (ARM) first I use WBโ€™s default PPP (183.7796) using the command: povcalnet, country(ARM) year(2011) coverage(national) clear

And then I use alternative PPP (175.339) using command: povcalnet, country(ARM) year(2011) ppp(175.339) coverage(national) clear

The results from alternative PPP is the exactly identical to the output for default PPP.

Am I doing something wrong. I expected a different headcount due to change in the Armenian PPP. Your comments/suggestions regarding this will be much appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.