diff options
| author | benj <benj@rse8.com> | 2026-04-10 11:13:34 +0800 |
|---|---|---|
| committer | benj <benj@rse8.com> | 2026-04-10 11:13:34 +0800 |
| commit | 493746b14c1251a45b061d2e3edd9160c929d2b9 (patch) | |
| tree | 1607cceb94c1aac1a17a01bb5c0d71b97342e892 /web/ui/src/lib/datasets.ts | |
| parent | c041641634650c31e03c70dcad132fd94cb08e63 (diff) | |
| download | tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.gz tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.bz2 tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.lz tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.xz tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.tar.zst tidyindex-493746b14c1251a45b061d2e3edd9160c929d2b9.zip | |
a basic ui and landing web interface for tidyindex.com
Diffstat (limited to 'web/ui/src/lib/datasets.ts')
| -rw-r--r-- | web/ui/src/lib/datasets.ts | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/web/ui/src/lib/datasets.ts b/web/ui/src/lib/datasets.ts new file mode 100644 index 0000000..83c2e4e --- /dev/null +++ b/web/ui/src/lib/datasets.ts @@ -0,0 +1,46 @@ +/** + * The shared list of dataset slugs a user can scope an API key to. + * Used by the create-key form, the key scope display, and the usage + * breakdown. The order here is the order they show up in the UI. + */ +export const DATASETS = [ + 'irs-990', + 'irs-990pf', + 'sec-edgar', + 'sec-13f', + 'sec-form4', + 'fec-contributions', + 'lobbying-federal', + 'usaspending', + 'pacer', + 'state-corps', + 'ucc-filings', + 'fda-faers', + 'osha', + 'nih-reporter', + 'cfpb-complaints' +] as const; + +export type DatasetSlug = (typeof DATASETS)[number]; + +/** Friendly short label for a dataset slug. */ +export function datasetLabel(slug: string): string { + switch (slug) { + case 'irs-990': return 'IRS 990'; + case 'irs-990pf': return 'IRS 990-PF'; + case 'sec-edgar': return 'SEC EDGAR'; + case 'sec-13f': return 'SEC 13-F'; + case 'sec-form4': return 'SEC Form 4'; + case 'fec-contributions': return 'FEC contributions'; + case 'lobbying-federal': return 'Federal lobbying'; + case 'usaspending': return 'USAspending'; + case 'pacer': return 'PACER'; + case 'state-corps': return 'State incorporation'; + case 'ucc-filings': return 'UCC filings'; + case 'fda-faers': return 'FDA FAERS'; + case 'osha': return 'OSHA inspections'; + case 'nih-reporter': return 'NIH RePORTER'; + case 'cfpb-complaints': return 'CFPB complaints'; + default: return slug; + } +} |
