Hi Devs

I've started work on Z-Score reports but I'm having to use a javascript
function to calculate standard deviation. I think we have a bug or
user-error with the aggregationType=STDDEV implementation or I'm not using
it correctly because I expect only 1 stDev value per dx based on the
orgunit 'population' specified as criteria. This is how I would expect the
API call to work:

api/analytics.json?*dimension*=dx:Ar2V5v1R7z3&*filter*=pe:2015&*filter*
=ou:LEVEL-2;JLA7wl59oN3&displayProperty=SHORTNAME&outputIdScheme=ID&
*aggregationType=STDDEV*

Translated:
give me the StDev for indicator dx:Ar2V5v1R7z3 for the period 2015 based
on OU2 (population) values below 'JLA7wl59oN3: za South Africa'.

At the moment this returns zero rows (i assume because dimension is only
specified once) but when I switch from using 'ou filter' to 'ou dimension'
i get values per ou2 that appear dramatically larger that the expected
StDev value for the range. The same applies to the ou1 level (unusually
large StDev values). E.g. indicator values for the first 3 months in 2015
are [20.6, 20.7, 20.7] while using aggregationType=STDDEV returns [45.5,
45.2, 47.9]...

Kind Regards,
Greg

-- 
*Health Information Systems Program - South Africa*
*- - - - - - - **- - - - - - - **- - - - - - - **- - - - - - - **- - - - - *
Mobile  :    073 246 2992
Landline:   021 554 3130
Fax:          086 733 8432
Skype:      gregory_rowles
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to