https://github.com/datamade/ny-budget
:bar_chart: an explorable budget vizualization for New York state
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Repository
:bar_chart: an explorable budget vizualization for New York state
Basic Info
- Host: GitHub
- Owner: datamade
- License: other
- Language: JavaScript
- Default Branch: main
- Homepage: https://ny-budget.datamade.us
- Size: 20.6 MB
Statistics
- Stars: 30
- Watchers: 4
- Forks: 11
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
ny-budget
An explorable budget visualization for the state of New York

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
- jQuery
- D3 (for CSV manipulation)
- Backbone (javascript MVC framework)
- Highcharts (charting library)
- Datatables (sortable HTML tables)
How to update this New York visualization
1. Update Data
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)
A csv and xlsx file are typically shared with the same data. I've found that the csv file sometimes has formatting issues, so I export the xlsx file as a new budget_raw.csv
cleanup.py is a python script that requires pandas and xlrd. You can install them by running:
pip install -r requirements.txt
When updating either of the above csvs, run the cleanup.py script to generate the finished budget, budget_finished.csv:
python cleanup.py
2. Update settings
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 '2023-24', set the end year to 2024)
- activeYear (typically set to the same as endYear)
- projectionStartYear (for example, if the first year of estimates is '2023-24', set this to 2023)
- plotBandBuffer (this determines the # months of padding for the beginning of the estimates plot band. if there are multiple years of estimates, set a small buffer like -1, otherwise set it to a larger negative number, e.g. -7, for more space)
- inflation_idx (array of years and CPI values. typically we update the most recent years to track accurate inflation)
- benchmark (set to the current year)
3. Preview
To preview changes locally:
python -m SimpleHTTPServer
4. Share preview with client
Open a pull requst with the latest changes. This will create a deploy preview in netlify that you can share with the client for review.
4. Deploy
The site is hosted on Netlify, so deploy previews are available if you make a pull request.
To deploy to production, push the changes into the deploy branch:
bash
git push origin main
git push origin main:deploy
Live changes will be seen at https://ny-budget.datamade.us
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: - New Orleans - Cook County - Macoupin County - A blank template to populate
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
Put your finished budget csv file in the
data/folderNext, set the configuration variables in
js/settings.js
Team
- Cathy Deng, DataMade
- Derek Eder, DataMade
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.
Copyright and Attribution
Copyright (c) 2016 DataMade. Released under the MIT License.
Owner
- Name: datamade
- Login: datamade
- Kind: organization
- Email: info@datamade.us
- Location: Chicago, IL
- Website: http://datamade.us
- Twitter: datamadeco
- Repositories: 123
- Profile: https://github.com/datamade
We build open source technology using open data to empower journalists, researchers, governments and advocacy organizations.
GitHub Events
Total
- Watch event: 4
- Push event: 6
- Pull request event: 5
- Create event: 1
Last Year
- Watch event: 4
- Push event: 6
- Pull request event: 5
- Create event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 10
- Total pull requests: 26
- Average time to close issues: 10 days
- Average time to close pull requests: 1 day
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 0.3
- Average comments per pull request: 0.0
- Merged pull requests: 25
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: about 10 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- cathydeng (6)
- fgregg (3)
- derekeder (1)
Pull Request Authors
- derekeder (28)
- Bran3223 (1)
- smcalilly (1)