shaan360 / ny-budget

an explorable budget viz for New York state

Home Page:http://ny-budget.datamade.us

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ny-budget

An explorable budget visualization for the state of New York

screen shot 2015-05-07 at 3 22 46 pm

This is based on Look at Cook by Derek Eder and Nick Rougeux at Open City, and can be easily re-deployed to visualize other budgets.

Dependencies

How to update this New York visualization

The csv inputs that may need to be updated going forward are:

  • the budget numbers (data/budget_raw.csv)
  • the budget descriptions (data/descriptions.csv)

When updating either of the above csvs, run the cleanup.py script to generate the finished budget, budget_finished.csv:

> python cleanup.py

The settings in js/settings.js that may need to be updated going forward are:

  • endYear (for example, if the last year in the budget is '2015-16', set the end year to 2016)
  • activeYear
  • projectionStartYear (for example, if the first year of estimates is '2015-16', set this to 2016)
  • projectionOffset (if there are multiple years of estimates, set this to -1 for styling, otherwise set it to a higher number for more space)
  • inflation_idx
  • benchmark

To deploy, push the changes into the gh-pages branch:

> git push origin master
> git push origin master:gh-pages

How to adapt this to another budget

This code can be customized to visualize another data set.

####Data Prepatation The budget data must be a csv that adheres to a fixed format in order for the app to process it properly. Budget column headers include: Fund ID, Fund, Department ID, Department, Short Title, Link to Website, Department Description, and Control Officer. Values for estimates and actuals must be broken down into a separate column for each year.

See examples of prepped data:

If you need to do any preparation on your raw data to get it into the finished format (e.g. formatting dollar amounts, removing whitespace, adding descriptions), do it in a script so that it will be repeatable in the future. See an example script in data/cleanup.py.

####Configuration

  1. Put your finished budget csv file in the data/ folder

  2. Next, set the configuration variables in js/settings.js

Errors / bugs

If something is not behaving intuitively, it is a bug, and should be reported as an issue

You can also email info@datamade.us or tweet @DataMadeCo.

Note on patches/pull requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Commit and send me a pull request. Bonus points for topic branches.

About

an explorable budget viz for New York state

http://ny-budget.datamade.us

License:Other


Languages

Language:JavaScript 76.9%Language:HTML 13.8%Language:CSS 7.1%Language:Python 2.3%