[openspending-dev] Fwd: OS to Cubes mapping
Stefan Urbanek
stefan.urbanek at gmail.com
Tue May 29 17:38:40 UTC 2012
forwarding an experiment...
Begin forwarded message:
> From: Friedrich Lindenberg <friedrich.lindenberg at okfn.org>
> Date: 29. mája 2012 9:54:22 SELČ
> To: Stefan Urbanek <stefan.urbanek at gmail.com>
> Subject: Re: OS to Cubes mapping
>
> Hey that is incredibly cool. Why don't you re-post to openspending-dev
> and we discuss it there?
>
> - Friedrich
>
> On Tue, May 29, 2012 at 12:46 AM, Stefan Urbanek
> <stefan.urbanek at gmail.com> wrote:
>> Was not able to go to sleep before I have finished this:
>>
>> Generate model: https://gist.github.com/2821496
>> Get slicer.ini: https://gist.github.com/2821497
>>
>> run:
>>
>> slicer serve slicer.ini
>>
>> and:
>>
>> curl "http://localhost/aggregate"
>>
>> Notes:
>>
>> * model looks overcomplicated because OS and Cubes have different naming
>> schema (Cubes uses prefix_<cube_name> vs. OS <cube_name>__entries and
>> prefix_<dim_name> vs. <cube_name>__<dim_name>. In Cubes dimensions are
>> shared within model. That is why currently there has to be explicit mapping
>> for every single attribute. See [1]
>>
>> * "date" is not yet converted (is ignored), as it is too late, fingers are
>> heavy, keyboard soft and screen is dimming in front of me.
>>
>> * cubes introduced new checking for string-cut conversions, that every
>> dimension key has to have form of identifier (alphanumeric and underscore).
>> might work if requested as /report with POST json (see [2]), not tested. I
>> should probably introduce URL encoding.
>>
>> [1] http://packages.python.org/cubes/mapping.html
>> [2] http://packages.python.org/cubes/server.html#reports
>>
>> just wanted to try it :-)
>>
>> let me know if it works or not
>>
>> later,
>>
>> s.
>>
>> Stefan Urbanek
>> data analyst and data brewmaster
>>
>> Twitter: @Stiivi
>> Home: http://stiivi.com
>> Brewery: http://databrewery.org
>> Github: https://github.com/Stiivi
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/openspending-dev/attachments/20120529/578900c6/attachment.html>
More information about the openspending-dev
mailing list