Giter VIP home page Giter VIP logo

csi's Introduction

Classification of Standard Industry

The North American Industry Classification System (NAICS) is used by business and government to classify business establishments according to type of economic activity (process of production) in Canada, Mexico and the United States. It has largely replaced the older Standard Industrial Classification (SIC) system; however, certain government departments and agencies, such as the U.S. Securities and Exchange Commission (SEC), still use the SIC codes. CSI helps you look those codes up.

Installation

This is a Ruby gem, so you'll need a little Ruby-fu to get it working. If you're not familiar with Ruby, there are CSV and TOML data sets available too that you can load into a spreadsheet, database or parse in your favorite programming language.

For Rubyists:

gem install csi

Or add this to your Gemfile:

gem 'csi', '~> 0.3.3'

For everyone else:

  • All NAICS and SIC codes, classifications, and correlations in TOML
  • NAICS codes and classifications in CSV
  • SIC codes and clasifications in CSV

Usage

You can look up 2-6 digits NAICS codes and 2-4 digit SIC codes. Please note: If you ever cast the String codes to Integers, you're gonna have a bad time. SIC code 011 is 011 as a String and 11 as an Integer. The more you know ๐Ÿ’ซ

naics_record = CSI::naics "928110"
# => <CSI::Record:0x007fb3c5fdbb98]

naics_record.name
# => "National Security"

CSI::naics("336992").name
# => Military Armored Vehicle, Tank, and Tank Component Manufacturing

CSI::naics("611310").name
# => Colleges, Universities, and Professional Schools

CSI::sic("8211").name
# => Elementary and Secondary Schools

CSI::sic("91")
# => "Executive, Legislative, and General Government, except Finance"

You can also lookup correlating SIC codes for NAICS codes and vice-versa!

naics_record = CSI::naics("928110")
# => <CSI::Record:0x007fb3c5fdbb98]

naics_record.name
# => "National Security"

naics_record.correlations
# => "["9711"]"

correlating_sic_record = CSI::sic naics_record.correlations.first
# => <CSI::Record:0x007fd0bd9a4fd0>

correlating_sic_record.name
# => "National Security"

NAICS & SIC Overview

Explaining NAICS and SIC is outside the scope of this README, but you'll find an extremely brief overview below. For more information you can check out the SIC page and NAICS page on Wikipeda.

Digit range NAICS Definition SIC Definition
1 - 2 Sector Major Group
1 - 3 Subsector Industry Group
1 - 4 Industry Group Industry
1 -5 NAICS Industry N/A
1 -6 National N/A

The larger the coode, the more specific the industry. Here's a NAICS example:

Code Name
48 Transportation & Warehousing (over arching industry and sub-sectors)
481 Air transportation
4812 Nonscheduled air transportation
48121 Nonscheduled air transportation
481212 Nonscheduled chartered freight air transportation

Data Sources

All codes and classifications obtained via http://www.census.gov, so you know it's legit.

Copyright

Copyright (c) 2013 Lee Reilly. See LICENSE.md for further details.

Many Bothans died to bring you this information.

csi's People

Contributors

leereilly 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

csi's Issues

Warning about typo

Hey,

I'm using CSI 0.3.1 and everytime I do something in console I see a warning
/Users/pkrefta/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/csi-0.3.1/lib/csi/record.rb:16: warning: found = in conditional, should be ==
I've seen a commit fixing this but has it been released ?

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.