SPB Git

spb/airiskindex Public

The most methodologically rigorous, fully transparent AI job-exposure index.

TypeScript 88% Python 6.1% SQL 2.7% CSS 1.2% JavaScript 0.9% Shell 0.8%
1.6 KB · 45 lines typescript
Raw Blame History
1//  File:    soc-groups.ts2//  Path:    apps/web/lib/soc-groups.ts3//  Project: AI Risk Index — airiskindex.io4//  Author:  Simon-Pierre Boucher5//  Contact: contact@spboucher.ai6//  Copyright © 2026 Simon-Pierre Boucher. All rights reserved.7//8//  Description: SOC 2018 major-group names and wage formatting helpers.910/** SOC 2018 major groups — first two digits of the O*NET-SOC code. */11export const SOC_MAJOR_GROUPS: Record<string, string> = {12  "11": "Management",13  "13": "Business & Financial Operations",14  "15": "Computer & Mathematical",15  "17": "Architecture & Engineering",16  "19": "Life, Physical & Social Science",17  "21": "Community & Social Service",18  "23": "Legal",19  "25": "Educational Instruction & Library",20  "27": "Arts, Design, Entertainment, Sports & Media",21  "29": "Healthcare Practitioners & Technical",22  "31": "Healthcare Support",23  "33": "Protective Service",24  "35": "Food Preparation & Serving",25  "37": "Building & Grounds Cleaning & Maintenance",26  "39": "Personal Care & Service",27  "41": "Sales & Related",28  "43": "Office & Administrative Support",29  "45": "Farming, Fishing & Forestry",30  "47": "Construction & Extraction",31  "49": "Installation, Maintenance & Repair",32  "51": "Production",33  "53": "Transportation & Material Moving",34  "55": "Military Specific",35};3637export function socGroupName(code: string): string {38  return SOC_MAJOR_GROUPS[code.slice(0, 2)] ?? "Other";39}4041export function formatWage(cents: number | null): string | null {42  if (cents == null) return null;43  return `$${Math.round(cents / 100).toLocaleString("en-US")}/yr`;44}45