GithubHelp home page GithubHelp logo

charitynavigator / irs990 Goto Github PK

View Code? Open in Web Editor NEW
24.0 5.0 7.0 1.1 MB

ETL toolkit for 2.5 million electronic nonprofit tax returns released by the IRS.

Home Page: http://990.charitynavigator.org

Shell 10.81% Python 89.19%
data government records open-source irs nonprofit tax

irs990's Introduction

This repo is (mostly) obsolete!

Work on this repo stopped in order to shift to the 990_long repo. In general, 990_long is more likely to be more useful to you: it has data for every field in every version of the 990, rather than a select handful, as in this repo. On the other hand, this repo preserves the structure of the data, whereas 990_long transforms the 990 data set into hundreds of millions of key-value pairs.

IRS 990 Toolkit

This repository contains everything you need to get started exploring the IRS 990 dataset hosted by Amazon Web Services on S3. This includes instructions for an easier-to-use 990 database provided free to the public by Charity Navigator.

Want to DIY?

Since this library was written, more and more resources have become available for analyzing the IRS e-file dataset. If you want to build your own 990 analysis tool, the author of this library has written a how-to article on Medium.

Documentation

To get started, try our Quick Start. For detailed documentation, see the project page.

File index

The repository contains the code used to build the database from scratch. Most users should not worry about this at all and instead use the Quick Start. For developers, the code is structured as follows:

  • Build scripts: The database is built in four distinct stages: creation, loading, parsing, and dumping. You can understand the exact process by which the database is built by reading these scripts (in order). If anything is unclear, please email David Borenstein.
  • Creation (create_990_database.sh): Create database and tables; load crosswalk files used to convert the XML e-filings into relational database rows.
  • Loading (load_990_database.sh): Pull 990 records from Amazon Web Services and into the database.
  • Parsing (parse_990_database.sh): Extract specific data from each 990 record and load the extracted values into the database.
  • Dumping (dump_990_database.sh): Create .sql files containing your newly generated database.
  • Python code: The directories extraction, schema, and setup contain the code involved in initializing, then populating, the database. To follow the exact sequence of initialization, look through the build scripts above.
  • SQL code: The directory sql contains very little code, since most of the data tables are generated dynamically using SQLAlchemy. One exception is the xml table. This table is stored in a compressed format, which is hard to set up using SQLAlchemy.
  • Documentation: Jekyll markdown for the documentation website is contained in the docs folder.

License

Copyright (c) 2017 Charity Navigator.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

irs990's People

Contributors

borenstein avatar mdragoncn avatar zweinsteiger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

irs990's Issues

Schedule L not loading at all

Table is currently a duplicate of Schedule G, consequently has no loan data in it. Lose everything after Business name
I'm not sure what you're doing with Business name. If your program is concatenating Line1 and Line2, that's fine. If not, it should do, or else create separate columns for them:
/Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/BusinessName/BusinessNameLine1Txt or /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/BusinessName/BusinessNameLine1 or /Return/ReturnData/IRS990ScheduleL/LoanTable/NameBusiness/BusinessNameLine
/Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/BusinessName/BusinessNameLine2Txt or /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/BusinessName/BusinessNameLine2 or /Return/ReturnData/IRS990ScheduleL/LoanTable/NameBusiness/BusinessNameLine2
Add Relationship with Organization: /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/RelationshipWithOrgTxt
Add Purpose of Loan:: /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/LoanPurposeTxt or /Return/ReturnData/IRS990ScheduleL/LoanTable/PurposeOfLoan
Add Loan To Org Indicator: /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/LoanToOrganizationInd or /Return/ReturnData/IRS990ScheduleL/LoanTable/LoanToOrganization
Add Loan From Org Indicator: /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/LoanFromOrganizationInd or /Return/ReturnData/IRS990ScheduleL/LoanTable/LoanFromOrganization
Add Original Principal: /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/OriginalPrincipalAmt or /Return/ReturnData/IRS990ScheduleL/LoanTable/OriginalPrincipalAmount
Add Balance Due: /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/BalanceDueAmt or /Return/ReturnData/IRS990ScheduleL/LoanTable/BalanceDue
Add Default Indicator: /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/DefaultInd or /Return/ReturnData/IRS990ScheduleL/LoanTable/Default
Add Board Approval Indicator: /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/BoardOrCommitteeApprovalInd or /Return/ReturnData/IRS990ScheduleL/LoanTable/ApprovedByBoard
Add Written Agreement Indicator: /Return/ReturnData/IRS990ScheduleL/LoansBtwnOrgInterestedPrsnGrp/WrittenAgreementInd or /Return/ReturnData/IRS990ScheduleL/LoanTable/WrittenAgreement

Part X: Capital Stock not loading

Capital Stock Trust Principal Current Funds is not finding data. XMLnames should be /Return/ReturnData/IRS990/CapStkTrPrinCurrentFundsGrp/EOYAmt or /Return/ReturnData/IRS990/CapStckTrstPrinCurrentFunds/EOY

Part XII: Audited vs Reviewed/Compiled Financial Statements

On the form 990, under Part XII:
• Question 2a asks, “were the organization’s financial statements compiled or reviewed by an independent accountant?”
• Question 2b asks “were the organization’s financial statements audited by an independent accountant?”

In table [Part XII] of the database, there is a field called [FSAudited]. One might think this field corresponds to the answer to question 2b of part XII. However, according to the data dictionary, the field called [FSAudited] indicates whether the organization’s financial statements have been compiled or reviewed. In other words, the name of the field suggests it corresponds to question 2b, while the definition in the data dictionary suggests it corresponds to question 2a.

One solution is to include fields for both questions 2a and 2b.

Part VII -- average hours is incorrect prior to 2013

Average hours from related organizations is not correct for forms prior to 2013. /Return/ReturnData/IRS990/Form990PartVIISectionA/AverageHoursPerWeekRltdOrg. Note that later forms use /Return/ReturnData/IRS990/Form990PartVIISectionAGrp/AverageHoursPerWeekRltdOrgRt and show up correctly.

Rationale for what data to include in the database

This isn't really an issue, but I was wondering how you chose what fields of the 990s to include in your database. There are many fields in the 990s that I would like access to, but weren't included. Just a few are:

  • Website
  • Mission description
  • Employee count
  • Salaries & benefits

Were there issues with ease of parsing? Wanting only certain information that you thought was most relevant? Are there plans to continue to expand this dataset?

Part X: Rename "TtlRevEOYAmt"

Field name TtlRevEOYAmt for Total Assets at EOY is misleading. Sounds like Revenue. The data is correct, but the field name should change.

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.