[openspending-dev] Returning additional measures in aggregate API

Friedrich Lindenberg friedrich.lindenberg at okfn.org
Mon Oct 8 07:03:36 UTC 2012


Hey Anders,

you're right, I didn't consider this yesterday! You can add
measure=amount_last_year to the API call, but it doesn't yet support
multiple values. I guess making each year into its own entry and doing
a drilldown on that is going to be the easiest way of getting out all
the info with one call!

Cheers,

 - Friedrich

On Sun, Oct 7, 2012 at 5:56 PM, Anders Eriksen
<anders.grimsrud.eriksen at gmail.com> wrote:
> Hi.
>
> I am trying to add some additional fields/measuers to my data in order to
> display more information in bubbletree tooltips (e.g. how has this amount
> changed since last year etc).
>
> I have added a column named "amount_last_year" and added a corresponding
> measure for my dataset.
>
> Loading of the dataset works fine, but when I access the data through the
> aggregate API none of the additional measures are displayed, only the amount
> measure.
>
> API-call:
> http://openspending.org/api/2/aggregate?dataset=tester_nor2&drilldown=program_category%7Cdep&cut=year%3A2011
>
>
> On the About tab in the meta information on Open Spending, the
> "amount_last_year" measure is listed.
>
> Is there something special I would have to consider to get these additional
> measures returned by the aggregate API?
>
> Best regards,
>
> Anders Eriksen
> Newsroom developer
> TV 2 Norway, News dept.
>
> _______________________________________________
> openspending-dev mailing list
> openspending-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/openspending-dev
>



-- 
Friedrich Lindenberg <friedrich.lindenberg at okfn.org>

OpenSpending - http://openspending.org
OKFN Labs - http://okfnlabs.org

Twitter: @pudo
Web: http://pudo.org




More information about the openspending-dev mailing list