[openspending-dev] #500 and #501
Vitor Baptista
vitor at vitorbaptista.com
Wed Jan 9 20:50:19 UTC 2013
Hey Friedrich! How's the US?
I've finished a first version of the timeseries graphs. It's in the
feature/time-series branch on openspendingjs. There're a few things missing.
First, I was thinking in how to limit the entries' amount. I tried to
simply change Aggregator's pagesize, but that kinda sucks. The best
solution is to limit the number of entities shown over a period of time,
but pagesize limits the number of elements returned. If I set a pagesize to
100, I might receive 100 entries of a single entity, or 100 different
entities.
My (stupid) workaround was to get everything and slice the results array.
As they're grouped by the entity, it works. But the performance on big
datasets is awful.
Second, it makes more sense to select a range in the slider, instead of
simply the year. There're even datasets that simply don't work if you
select only a year (i.e. Slovakia's). But, for it to work, I would need a
way to get ranges through the API. I could find none. The only way was to
cut by every year inside the range, but that's another hack. Also, it won't
work if we allow selecting month (or day) ranges. Ideas?
And last, I haven't checked it yet, but could you point me where to look to
add the widget inside openspending?
Cheers,
Vítor.
2012/11/26 Friedrich Lindenberg <friedrich.lindenberg at okfn.org>
> Hey Vitor,
>
> On Fri, Nov 23, 2012 at 4:55 PM, Vitor Baptista <vitor at vitorbaptista.com>wrote:
>>
>> I read the other widget's code. My main doubt is about Bob. As far I
>> could understand, it's responsible for building the queries for OS' API, is
>> that right? Apart from that, is there anything else I should know before
>> starting?
>>
>
> Yeah, so the idea behind bob is that it will be given a query
> specification and then generate an maintain a UI to ask the user for a
> query that conforms to this specification. This also means that you can add
> new UI elements, such as checkboxes etc. to it. The new thing for the time
> series and bar chart widgets will be that they'll have to support setting
> time axes as drilldowns, while still offering the option to slice over time
> and drill down by something else (maybe not for line graphs).
>
> Cheers,
>
> - Friedrich
>
> --
> 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/20130109/d38a8c0f/attachment.html>
More information about the openspending-dev
mailing list