Giter Site home page Giter Site logo

budgetscrape's Introduction

budgetScrape

Node scraper for NYC Budget PDFs.

Uses NYC "supporting schedules" budget documents, outputs a csv for lowest-level budgeted amounts with associated hierarchy. (OMB publishes pdfs here, this scraper grabs data from the 2000-ish page long "Supporting Schedules", which you can see on each financial plan page such as this one.

The hierarchy looks like this:

Agency > Unit of Appropriation > Responsibility Center > Budget Code > Object Class > Object and Dollar Amount

For example:

002 Mayoralty > 020 Office of the Mayor > 0006 Counsel to the Mayor > 0230 Mayor's Judiciary Committee > 01 F/T Salaried > 001 Full Year Positions $202,774

##How to Use

Clone this repo, install dependencies npm install

First, scrape raw text out of PDFs using node scrape.js. This script is looking for pdf files in the /raw directory, and will output a text file of the same name in /txt.

Next run node parsetxt.js {filepath} replacing {filepath} with the path to the .txt file you want to parse. This will create a csv of the same name in /csv.

The FY 2017 Executive Budget is provided as an example in this repo, you may need to modify the script to get different columns of text depending on which budget docs you are parsing.

I make no guarantee that this thing is working properly, please check your work against the source document. Pull Requests Welcomed!

##Just give me the damn data

Executive Budget 2017 - CSV

budgetscrape's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kkowar fagan2888

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.