spb/cancerindex
Public
TypeScript 97.2%
SQL 1.5%
CSS 0.6%
JavaScript 0.5%
1/** Canonical geography seed (CLAUDE.md §117). ISO 3166-1; WHO regions per WHO membership lists. */2export interface GeographySeed {3 slug: string;4 name: string;5 kind: 'world' | 'region' | 'who_region' | 'country' | 'subdivision';6 iso2?: string;7 iso3?: string;8 parentSlug?: string;9 whoRegion?: string;10}1112const WHO_REGIONS: Array<[string, string]> = [13 ['who-afro', 'WHO African Region'],14 ['who-amro', 'WHO Region of the Americas'],15 ['who-searo', 'WHO South-East Asia Region'],16 ['who-euro', 'WHO European Region'],17 ['who-emro', 'WHO Eastern Mediterranean Region'],18 ['who-wpro', 'WHO Western Pacific Region'],19];2021// [iso2, iso3, name, whoRegion]22const COUNTRIES: Array<[string, string, string, string]> = [23 ['US', 'USA', 'United States', 'who-amro'],24 ['CA', 'CAN', 'Canada', 'who-amro'],25 ['MX', 'MEX', 'Mexico', 'who-amro'],26 ['BR', 'BRA', 'Brazil', 'who-amro'],27 ['AR', 'ARG', 'Argentina', 'who-amro'],28 ['CL', 'CHL', 'Chile', 'who-amro'],29 ['CO', 'COL', 'Colombia', 'who-amro'],30 ['PE', 'PER', 'Peru', 'who-amro'],31 ['CU', 'CUB', 'Cuba', 'who-amro'],32 ['GB', 'GBR', 'United Kingdom', 'who-euro'],33 ['IE', 'IRL', 'Ireland', 'who-euro'],34 ['FR', 'FRA', 'France', 'who-euro'],35 ['DE', 'DEU', 'Germany', 'who-euro'],36 ['IT', 'ITA', 'Italy', 'who-euro'],37 ['ES', 'ESP', 'Spain', 'who-euro'],38 ['PT', 'PRT', 'Portugal', 'who-euro'],39 ['NL', 'NLD', 'Netherlands', 'who-euro'],40 ['BE', 'BEL', 'Belgium', 'who-euro'],41 ['CH', 'CHE', 'Switzerland', 'who-euro'],42 ['AT', 'AUT', 'Austria', 'who-euro'],43 ['SE', 'SWE', 'Sweden', 'who-euro'],44 ['NO', 'NOR', 'Norway', 'who-euro'],45 ['DK', 'DNK', 'Denmark', 'who-euro'],46 ['FI', 'FIN', 'Finland', 'who-euro'],47 ['IS', 'ISL', 'Iceland', 'who-euro'],48 ['PL', 'POL', 'Poland', 'who-euro'],49 ['CZ', 'CZE', 'Czechia', 'who-euro'],50 ['HU', 'HUN', 'Hungary', 'who-euro'],51 ['GR', 'GRC', 'Greece', 'who-euro'],52 ['RO', 'ROU', 'Romania', 'who-euro'],53 ['UA', 'UKR', 'Ukraine', 'who-euro'],54 ['RU', 'RUS', 'Russian Federation', 'who-euro'],55 ['TR', 'TUR', 'Türkiye', 'who-euro'],56 ['IL', 'ISR', 'Israel', 'who-euro'],57 ['EG', 'EGY', 'Egypt', 'who-emro'],58 ['SA', 'SAU', 'Saudi Arabia', 'who-emro'],59 ['IR', 'IRN', 'Iran', 'who-emro'],60 ['PK', 'PAK', 'Pakistan', 'who-emro'],61 ['MA', 'MAR', 'Morocco', 'who-emro'],62 ['NG', 'NGA', 'Nigeria', 'who-afro'],63 ['ZA', 'ZAF', 'South Africa', 'who-afro'],64 ['KE', 'KEN', 'Kenya', 'who-afro'],65 ['ET', 'ETH', 'Ethiopia', 'who-afro'],66 ['GH', 'GHA', 'Ghana', 'who-afro'],67 ['UG', 'UGA', 'Uganda', 'who-afro'],68 ['TZ', 'TZA', 'Tanzania', 'who-afro'],69 ['DZ', 'DZA', 'Algeria', 'who-afro'],70 ['IN', 'IND', 'India', 'who-searo'],71 ['BD', 'BGD', 'Bangladesh', 'who-searo'],72 ['ID', 'IDN', 'Indonesia', 'who-searo'],73 ['TH', 'THA', 'Thailand', 'who-searo'],74 ['NP', 'NPL', 'Nepal', 'who-searo'],75 ['LK', 'LKA', 'Sri Lanka', 'who-searo'],76 ['CN', 'CHN', 'China', 'who-wpro'],77 ['JP', 'JPN', 'Japan', 'who-wpro'],78 ['KR', 'KOR', 'Republic of Korea', 'who-wpro'],79 ['AU', 'AUS', 'Australia', 'who-wpro'],80 ['NZ', 'NZL', 'New Zealand', 'who-wpro'],81 ['SG', 'SGP', 'Singapore', 'who-wpro'],82 ['MY', 'MYS', 'Malaysia', 'who-wpro'],83 ['PH', 'PHL', 'Philippines', 'who-wpro'],84 ['VN', 'VNM', 'Viet Nam', 'who-wpro'],85];8687const US_STATES: Array<[string, string]> = [88 ['AL', 'Alabama'], ['AK', 'Alaska'], ['AZ', 'Arizona'], ['AR', 'Arkansas'], ['CA', 'California'], ['CO', 'Colorado'], ['CT', 'Connecticut'], ['DE', 'Delaware'], ['DC', 'District of Columbia'], ['FL', 'Florida'], ['GA', 'Georgia'], ['HI', 'Hawaii'], ['ID', 'Idaho'], ['IL', 'Illinois'], ['IN', 'Indiana'], ['IA', 'Iowa'], ['KS', 'Kansas'], ['KY', 'Kentucky'], ['LA', 'Louisiana'], ['ME', 'Maine'], ['MD', 'Maryland'], ['MA', 'Massachusetts'], ['MI', 'Michigan'], ['MN', 'Minnesota'], ['MS', 'Mississippi'], ['MO', 'Missouri'], ['MT', 'Montana'], ['NE', 'Nebraska'], ['NV', 'Nevada'], ['NH', 'New Hampshire'], ['NJ', 'New Jersey'], ['NM', 'New Mexico'], ['NY', 'New York'], ['NC', 'North Carolina'], ['ND', 'North Dakota'], ['OH', 'Ohio'], ['OK', 'Oklahoma'], ['OR', 'Oregon'], ['PA', 'Pennsylvania'], ['RI', 'Rhode Island'], ['SC', 'South Carolina'], ['SD', 'South Dakota'], ['TN', 'Tennessee'], ['TX', 'Texas'], ['UT', 'Utah'], ['VT', 'Vermont'], ['VA', 'Virginia'], ['WA', 'Washington'], ['WV', 'West Virginia'], ['WI', 'Wisconsin'], ['WY', 'Wyoming'],89];9091const CA_PROVINCES: Array<[string, string]> = [92 ['AB', 'Alberta'], ['BC', 'British Columbia'], ['MB', 'Manitoba'], ['NB', 'New Brunswick'], ['NL', 'Newfoundland and Labrador'], ['NS', 'Nova Scotia'], ['NT', 'Northwest Territories'], ['NU', 'Nunavut'], ['ON', 'Ontario'], ['PE', 'Prince Edward Island'], ['QC', 'Quebec'], ['SK', 'Saskatchewan'], ['YT', 'Yukon'],93];9495export const GEOGRAPHY_SEED: GeographySeed[] = [96 { slug: 'world', name: 'World', kind: 'world' },97 ...WHO_REGIONS.map(([slug, name]) => ({ slug, name, kind: 'who_region' as const, parentSlug: 'world' })),98 ...COUNTRIES.map(([iso2, iso3, name, who]) => ({ slug: name.toLowerCase().replace(/[^a-z0-9]+/g, '-'), name, kind: 'country' as const, iso2, iso3, parentSlug: who, whoRegion: who })),99 ...US_STATES.map(([code, name]) => ({ slug: `us-${code.toLowerCase()}`, name, kind: 'subdivision' as const, iso2: `US-${code}`, parentSlug: 'united-states', whoRegion: 'who-amro' })),100 ...CA_PROVINCES.map(([code, name]) => ({ slug: `ca-${code.toLowerCase()}`, name, kind: 'subdivision' as const, iso2: `CA-${code}`, parentSlug: 'canada', whoRegion: 'who-amro' })),101];102