Skip to content

Split legacy single-letter industry codes into industry_letter (#16)#18

Open
fgregg wants to merge 2 commits into
mainfrom
split-industry-letter
Open

Split legacy single-letter industry codes into industry_letter (#16)#18
fgregg wants to merge 2 commits into
mainfrom
split-industry-letter

Conversation

@fgregg

@fgregg fgregg commented May 31, 2026

Copy link
Copy Markdown
Contributor

What

Splits the legacy pre-2005 single-letter FMCS industry codes out of the industry column into a new industry_letter column.

Why

Before ~2005 the industry field carried a single-letter code (E, J, C, L, …) instead of a NAICS code or a spelled-out sector name (see #16 §1), so industry mixed two incompatible taxonomies. After this change:

  • industry_letter — the legacy single-letter code (1996–2004 records only; ~180k rows)
  • industry — only the modern spelled-out sector names (2005+)
  • naics — unchanged

Mechanical change in scripts/to_csv.py: any industry value that is a single A–Z letter is moved to industry_letter and blanked from industry. Non-letter values (Not Provided, Other…, spelled-out names) are untouched. Letters and NAICS never co-occur on a record, so no information is lost.

fgregg added 2 commits May 31, 2026 12:22
Pre-2005 records carry a single-letter FMCS industry code in the `industry`
field instead of a NAICS code or spelled-out sector. Route those single-letter
values into a new `industry_letter` column so `industry` holds only the modern
spelled-out names. ~180k rows (1996-2004) are affected; letters and NAICS never
co-occur, so no data is lost.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant