[openspending-dev] Sanity checking numbers on Minas Gerais' satellite site

Friedrich Lindenberg friedrich.lindenberg at okfn.org
Thu Feb 14 19:40:41 UTC 2013


Did you consider the geographic breakdown? Maybe the aggregator only
includes sums which are allocated to a region or otherwise discards some of
that dimension?

- Friedrich


On Thu, Feb 14, 2013 at 8:34 PM, Vitor Baptista <vitor at vitorbaptista.com>wrote:

> If you open http://minasgerais.playground.openspending.org/bubblemap.html,
> and set a breakpoint into aggregator.js, line 183, you can see:
>
> > nodes.root.amount
> 61554809596.11001
> > total = 0; for (i in nodes.root.breakdowns) { total += nodes.root.breakdowns[i].amount; }
> 73659290793.70004
> > total = 0; for (i in nodes.root.children) { total += nodes.root.children[i].amount; }
> 61554809596.11003
>
> The difference between nodes.root.amount and the sum of
> nodes.root.children amounts seems to be just a precision error. But the
> breakdowns have a huge difference. I'm trying to understand what's
> happening, but haven't had much luck.
>
> My first hypothesis was that we're counting a few values twice. I thought
> about it because, if you check:
>
> > data.drilldown[0].region.id
> "1"
>
> I thought that Aggregator.toNode could change that to "root__1", which
> would conflict with a cofog1 ID. But doesn't seems to be the case.
>
> Any ideas?
>
>
> Cheers,
>
> Vítor.
>



-- 
Friedrich Lindenberg | OpenSpending & OKFN Labs | @pudo
http://openspending.org | http://okfnlabs.org | http://pudo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/openspending-dev/attachments/20130214/ee909ba0/attachment.html>


More information about the openspending-dev mailing list