okfn-brasil / mosaico

Visualization on the brazilian budget for FGV
GNU Affero General Public License v3.0
5 stars 0 forks source link

Show budget execution on the treemap #20

Open ltartari opened 11 years ago

ltartari commented 11 years ago

This would be basically a colour scale applied to the each treemap quadrant to show the execution of any given element.

Depends on: scale values definition.

vitorbaptista commented 10 years ago

What will we display for the current year? Does it make sense to get the budget for that year, divide by the number of months so far, and calculate the spending on that?

For example, if a public body have a budget of 1.2 bi, we consider that it should spend 100 million per month to use all its budget. If we're on April and it spent only 50 million, it's a problem.

What do you think, @andressafioravanti?

vitorbaptista commented 10 years ago

@ltartari I've just added the first version of the legends in https://github.com/okfn/fgv/commit/65769f741c894d9d05e89f01392b7e9b0b062497. To change the class names, you could simply change in https://github.com/okfn/fgv/blob/master/app/scripts/services/choropleth_scale.coffee#L3-L6 (not forgetting to fix the test in https://github.com/okfn/fgv/blob/master/test/spec/services/choropleth_scale.coffee#L63-L66).

The HTML is in https://github.com/okfn/fgv/blob/master/app/views/partials/treemap.html#L1-L14. I haven't created a separate directive for this, but will probably do in phase 2 when we'll have another legend for the bubbles.

ltartari commented 10 years ago

:cocktail: :beers: :+1:

andressafioravanti commented 10 years ago

@ltartari conseguiram falar com o Renato sobre o ano corrente?

vitorbaptista commented 10 years ago

@andressafioravanti Consegui falar com ele sim. O que ficou acertado foi que faríamos como sugeri em https://github.com/okfn/fgv/issues/20#issuecomment-25469472, simplesmente considerando o autorizado relativo ao mês atual, no caso de ano corrente.

andressafioravanti commented 10 years ago

ok!