[wdmmg-dev] Compare-o-Tron B

Friedrich Lindenberg friedrich.lindenberg at okfn.org
Fri Jul 8 10:28:53 UTC 2011


Hi all,

I've had an idea of how to build the back-end components of #32, the
Compare-o-Tron. It would essentially introduce another optional
section in the mapping file but could be entirely handled in a plugin.
Is anyone opposed to having such an extension on grounds other than
"we have to talk more"?

Gregor: how general are the bubbles? Given a list of the same form as
normal drilldowns with an additional "drilldown_title" key for search,
how hard would it be to randomly render a few and put them in a nice
grouping (like cells on a petri dish?)

- Friedrich

Details:

1. Introduce another section in the mapping with the following format:

"named_items": {
    "cube_query": { ... }
    "name_key": "some_dimension.label",
    "color_key": "some_dimension.label",
    "weight_factor": 0.5, # will be used to scale volume.
    "default_color": "..."
}

(rinse, repeat for icons if needed)

2. Add an extension point to generate_views in the loader

3. Hook into this and generate a db.dataset_name.named_items
collection with the named attributes and amount from the drilldown.

4. Query this collection via a custom controller.

5. Visualize as bubbles.

-- 
Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/

http://twitter.com/pudo
http://pudo.org




More information about the openspending-dev mailing list