Project

ntee

0.0
No commit activity in last 3 years
No release in over 3 years
Utilities to support the Urban Institute's National Taxonomy of Exempt Entities
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
 Project Readme

ntee: a Ruby API for NTEE non-profit categorization

The ntee gem gives you a nice Ruby API for dealing with NTEE categories as objects. You can look up categories and their descriptions by NTEE code and navigate the taxonomy as a tree.

Example

category = NTEE.category("R61")

category.code      # "R61"
category.name      # "Reproductive Rights"
category.parent    # NTEE.category("R60") - "Civil Liberties"
category.ancestors # [NTEE.category("R60"), NTEE.category("R")]

Easy-peasy!

There is also a helper method to make this easy to build Rails selection dropdowns

  NTEE.as_list

search_dimensions integration

The file lib/ntee/search_dimension.rb defines a few classes you can use in conjunction with Gively's search_dimensions gem to deal with NTEE categories stored in a Solr search index. NTEE::HierarchicalDimension lets you treat the categories as a hierarchical tree, and NTEE::FlatDimension lets you treat them as a plain string field.

Licensing

This gem is Copyright © 2011-2012 Gively, Inc. and is released under the MIT license. For more details, please see the LICENSE file.

Testing and Debugging

To test in console

bundle install
bundle exec rake test:console