codeisland / ribudget_treemap

RI State Expenditure Data: Fiscal Year2009-2014
3 stars 2 forks source link

Create D3 Tree Map of RI FY2013 Fiscal Expenditure #3

Open theryankelly opened 10 years ago

theryankelly commented 10 years ago

Recreate for testing purposes the tree map found on (http://www.ri.gov/opengovernment/). Inspiration: http://openbudgetoakland.org/

Done When

Have D3 tree map pulling fiscal expenditure data through parsed budget JSON Hosted on new Git Pages site

jrumbut commented 10 years ago

Related to #2, does anyone have an opinion on the folder structure I should use for this?

I'm going to use /demos/treemap/ unless someone has a better idea.

joealba commented 10 years ago

That's fine. It can always be moved later if necessary.

I added the json files in /json. Mess around with them, and let me know if a different data layout would make things easier. It's really easy for me to regenerate the files, so don't be shy.

jamesrhaley commented 10 years ago

Thank you Joe for getting this out to us. I have a working version of a d3 tree map on my computer. What we need is some merging of information in the JSON to make it interesting. This is an example of JSON that works inside of a d3 example. It would be helpful if categories had names instead of numbers or a clearer guide to transpose this information.

James Haley

On Thu, Sep 18, 2014 at 10:45 AM, Joe Alba notifications@github.com wrote:

That's fine. It can always be moved later if necessary.

I added the json files in /json. Mess around with them, and let me know if a different data layout would make things easier. It's really easy for me to regenerate the files, so don't be shy.

— Reply to this email directly or view it on GitHub https://github.com/codeisland/RI_Budget/issues/3#issuecomment-56058373.

joealba commented 10 years ago

Sure, I can do that. Before I do, take a look at the account_descriptions, agencies, and categories json files under /json. Those are the lookup tables. I assumed that some data comparisons might be a little easier to do using the ID as the keys in the data json files instead of a longer text string. If you tell me that assumption was wrong, I can drop updated json files shortly.

jrumbut commented 10 years ago

Hi Joe,

The code used by Oakland depends on the strings being there as opposed to the IDs. In the short term, that would be easier to work with (although, in the longer term, I think there are a number of ways to improve how this chart works).

A sample of the data that goes into making one square:

{ "department": "Fire Department", "fund": "General Fund -General Purpose", "amount": 170624854.0, "num_entries": 75, "unit": "Emergency / Suppression -Shift A" }

joealba commented 10 years ago

I dropped a few new json files out there with additional de-normalized info. See if those work better for you.

Disclaimer: I flailed a bit with arel to get these things to work, so please consider these numbers as unreviewed, possibly inaccurate play files.

jamesrhaley commented 10 years ago

Hi Joe and Joshua,

Hi while I like the Oakland example it does not take advantage of d3 but instead, a bunch of jQuery plugins. The one advantage of that would be if we are trying to target older versions of IE, other wise it is not as fluid as an example such as this http://mbostock.github.io/d3/talk/20111018/partition.html or this http://bl.ocks.org/mbostock/4063582. In these examples the JSON I sent will work. D3 will take any type formatting but writing one of these from scratch might have to be the case. Mike Bostock's full example list can be found here https://github.com/mbostock/d3/wiki/Gallery.

James

On Thu, Sep 18, 2014 at 11:35 AM, Joshua Rumbut notifications@github.com wrote:

Hi Joe,

The code used by Oakland depends on the stings being there as opposed to the IDs. In the short term, that would be easier to work with (although, in the longer term, I think there are a number of ways to improve how this chart works).

A sample of the data that goes into making one square:

{ "department": "Fire Department", "fund": "General Fund -General Purpose", "amount": 170624854.0, "num_entries": 75, "unit": "Emergency / Suppression -Shift A" }

— Reply to this email directly or view it on GitHub https://github.com/codeisland/RI_Budget/issues/3#issuecomment-56066167.

jrumbut commented 10 years ago

Hi James,

Thanks for the heads up! I suppose my original hope was to demo not just the functionality but the reuse of code from a past Code For America project.

I'll put that aside and work with d3 for the time being.

Sincerely, Josh On Sep 18, 2014 1:52 PM, "jamesrhaley" notifications@github.com wrote:

Hi Joe and Joshua,

Hi while I like the Oakland example it does not take advantage of d3 but instead, a bunch of jQuery plugins. The one advantage of that would be if we are trying to target older versions of IE, other wise it is not as fluid as an example such as this http://mbostock.github.io/d3/talk/20111018/partition.html or this http://bl.ocks.org/mbostock/4063582. In these examples the JSON I sent will work. D3 will take any type formatting but writing one of these from scratch might have to be the case. Mike Bostock's full example list can be found here https://github.com/mbostock/d3/wiki/Gallery.

James

On Thu, Sep 18, 2014 at 11:35 AM, Joshua Rumbut notifications@github.com

wrote:

Hi Joe,

The code used by Oakland depends on the stings being there as opposed to the IDs. In the short term, that would be easier to work with (although, in the longer term, I think there are a number of ways to improve how this chart works).

A sample of the data that goes into making one square:

{ "department": "Fire Department", "fund": "General Fund -General Purpose", "amount": 170624854.0, "num_entries": 75, "unit": "Emergency / Suppression -Shift A" }

— Reply to this email directly or view it on GitHub https://github.com/codeisland/RI_Budget/issues/3#issuecomment-56066167.

— Reply to this email directly or view it on GitHub https://github.com/codeisland/RI_Budget/issues/3#issuecomment-56076788.

jamesrhaley commented 10 years ago

Hi Josh,

Not a problem. I remember in one meeting the Philly code for america open budget was shown. Later on I found that they used this example from the d3 site http://bl.ocks.org/kerryrodden/7090426 I remembered a lot of people liked this one. It is a sunburst instead of a tree.

Have a great day, James

On Thu, Sep 18, 2014 at 1:04 PM, Joshua Rumbut notifications@github.com wrote:

Hi James,

Thanks for the heads up! I suppose my original hope was to demo not just the functionality but the reuse of code from a past Code For America project.

I'll put that aside and work with d3 for the time being.

Sincerely, Josh On Sep 18, 2014 1:52 PM, "jamesrhaley" notifications@github.com wrote:

Hi Joe and Joshua,

Hi while I like the Oakland example it does not take advantage of d3 but instead, a bunch of jQuery plugins. The one advantage of that would be if we are trying to target older versions of IE, other wise it is not as fluid as an example such as this http://mbostock.github.io/d3/talk/20111018/partition.html or this http://bl.ocks.org/mbostock/4063582. In these examples the JSON I sent will work. D3 will take any type formatting but writing one of these from scratch might have to be the case. Mike Bostock's full example list can be found here https://github.com/mbostock/d3/wiki/Gallery.

James

On Thu, Sep 18, 2014 at 11:35 AM, Joshua Rumbut < notifications@github.com>

wrote:

Hi Joe,

The code used by Oakland depends on the stings being there as opposed to the IDs. In the short term, that would be easier to work with (although, in the longer term, I think there are a number of ways to improve how this chart works).

A sample of the data that goes into making one square:

{ "department": "Fire Department", "fund": "General Fund -General Purpose", "amount": 170624854.0, "num_entries": 75, "unit": "Emergency / Suppression -Shift A" }

— Reply to this email directly or view it on GitHub < https://github.com/codeisland/RI_Budget/issues/3#issuecomment-56066167>.

— Reply to this email directly or view it on GitHub https://github.com/codeisland/RI_Budget/issues/3#issuecomment-56076788.

— Reply to this email directly or view it on GitHub https://github.com/codeisland/RI_Budget/issues/3#issuecomment-56078443.

nelsonri72 commented 10 years ago

@theryankelly , @thomguertin, Brian Daniels,

There seems to be a difference of 11,503,084.66 between the tableau visual and balance dataset for category_code: 70 'Aid to Local Units of Government'.

1,131,689,158.99 (sum of balance dataset) 1,120,186,074.33 (tableau)
=11,503,084.66 DIFF

https://www.google.com/fusiontables/DataSource?snapid=S1428703movB http://www.ri.gov/opengovernment/

NEGATIVE BALANCES: There are also negative balances throughout the balances dataset some resulting in overall negative balance for the year in some categories/agencies.

theryankelly commented 10 years ago

After our meeting last night. Let move forward confident in the dataset we have. I will create a separate issue for identifying the negative balances and local aid difference.

Also I will create separate issues for the different types of visualizations. So each project can have an owner and data and design can be structured for each viz.

Next Step: Please push any work you have on visualizations to this repo!

theryankelly commented 10 years ago

Who has created tree maps with this data?