Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[super] Compar-o-tron B: simple search and visual comparison #50

Open
trickvi opened this issue Sep 12, 2013 · 0 comments
Open

[super] Compar-o-tron B: simple search and visual comparison #50

trickvi opened this issue Sep 12, 2013 · 0 comments

Comments

@trickvi
Copy link
Contributor

trickvi commented Sep 12, 2013

Moving from openspending/openspending#31

The Compar-o-tron B helps users to discover and share the proportions between different classes of government spending. This satisfies the need to contextualize individual items, policies or functions of government by contrasting them with one or many more tanglible other items.

Images

A first mockup done for original WDMMG project. One might do things quite differently for this version ...

6_wdmmg_3_compareotron2

Functionality

  • The Compare-o-tron helps users to find spending classes by filling a shopping cart.
    • This can be filled either while browsing the site in normal mode (i.e. via treemaps, bubblecharts) or through a direct search function.
    • Search results may already be presented as bubbles. Search should have auto-complete.
    • Care should be taken to warn the user if they attempt to include nested items (e.g. "Defense", "200 new Tanks" - which is part of the Defense budget).
    • The selected items can include: entries, classifiers, entities. Each of these needs to be assigned a unique, "typical" value, e.g. for "Defense" in COFOG this could be "annual expenditure in 20xx", for "Mineral Oil Taxes" in the German FKP it could be "annual projected revenue for the current year".
    • The selected items should also have color and icon specifications associated.
  • After selection a few items, these will be presented in a joint graph as bubbles.
    • Each compare-o-tron receives a unique URL, either by saving the cart to the DB or by URL-encoding it.
    • The user creating the compare-o-tron may also want to comment on the diagram.
  • A gallery of existing compare-o-trons is available.
  • Compare-o-tron can be embedded into another article, e.g. a news story.

Implementation

The key features for compare-o-tron are:

  • Named items (things that can be added to the cart)
  • The cart
  • The ability to display non-related bubbles.

The following would be one option to implement the back-end for named items:

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)

  1. Add an extension point to generate_views in the loader
  2. Hook into this and generate a db.dataset_name.named_items collection with the named attributes and amount from the drilldown.
  3. Query this collection via a custom controller.
  4. Visualize as bubbles.

More Information

  • page in wiki: http://wiki.openspending.org/Visualization_Comparotron (not accessible any longer)
    • Mockup: see attached image.
      • RP: items on left side are results of search so far. You can drag these across to right. Should then be able to hide search list and share with friends.
      • RP: note this is mockup and does not have to determine final design
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant