Skip to content

Nonprofit-Open-Data-Collective/990_metadata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The goal of this repository is to extract metadata from the IRS 990 schemas for
the purpose of producing a 990 data dictionary.

The process is as follows:

   (1) Extract xpath and metadata for leaf elements from any hierarchy of named
       fields.

   (2) Extract xpath and metadata for any complex types, which will become side
       tables.

   (3) Construct composite xpath of complex-typed named elements.

   (4) Count how many times each xpath occurs in each observed version of the
       990.

The three CSV files in the "reference" directory are from the IRS. They
represent change logs for transition from the 2012v2.2 to the 2013v1.0
encodings of the 990.  

Unfortunately, the IRS provides neither the 2012v2.2 nor the 2013v1.0 schema on
their website. Instead, we use the latest pre-2013 schema we have, which is
2010v3.7, and the earliest 2013 schema we have, which is 2013v3.1. These
schemas are distributed in zipped form within this repository.

The files found in the "schemas" directory represent select .xsd files from the
990 schema provided by the IRS.

There are many challenges around using the IRS990 .xsd schemas. Chief among
them is that certain parts of the schema are idiosyncratic and require manual
examination. For example, Part III of the 990 PC is a list of programs offered
by a nonprofit. If there is more than one program, the first one has a
different data type from the second onward. Even more challenging, if there are
more than _two_, then programs 3+ will be three distinct Xpath roots.

With so much manual review required, we wish to limit the scope of work. As
such, we are ignoring any data that does not come from the Form 990 and its
associated schedules. This means that we can ignore all change log rows that do
not contain the text "990," and which do not pertain to the .xsd files included
here.

The IRS schemas can be found at:

    https://www.irs.gov/pub/irs-schema/

The contents of this repository are covered by the MIT 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.

About

Code for adding metadata to IRS 990 change logs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 74.6%
  • R 25.4%