Look at iso function for aggregate handling. +1 changing function names. I
think Dan is crushing this now?
On Jun 11, 2013 2:21 PM, "Robin Kraft" <notifications@github.com> wrote:

> In forma/api/counts.py:
>
> > +        dates = self.request.get('dates')
> > +        where = _where(iso, dates, preds=dict(id1=id1, id2=id2, id3=id3, id4=id4))
> > +        group = 'GROUP BY iso, id1, id2, id3, id4'
> > +        sql = ' '.join([select, _from(), where, group])
> > +        data = _cache(iso)
> > +        self._process(data, sql)
> > +
> > +    def iso5(self, iso, id1, id2, id3, id4, id5):
> > +        select = _select('iso', 'id1', 'id2', 'id3', 'id4', 'id5')
> > +        dates = self.request.get('dates')
> > +        where = _where(iso, dates, preds=dict(id1=id1, id2=id2, id3=id3, id4=id4,
> > +            id5=id5))
> > +        group = 'GROUP BY iso, id1, id2, id3, id4, id5'
> > +        sql = ' '.join([select, _from(), where, group])
> > +        data = _cache(iso)
> > +        self._process(data, sql)
>
> So these iso0-5 methods should be named admin0-5 - ISO is just at the
> country level. Also, how are we handling the aggregate and range query
> parameters?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/wri/forma-api/pull/2/files#r4645076>
> .
>