naics_codes
NAICS 2022 code hierarchy, fully denormalized. One row per NAICS code at all hierarchy depths (2- through 6-digit), plus QCEW compound codes (31-33, 44-45, 48-49) and the synthetic 'Total all industries' code (10). Includes parent titles at each level and sector/goods-producing flags.
overview
All NAICS 2022 codes (2-through 6-digit) plus QCEW compound codes (31-33, 44-45, 48-49) and synthetic total code (10). ~1,100 rows.
current vintage — NAICS 2022
history — NAICS 2017 and 2022 differ in some codes; use vintage column to identify
source & licensing
fields
| name | type | definition |
|---|---|---|
| hierarchy_depth | int64 | Number of significant digits in the NAICS code, indicating its position in the classification hierarchy: 2=sector, 3=subsector, 4=industry group, 5=industry, 6=national industry. QCEW compound codes (e.g. '31-33') are assigned depth=2. |
| is_goods_producing | bool | True if this NAICS code belongs to a goods-producing sector (Agriculture/Forestry/Fishing/Hunting: 11, Mining: 21, Construction: 23, or Manufacturing: 31-33) per BLS classification. False otherwise. |
| is_service_producing | bool | True if this NAICS code belongs to a service-producing sector, defined as all sectors excluding goods-producing sectors and Government (92) per BLS classification. Mutually exclusive with is_goods_producing except for Government codes. |
| naics_2digit | string | The 2-digit sector code that is the top-level ancestor of this NAICS code. Null for QCEW-specific compound codes that do not map cleanly to a single sector. |
| naics_2digit_title | string | Official NAICS title for the 2-digit sector ancestor. Null when naics_2digit is null. |
| naics_3digit | string | The 3-digit subsector code ancestor of this NAICS code. Null for codes at the 2-digit sector level or for QCEW compound codes. |
| naics_3digit_title | string | Official NAICS title for the 3-digit subsector ancestor. Null when naics_3digit is null. |
| naics_4digit | string | The 4-digit industry group code ancestor of this NAICS code. Null for codes with hierarchy_depth less than 4. |
| naics_4digit_title | string | Official NAICS title for the 4-digit industry group ancestor. Null when naics_4digit is null. |
| naics_5digit | string | The 5-digit industry code ancestor of this NAICS code. Null for codes with hierarchy_depth less than 5. |
| naics_5digit_title | string | Official NAICS title for the 5-digit industry ancestor. Null when naics_5digit is null. |
| naics_codekey | string | NAICS classification code as a string, ranging from 2-digit sector codes to 6-digit national industry codes, including QCEW-specific compound codes such as '31-33'. Serves as the primary key for this dimension table.Joins dim.naics_codes on naics_code. |
| naics_title | string | Official title assigned to this NAICS code by the Census Bureau, corresponding to the sector, subsector, industry group, industry, or national industry level represented by the code. |
| sector_label | string | Human-readable label for the top-level sector derived from the 2-digit NAICS prefix (e.g. 'Manufacturing', 'Healthcare'). Provides a display-friendly alternative to the raw 2-digit code. |
| vintage | string | The edition year of the NAICS classification system under which these codes and titles are defined. Currently always '2022', reflecting the most recent NAICS revision used in this catalog. |
joins
how to use this table
Census flat file is denormalized: parent codes at 2-, 3-, 4-, and 5-digit levels are added via self-joins. QCEW compound codes (31-33 etc.) are appended manually as they are not in the Census file.
Exact code matching across years without checking vintage; NAICS codes sometimes change between revisions