Code Monkey home page Code Monkey logo

dwillis / poindexter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sunlightlabs/poindexter

0.0 3.0 0.0 132 KB

Creates a datastore for information on 527s, political organizations which disclose donors and expenditures semiannually with the IRS and can raise and spend unlimited amounts of money without filing reports with the Federal Election Commission.

License: BSD 3-Clause "New" or "Revised" License

Python 99.27% Shell 0.73%

poindexter's Introduction

o_o poindexter o_o

A tool for wrangling IRS data on 527s

Poindexter does the following:

  • Downloads and extracts the IRS' bulk Political Organization Filing and Disclosure data file
  • Cleans this file of database errors, errant DOS and UNIX line endings (there are both), and other cruft
  • Repairs lines broken by unsupported characters in the IRS' database dump
  • Logs all the weirdness it encounters and repairs
  • Writes the results into a series of CSVs, one for each table described in the IRS data documentation here

Poindexter comes complete with the sql statements necessary to make the corresponding tables in a Postgres database.

To download the bulk data: ./prep_files.sh

To generate the flatfiles into a directory called 'csvs' -- which should exist in the working directory -- using default settings: ./run_this.py & tail -f filemaker.log

From there, you're on your own; SQL scripts are included in sql/ that will create tables in Postgresql one could populate from the flatfiles with a COPY FROM command.

Poindexter should log an error when it encounters a row it can't handle.

poindexter's People

Contributors

nclarkjudd avatar

Watchers

Derek Willis avatar James Cloos avatar  avatar

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.