/** * Copyright (c) 2019-2025 Mark Sandford * Licensed under the MIT License. See LICENSE and NOTICE files. */ /** * Industry sector enumeration */ export declare enum IndustrySector { AGRIBUSINESS = "Agribusiness", COMMUNICATIONS_ELECTRONICS = "Communications/Electronics", CONSTRUCTION = "Construction", DEFENSE = "Defense", ENERGY_NATURAL_RESOURCES = "Energy/Natural Resources", FINANCE_INSURANCE_REAL_ESTATE = "Finance/Insurance/Real Estate", HEALTH = "Health", LAWYERS_LOBBYISTS = "Lawyers & Lobbyists", TRANSPORTATION = "Transportation", MISC_BUSINESS = "Misc Business", LABOR = "Labor", IDEOLOGY_SINGLE_ISSUE = "Ideology/Single-Issue", OTHER = "Other" } /** * Detailed industry category under each sector */ export interface IndustryCategory { sector: IndustrySector; category: string; keywords: string[]; occupationKeywords?: string[]; } /** * Categorized contribution with industry classification */ export interface CategorizedContribution { sector: IndustrySector; category: string; confidence: 'high' | 'medium' | 'low'; matchedKeyword?: string; matchSource: 'employer' | 'occupation' | 'inferred'; } /** * Categorize a contribution based on employer and occupation */ export declare function categorizeContribution(employer?: string, occupation?: string): CategorizedContribution; /** * Aggregate contributions by industry sector. * Uses smart categorization when contributor_name is available, * falling back to PAC name matching for unclassified contributions. */ export declare function aggregateByIndustrySector(contributions: Array<{ contributor_employer?: string; contributor_occupation?: string; contributor_name?: string; contribution_receipt_amount: number; }>): Array<{ sector: IndustrySector; totalAmount: number; contributionCount: number; percentage: number; categories: Map; }>; /** * Categorize a PAC/committee by its name * Used for committee-to-committee transfers and PAC contributions */ export declare function categorizePACByName(committeeName?: string): CategorizedContribution; /** * Smart categorization: tries employer/occupation first, then falls back to contributor name (for PACs) */ export declare function categorizeContributionSmart(employer?: string, occupation?: string, contributorName?: string): CategorizedContribution; /** * Get top categories across all sectors */ export declare function getTopCategories(contributions: Array<{ contributor_employer?: string; contributor_occupation?: string; contributor_name?: string; contribution_receipt_amount: number; }>, limit?: number): Array<{ sector: IndustrySector; category: string; totalAmount: number; contributionCount: number; percentage: number; }>; //# sourceMappingURL=industry-taxonomy.d.ts.map