This repository contains scripts and data files used for defining the Spatially Business Classification (SBC) system and for relating it to SIC and NAICS 2017 systems.
Of the various data files below, the following are essentially identical to files available from census.gov
. [The
only difference is conversion from xls
to csv
, and re-naming.]
n17_original.csv
lookup_1_sic_n07.psv
lookup_2_n07_n12.psv
lookup_3_n12_n17.psv
SIC = Standard Industrial Classification. Long-deprecated but still used byt many.
NAICS = North American Industry Classification System: The modern, accepted system for classifying businesses.
psv = pipe-separated value
There are two distinct groups of files / scripts in this directory.
Input files:
n17_original.csv
: The original file defining the NAICS 2017 codesn17_flat.csv
: A flattened version ofn17_original.csv
n17_flat_tagged.csv
: A manually marked-up version ofn17_flat.csv
. The extra information that has been added to this file is understood by the scriptz_map_n17_to_sbc.py
.
Scripts:
z_map_n17_to_sbc.py
: The script that creates the actual look-up table.
Output files:
lookup_n17_sbc.psv
: A mapping between NAICS2017 codes and SBC classessbc_list.psv
: A full list of the SBC classes
This group of files / scripts establishes a mapping between SIC codes and NAICS 2017 codes. This involves concatenating several look-up table operations.
Input files:
lookup_1_sic_n07.psv
: Maps SIC codes to NAICS 2007 codeslookup_2_n07_n12.psv
: Maps NAICS 2007 codes to NAICS 2012 codeslookup_3_n12_n17.psv
: Maps NAICS 2012 codes to NAICS 2017 codeslookup_sic_n17_fixed.psv
: A manually created file that establishes some otherwise unknown mappings
Scripts:
z_combine_lookups.py
: Combines the lookup tables listed above.
Output files:
lookup_sic_n17.psv
: Mapping from SIC directly to NAICS 2017.