| 1 | |
| 2 | |
| 3 | import type { PartyCode } from "@/lib/neutrality"; |
| 4 | |
| 5 | export type Chamber = "HOUSE" | "SENATE" | "USASPENDING" | "TREASURY" | "CBO"; |
| 6 | |
| 7 | export type RegisterAction = { |
| 8 | id: string; |
| 9 | time: string; |
| 10 | iso: string; |
| 11 | chamber: Chamber; |
| 12 | label: string; |
| 13 | actionType: |
| 14 | | "FAILED" |
| 15 | | "PASSED" |
| 16 | | "CLOTURE OK" |
| 17 | | "CLOTURE FAIL" |
| 18 | | "INTRODUCED" |
| 19 | | "REPORTED" |
| 20 | | "SIGNED" |
| 21 | | "AWARD" |
| 22 | | "OUTLAY" |
| 23 | | "DEBT"; |
| 24 | result: string; |
| 25 | billHref?: string; |
| 26 | sourceUrl: string; |
| 27 | amountUsd?: number; |
| 28 | affectedEstimate?: number; |
| 29 | }; |
| 30 | |
| 31 | export type TimelineEntry = { |
| 32 | date: string; |
| 33 | label: string; |
| 34 | chamber?: Chamber; |
| 35 | sourceUrl: string; |
| 36 | }; |
| 37 | |
| 38 | export type Bill = { |
| 39 | id: string; |
| 40 | number: string; |
| 41 | congress: number; |
| 42 | title: string; |
| 43 | sponsor: { name: string; party: PartyCode; state: string; sourceUrl: string }; |
| 44 | policyArea: string; |
| 45 | introducedDate: string; |
| 46 | status: string; |
| 47 | cbo?: { amountUsd: number; sourceUrl: string }; |
| 48 | votes: Array<{ |
| 49 | id: string; |
| 50 | chamber: "HOUSE" | "SENATE"; |
| 51 | date: string; |
| 52 | question: string; |
| 53 | yea: number; |
| 54 | nay: number; |
| 55 | present: number; |
| 56 | result: "passed" | "failed"; |
| 57 | sourceUrl: string; |
| 58 | }>; |
| 59 | cosponsors: PartyCode[]; |
| 60 | timeline: TimelineEntry[]; |
| 61 | sourceUrl: string; |
| 62 | }; |
| 63 | |
| 64 | export type Award = { |
| 65 | id: string; |
| 66 | agency: string; |
| 67 | recipient: string; |
| 68 | amountUsd: number; |
| 69 | actionDate: string; |
| 70 | program: string; |
| 71 | sourceUrl: string; |
| 72 | }; |
| 73 | |
| 74 | export type FiscalMetric = { |
| 75 | id: string; |
| 76 | metric: string; |
| 77 | valueUsd: number; |
| 78 | asOf: string; |
| 79 | deltaLabel: string; |
| 80 | sourceUrl: string; |
| 81 | }; |
| 82 | |
| 83 | export type StateCoverage = { |
| 84 | code: string; |
| 85 | name: string; |
| 86 | level: "full" | "partial" | "lagging"; |
| 87 | lastSeen: string; |
| 88 | billsThisWeek: number; |
| 89 | sourceUrl: string; |
| 90 | }; |
| 91 | |
| 92 | |
| 93 | export const REGISTER_ACTIONS: RegisterAction[] = [ |
| 94 | { |
| 95 | id: "a1", |
| 96 | time: "14:02 ET", |
| 97 | iso: "2026-06-26T18:02:00Z", |
| 98 | chamber: "HOUSE", |
| 99 | label: "H.R. 22", |
| 100 | actionType: "FAILED", |
| 101 | result: "209-214", |
| 102 | billHref: "/bill/hr-22-119", |
| 103 | sourceUrl: "https://clerk.house.gov/evs/2026/roll300.xml", |
| 104 | affectedEstimate: 0, |
| 105 | }, |
| 106 | { |
| 107 | id: "a2", |
| 108 | time: "13:47 ET", |
| 109 | iso: "2026-06-26T17:47:00Z", |
| 110 | chamber: "SENATE", |
| 111 | label: "S. 1582", |
| 112 | actionType: "CLOTURE OK", |
| 113 | result: "62-38", |
| 114 | billHref: "/bill/s-1582-119", |
| 115 | sourceUrl: "https://www.senate.gov/legislative/LIS/roll_call_votes/vote1192/vote_119_2_00150.htm", |
| 116 | }, |
| 117 | { |
| 118 | id: "a3", |
| 119 | time: "13:31 ET", |
| 120 | iso: "2026-06-26T17:31:00Z", |
| 121 | chamber: "USASPENDING", |
| 122 | label: "DoD", |
| 123 | actionType: "AWARD", |
| 124 | result: "$2,100,000,000", |
| 125 | amountUsd: 2_100_000_000, |
| 126 | sourceUrl: "https://www.usaspending.gov/award/ASST_NON_AWARD_FAKE_001", |
| 127 | }, |
| 128 | { |
| 129 | id: "a4", |
| 130 | time: "12:58 ET", |
| 131 | iso: "2026-06-26T16:58:00Z", |
| 132 | chamber: "HOUSE", |
| 133 | label: "H.R. 3401", |
| 134 | actionType: "REPORTED", |
| 135 | result: "Committee", |
| 136 | billHref: "/bill/hr-3401-119", |
| 137 | sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/3401/actions", |
| 138 | }, |
| 139 | { |
| 140 | id: "a5", |
| 141 | time: "11:40 ET", |
| 142 | iso: "2026-06-26T15:40:00Z", |
| 143 | chamber: "TREASURY", |
| 144 | label: "DTS", |
| 145 | actionType: "OUTLAY", |
| 146 | result: "$184.2B", |
| 147 | amountUsd: 184_200_000_000, |
| 148 | sourceUrl: "https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/operating-cash-balance", |
| 149 | }, |
| 150 | { |
| 151 | id: "a6", |
| 152 | time: "10:12 ET", |
| 153 | iso: "2026-06-26T14:12:00Z", |
| 154 | chamber: "SENATE", |
| 155 | label: "S. 2044", |
| 156 | actionType: "INTRODUCED", |
| 157 | result: "Read twice", |
| 158 | billHref: "/bill/s-2044-119", |
| 159 | sourceUrl: "https://www.congress.gov/bill/119th-congress/senate-bill/2044", |
| 160 | }, |
| 161 | { |
| 162 | id: "a7", |
| 163 | time: "09:33 ET", |
| 164 | iso: "2026-06-26T13:33:00Z", |
| 165 | chamber: "USASPENDING", |
| 166 | label: "HHS", |
| 167 | actionType: "AWARD", |
| 168 | result: "$612,000,000", |
| 169 | amountUsd: 612_000_000, |
| 170 | sourceUrl: "https://www.usaspending.gov/award/ASST_NON_AWARD_FAKE_002", |
| 171 | }, |
| 172 | { |
| 173 | id: "a8", |
| 174 | time: "08:05 ET", |
| 175 | iso: "2026-06-26T12:05:00Z", |
| 176 | chamber: "HOUSE", |
| 177 | label: "H.R. 22", |
| 178 | actionType: "PASSED", |
| 179 | result: "Motion agreed", |
| 180 | billHref: "/bill/hr-22-119", |
| 181 | sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/22/actions", |
| 182 | }, |
| 183 | ]; |
| 184 | |
| 185 | |
| 186 | export const BILLS: Bill[] = [ |
| 187 | { |
| 188 | id: "hr-22-119", |
| 189 | number: "H.R. 22", |
| 190 | congress: 119, |
| 191 | title: "To amend title 23, United States Code, regarding surface transportation reauthorization", |
| 192 | sponsor: { |
| 193 | name: "A. Marshall", |
| 194 | party: "R", |
| 195 | state: "TX", |
| 196 | sourceUrl: "https://www.congress.gov/member/a-marshall/M001200", |
| 197 | }, |
| 198 | policyArea: "Transportation", |
| 199 | introducedDate: "2026-01-07", |
| 200 | status: "Failed passage in House, 209-214", |
| 201 | cbo: { amountUsd: 48_200_000_000, sourceUrl: "https://www.cbo.gov/publication/59001" }, |
| 202 | votes: [ |
| 203 | { |
| 204 | id: "v1", |
| 205 | chamber: "HOUSE", |
| 206 | date: "2026-06-26", |
| 207 | question: "On passage", |
| 208 | yea: 209, |
| 209 | nay: 214, |
| 210 | present: 4, |
| 211 | result: "failed", |
| 212 | sourceUrl: "https://clerk.house.gov/evs/2026/roll300.xml", |
| 213 | }, |
| 214 | ], |
| 215 | cosponsors: ["R", "R", "R", "D", "D", "R", "I", "D", "R", "R", "D", "R"], |
| 216 | timeline: [ |
| 217 | { date: "2026-01-07", label: "Introduced", chamber: "HOUSE", sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/22" }, |
| 218 | { date: "2026-02-19", label: "Referred to Committee on Transportation", chamber: "HOUSE", sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/22/actions" }, |
| 219 | { date: "2026-04-03", label: "Reported out of Committee", chamber: "HOUSE", sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/22/actions" }, |
| 220 | { date: "2026-06-26", label: "Failed passage, 209-214", chamber: "HOUSE", sourceUrl: "https://clerk.house.gov/evs/2026/roll300.xml" }, |
| 221 | ], |
| 222 | sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/22", |
| 223 | }, |
| 224 | { |
| 225 | id: "s-1582-119", |
| 226 | number: "S. 1582", |
| 227 | congress: 119, |
| 228 | title: "A bill to provide for continuing appropriations for fiscal year 2026", |
| 229 | sponsor: { |
| 230 | name: "P. Okafor", |
| 231 | party: "D", |
| 232 | state: "MI", |
| 233 | sourceUrl: "https://www.congress.gov/member/p-okafor/S001200", |
| 234 | }, |
| 235 | policyArea: "Appropriations", |
| 236 | introducedDate: "2026-03-14", |
| 237 | status: "Cloture invoked, 62-38", |
| 238 | votes: [ |
| 239 | { |
| 240 | id: "v2", |
| 241 | chamber: "SENATE", |
| 242 | date: "2026-06-26", |
| 243 | question: "On the cloture motion", |
| 244 | yea: 62, |
| 245 | nay: 38, |
| 246 | present: 0, |
| 247 | result: "passed", |
| 248 | sourceUrl: "https://www.senate.gov/legislative/LIS/roll_call_votes/vote1192/vote_119_2_00150.htm", |
| 249 | }, |
| 250 | ], |
| 251 | cosponsors: ["D", "D", "I", "D", "R", "D", "D", "R", "D"], |
| 252 | timeline: [ |
| 253 | { date: "2026-03-14", label: "Introduced", chamber: "SENATE", sourceUrl: "https://www.congress.gov/bill/119th-congress/senate-bill/1582" }, |
| 254 | { date: "2026-04-22", label: "Referred to Committee on Appropriations", chamber: "SENATE", sourceUrl: "https://www.congress.gov/bill/119th-congress/senate-bill/1582/actions" }, |
| 255 | { date: "2026-06-26", label: "Cloture invoked, 62-38", chamber: "SENATE", sourceUrl: "https://www.senate.gov/legislative/LIS/roll_call_votes/vote1192/vote_119_2_00150.htm" }, |
| 256 | ], |
| 257 | sourceUrl: "https://www.congress.gov/bill/119th-congress/senate-bill/1582", |
| 258 | }, |
| 259 | { |
| 260 | id: "hr-3401-119", |
| 261 | number: "H.R. 3401", |
| 262 | congress: 119, |
| 263 | title: "To amend the Internal Revenue Code of 1986 regarding treatment of certain research expenditures", |
| 264 | sponsor: { |
| 265 | name: "L. Brennan", |
| 266 | party: "D", |
| 267 | state: "WA", |
| 268 | sourceUrl: "https://www.congress.gov/member/l-brennan/M001300", |
| 269 | }, |
| 270 | policyArea: "Taxation", |
| 271 | introducedDate: "2026-02-02", |
| 272 | status: "Reported out of Committee", |
| 273 | cbo: { amountUsd: 9_700_000_000, sourceUrl: "https://www.cbo.gov/publication/59042" }, |
| 274 | votes: [], |
| 275 | cosponsors: ["D", "D", "R", "R", "D", "D", "R"], |
| 276 | timeline: [ |
| 277 | { date: "2026-02-02", label: "Introduced", chamber: "HOUSE", sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/3401" }, |
| 278 | { date: "2026-03-30", label: "Referred to Committee on Ways and Means", chamber: "HOUSE", sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/3401/actions" }, |
| 279 | { date: "2026-06-26", label: "Reported out of Committee", chamber: "HOUSE", sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/3401/actions" }, |
| 280 | ], |
| 281 | sourceUrl: "https://www.congress.gov/bill/119th-congress/house-bill/3401", |
| 282 | }, |
| 283 | { |
| 284 | id: "s-2044-119", |
| 285 | number: "S. 2044", |
| 286 | congress: 119, |
| 287 | title: "A bill to authorize appropriations for the National Institute of Standards and Technology", |
| 288 | sponsor: { |
| 289 | name: "R. Vance", |
| 290 | party: "R", |
| 291 | state: "OH", |
| 292 | sourceUrl: "https://www.congress.gov/member/r-vance/S001300", |
| 293 | }, |
| 294 | policyArea: "Science", |
| 295 | introducedDate: "2026-06-26", |
| 296 | status: "Introduced, read twice", |
| 297 | votes: [], |
| 298 | cosponsors: ["R", "D"], |
| 299 | timeline: [ |
| 300 | { date: "2026-06-26", label: "Introduced, read twice", chamber: "SENATE", sourceUrl: "https://www.congress.gov/bill/119th-congress/senate-bill/2044" }, |
| 301 | ], |
| 302 | sourceUrl: "https://www.congress.gov/bill/119th-congress/senate-bill/2044", |
| 303 | }, |
| 304 | ]; |
| 305 | |
| 306 | export function getBill(id: string): Bill | undefined { |
| 307 | return BILLS.find((b) => b.id === id); |
| 308 | } |
| 309 | |
| 310 | |
| 311 | export const AWARDS: Award[] = [ |
| 312 | { |
| 313 | id: "w1", |
| 314 | agency: "Department of Defense", |
| 315 | recipient: "Aero Systems Holdings, Inc.", |
| 316 | amountUsd: 2_100_000_000, |
| 317 | actionDate: "2026-06-26", |
| 318 | program: "Aircraft procurement", |
| 319 | sourceUrl: "https://www.usaspending.gov/award/ASST_NON_AWARD_FAKE_001", |
| 320 | }, |
| 321 | { |
| 322 | id: "w2", |
| 323 | agency: "Department of Health and Human Services", |
| 324 | recipient: "State of California - Medicaid", |
| 325 | amountUsd: 612_000_000, |
| 326 | actionDate: "2026-06-26", |
| 327 | program: "Federal share, Medicaid", |
| 328 | sourceUrl: "https://www.usaspending.gov/award/ASST_NON_AWARD_FAKE_002", |
| 329 | }, |
| 330 | { |
| 331 | id: "w3", |
| 332 | agency: "Department of Transportation", |
| 333 | recipient: "Regional Transit Authority", |
| 334 | amountUsd: 284_000_000, |
| 335 | actionDate: "2026-06-25", |
| 336 | program: "Capital investment grants", |
| 337 | sourceUrl: "https://www.usaspending.gov/award/ASST_NON_AWARD_FAKE_003", |
| 338 | }, |
| 339 | { |
| 340 | id: "w4", |
| 341 | agency: "Department of Energy", |
| 342 | recipient: "Grid Operations Cooperative", |
| 343 | amountUsd: 158_000_000, |
| 344 | actionDate: "2026-06-25", |
| 345 | program: "Grid resilience", |
| 346 | sourceUrl: "https://www.usaspending.gov/award/ASST_NON_AWARD_FAKE_004", |
| 347 | }, |
| 348 | { |
| 349 | id: "w5", |
| 350 | agency: "General Services Administration", |
| 351 | recipient: "Civil Works LLC", |
| 352 | amountUsd: 92_000_000, |
| 353 | actionDate: "2026-06-24", |
| 354 | program: "Federal buildings", |
| 355 | sourceUrl: "https://www.usaspending.gov/award/ASST_NON_AWARD_FAKE_005", |
| 356 | }, |
| 357 | ]; |
| 358 | |
| 359 | export const FISCAL_METRICS: FiscalMetric[] = [ |
| 360 | { |
| 361 | id: "f1", |
| 362 | metric: "Total public debt outstanding", |
| 363 | valueUsd: 36_400_000_000_000, |
| 364 | asOf: "2026-06-25", |
| 365 | deltaLabel: "+$48B over 30 days", |
| 366 | sourceUrl: "https://fiscaldata.treasury.gov/datasets/debt-to-the-penny/debt-to-the-penny", |
| 367 | }, |
| 368 | { |
| 369 | id: "f2", |
| 370 | metric: "Federal outlays, month to date", |
| 371 | valueUsd: 184_200_000_000, |
| 372 | asOf: "2026-06-26", |
| 373 | deltaLabel: "Daily Treasury Statement", |
| 374 | sourceUrl: "https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/operating-cash-balance", |
| 375 | }, |
| 376 | { |
| 377 | id: "f3", |
| 378 | metric: "Operating cash balance", |
| 379 | valueUsd: 712_000_000_000, |
| 380 | asOf: "2026-06-26", |
| 381 | deltaLabel: "Treasury, T+1", |
| 382 | sourceUrl: "https://fiscaldata.treasury.gov/datasets/daily-treasury-statement/operating-cash-balance", |
| 383 | }, |
| 384 | ]; |
| 385 | |
| 386 | |
| 387 | export const STATE_COVERAGE: StateCoverage[] = [ |
| 388 | { code: "CA", name: "California", level: "full", lastSeen: "2026-06-26", billsThisWeek: 24, sourceUrl: "https://leginfo.legislature.ca.gov/" }, |
| 389 | { code: "TX", name: "Texas", level: "full", lastSeen: "2026-06-26", billsThisWeek: 19, sourceUrl: "https://capitol.texas.gov/" }, |
| 390 | { code: "NY", name: "New York", level: "full", lastSeen: "2026-06-25", billsThisWeek: 14, sourceUrl: "https://www.nysenate.gov/legislation" }, |
| 391 | { code: "FL", name: "Florida", level: "partial", lastSeen: "2026-06-24", billsThisWeek: 9, sourceUrl: "https://www.flsenate.gov/Session/Bills" }, |
| 392 | { code: "IL", name: "Illinois", level: "full", lastSeen: "2026-06-26", billsThisWeek: 11, sourceUrl: "https://www.ilga.gov/" }, |
| 393 | { code: "PA", name: "Pennsylvania", level: "partial", lastSeen: "2026-06-23", billsThisWeek: 6, sourceUrl: "https://www.legis.state.pa.us/" }, |
| 394 | { code: "OH", name: "Ohio", level: "full", lastSeen: "2026-06-26", billsThisWeek: 8, sourceUrl: "https://www.legislature.ohio.gov/" }, |
| 395 | { code: "GA", name: "Georgia", level: "lagging", lastSeen: "2026-06-20", billsThisWeek: 2, sourceUrl: "https://www.legis.ga.gov/" }, |
| 396 | { code: "NC", name: "North Carolina", level: "partial", lastSeen: "2026-06-22", billsThisWeek: 5, sourceUrl: "https://www.ncleg.gov/" }, |
| 397 | { code: "MI", name: "Michigan", level: "full", lastSeen: "2026-06-26", billsThisWeek: 10, sourceUrl: "https://www.legislature.mi.gov/" }, |
| 398 | ]; |
| 399 | |
| 400 | |
| 401 | export function formatUsd(n: number, opts?: { compact?: boolean }): string { |
| 402 | if (opts?.compact && Math.abs(n) >= 1_000_000_000) { |
| 403 | return `$${(n / 1_000_000_000).toFixed(1)}B`; |
| 404 | } |
| 405 | if (opts?.compact && Math.abs(n) >= 1_000_000) { |
| 406 | return `$${(n / 1_000_000).toFixed(0)}M`; |
| 407 | } |
| 408 | return n.toLocaleString("en-US", { |
| 409 | style: "currency", |
| 410 | currency: "USD", |
| 411 | maximumFractionDigits: 0, |
| 412 | }); |
| 413 | } |
| 414 | |
| 415 | export function formatDate(iso: string): string { |
| 416 | const d = new Date(iso + (iso.length === 10 ? "T00:00:00Z" : "")); |
| 417 | return d.toLocaleDateString("en-US", { |
| 418 | timeZone: "UTC", |
| 419 | year: "numeric", |
| 420 | month: "short", |
| 421 | day: "2-digit", |
| 422 | }); |
| 423 | } |