/**
 * The 50 US states + the District of Columbia, keyed by Census/NCES FIPS code.
 * Territories (PR, GU, etc.) are intentionally excluded — the request was
 * "all 50 states". DC is included because it operates SLED education agencies
 * and the customer asked for nationwide coverage; it is labelled distinctly.
 */
export const JURISDICTIONS = [
  { fips: 1, usps: 'AL', name: 'Alabama' },
  { fips: 2, usps: 'AK', name: 'Alaska' },
  { fips: 4, usps: 'AZ', name: 'Arizona' },
  { fips: 5, usps: 'AR', name: 'Arkansas' },
  { fips: 6, usps: 'CA', name: 'California' },
  { fips: 8, usps: 'CO', name: 'Colorado' },
  { fips: 9, usps: 'CT', name: 'Connecticut' },
  { fips: 10, usps: 'DE', name: 'Delaware' },
  { fips: 11, usps: 'DC', name: 'District of Columbia' },
  { fips: 12, usps: 'FL', name: 'Florida' },
  { fips: 13, usps: 'GA', name: 'Georgia' },
  { fips: 15, usps: 'HI', name: 'Hawaii' },
  { fips: 16, usps: 'ID', name: 'Idaho' },
  { fips: 17, usps: 'IL', name: 'Illinois' },
  { fips: 18, usps: 'IN', name: 'Indiana' },
  { fips: 19, usps: 'IA', name: 'Iowa' },
  { fips: 20, usps: 'KS', name: 'Kansas' },
  { fips: 21, usps: 'KY', name: 'Kentucky' },
  { fips: 22, usps: 'LA', name: 'Louisiana' },
  { fips: 23, usps: 'ME', name: 'Maine' },
  { fips: 24, usps: 'MD', name: 'Maryland' },
  { fips: 25, usps: 'MA', name: 'Massachusetts' },
  { fips: 26, usps: 'MI', name: 'Michigan' },
  { fips: 27, usps: 'MN', name: 'Minnesota' },
  { fips: 28, usps: 'MS', name: 'Mississippi' },
  { fips: 29, usps: 'MO', name: 'Missouri' },
  { fips: 30, usps: 'MT', name: 'Montana' },
  { fips: 31, usps: 'NE', name: 'Nebraska' },
  { fips: 32, usps: 'NV', name: 'Nevada' },
  { fips: 33, usps: 'NH', name: 'New Hampshire' },
  { fips: 34, usps: 'NJ', name: 'New Jersey' },
  { fips: 35, usps: 'NM', name: 'New Mexico' },
  { fips: 36, usps: 'NY', name: 'New York' },
  { fips: 37, usps: 'NC', name: 'North Carolina' },
  { fips: 38, usps: 'ND', name: 'North Dakota' },
  { fips: 39, usps: 'OH', name: 'Ohio' },
  { fips: 40, usps: 'OK', name: 'Oklahoma' },
  { fips: 41, usps: 'OR', name: 'Oregon' },
  { fips: 42, usps: 'PA', name: 'Pennsylvania' },
  { fips: 44, usps: 'RI', name: 'Rhode Island' },
  { fips: 45, usps: 'SC', name: 'South Carolina' },
  { fips: 46, usps: 'SD', name: 'South Dakota' },
  { fips: 47, usps: 'TN', name: 'Tennessee' },
  { fips: 48, usps: 'TX', name: 'Texas' },
  { fips: 49, usps: 'UT', name: 'Utah' },
  { fips: 50, usps: 'VT', name: 'Vermont' },
  { fips: 51, usps: 'VA', name: 'Virginia' },
  { fips: 53, usps: 'WA', name: 'Washington' },
  { fips: 54, usps: 'WV', name: 'West Virginia' },
  { fips: 55, usps: 'WI', name: 'Wisconsin' },
  { fips: 56, usps: 'WY', name: 'Wyoming' },
];

/** NCES CCD agency_type code -> human label. */
export const AGENCY_TYPE = {
  1: 'Regular local school district',
  2: 'Local school district (component of a supervisory union)',
  3: 'Supervisory union administrative center',
  4: 'Regional Education Service Agency (RESA)',
  5: 'State education agency / state-operated institution',
  6: 'Federally operated education agency',
  7: 'Charter school agency',
  8: 'Other education agency',
  9: 'Specialized public school district',
};

export const STATE_BY_FIPS = Object.fromEntries(JURISDICTIONS.map((j) => [j.fips, j]));
export const FIPS_COUNT = JURISDICTIONS.length;
