data-analyst-mcp 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (640) hide show
  1. package/README.md +262 -3
  2. package/dist/adapters/_acf_tidy.d.ts +18 -0
  3. package/dist/adapters/_acf_tidy.js +432 -0
  4. package/dist/adapters/_acf_tidy.js.map +1 -0
  5. package/dist/adapters/_actuaries_read.d.ts +38 -0
  6. package/dist/adapters/_actuaries_read.js +728 -0
  7. package/dist/adapters/_actuaries_read.js.map +1 -0
  8. package/dist/adapters/_census_micro.d.ts +70 -0
  9. package/dist/adapters/_census_micro.js +622 -0
  10. package/dist/adapters/_census_micro.js.map +1 -0
  11. package/dist/adapters/_census_util.d.ts +40 -0
  12. package/dist/adapters/_census_util.js +275 -0
  13. package/dist/adapters/_census_util.js.map +1 -0
  14. package/dist/adapters/_dol_states.d.ts +6 -0
  15. package/dist/adapters/_dol_states.js +58 -0
  16. package/dist/adapters/_dol_states.js.map +1 -0
  17. package/dist/adapters/_govinfo_entities.d.ts +4 -0
  18. package/dist/adapters/_govinfo_entities.js +6 -0
  19. package/dist/adapters/_govinfo_entities.js.map +1 -0
  20. package/dist/adapters/_govinfo_json.d.ts +13 -0
  21. package/dist/adapters/_govinfo_json.js +107 -0
  22. package/dist/adapters/_govinfo_json.js.map +1 -0
  23. package/dist/adapters/_govinfo_py.d.ts +22 -0
  24. package/dist/adapters/_govinfo_py.js +272 -0
  25. package/dist/adapters/_govinfo_py.js.map +1 -0
  26. package/dist/adapters/_govinfo_xml.d.ts +22 -0
  27. package/dist/adapters/_govinfo_xml.js +233 -0
  28. package/dist/adapters/_govinfo_xml.js.map +1 -0
  29. package/dist/adapters/_hud_excel.d.ts +2 -0
  30. package/dist/adapters/_hud_excel.js +166 -0
  31. package/dist/adapters/_hud_excel.js.map +1 -0
  32. package/dist/adapters/_omb_grid.d.ts +17 -0
  33. package/dist/adapters/_omb_grid.js +132 -0
  34. package/dist/adapters/_omb_grid.js.map +1 -0
  35. package/dist/adapters/_omb_util.d.ts +40 -0
  36. package/dist/adapters/_omb_util.js +192 -0
  37. package/dist/adapters/_omb_util.js.map +1 -0
  38. package/dist/adapters/_usaspending_state.d.ts +6 -0
  39. package/dist/adapters/_usaspending_state.js +54 -0
  40. package/dist/adapters/_usaspending_state.js.map +1 -0
  41. package/dist/adapters/_usda-fna_book.d.ts +59 -0
  42. package/dist/adapters/_usda-fna_book.js +869 -0
  43. package/dist/adapters/_usda-fna_book.js.map +1 -0
  44. package/dist/adapters/_usda-fna_pdf.d.ts +20 -0
  45. package/dist/adapters/_usda-fna_pdf.js +361 -0
  46. package/dist/adapters/_usda-fna_pdf.js.map +1 -0
  47. package/dist/adapters/_usda-outlook_read.d.ts +70 -0
  48. package/dist/adapters/_usda-outlook_read.js +362 -0
  49. package/dist/adapters/_usda-outlook_read.js.map +1 -0
  50. package/dist/adapters/acf.d.ts +3 -0
  51. package/dist/adapters/acf.js +187 -0
  52. package/dist/adapters/acf.js.map +1 -0
  53. package/dist/adapters/actuaries.d.ts +3 -0
  54. package/dist/adapters/actuaries.js +293 -0
  55. package/dist/adapters/actuaries.js.map +1 -0
  56. package/dist/adapters/bts.d.ts +3 -0
  57. package/dist/adapters/bts.js +26 -0
  58. package/dist/adapters/bts.js.map +1 -0
  59. package/dist/adapters/census-geocoder.d.ts +10 -0
  60. package/dist/adapters/census-geocoder.js +47 -0
  61. package/dist/adapters/census-geocoder.js.map +1 -0
  62. package/dist/adapters/census.d.ts +17 -0
  63. package/dist/adapters/census.js +983 -0
  64. package/dist/adapters/census.js.map +1 -0
  65. package/dist/adapters/cfpb.d.ts +7 -0
  66. package/dist/adapters/cfpb.js +348 -0
  67. package/dist/adapters/cfpb.js.map +1 -0
  68. package/dist/adapters/clinical-trials.d.ts +3 -0
  69. package/dist/adapters/clinical-trials.js +135 -0
  70. package/dist/adapters/clinical-trials.js.map +1 -0
  71. package/dist/adapters/cms.d.ts +3 -0
  72. package/dist/adapters/cms.js +292 -0
  73. package/dist/adapters/cms.js.map +1 -0
  74. package/dist/adapters/college-scorecard.d.ts +3 -0
  75. package/dist/adapters/college-scorecard.js +122 -0
  76. package/dist/adapters/college-scorecard.js.map +1 -0
  77. package/dist/adapters/congress.d.ts +33 -0
  78. package/dist/adapters/congress.js +589 -0
  79. package/dist/adapters/congress.js.map +1 -0
  80. package/dist/adapters/dhs-ohss.d.ts +13 -0
  81. package/dist/adapters/dhs-ohss.js +598 -0
  82. package/dist/adapters/dhs-ohss.js.map +1 -0
  83. package/dist/adapters/doj-news.d.ts +7 -0
  84. package/dist/adapters/doj-news.js +286 -0
  85. package/dist/adapters/doj-news.js.map +1 -0
  86. package/dist/adapters/dol.d.ts +4 -0
  87. package/dist/adapters/dol.js +634 -0
  88. package/dist/adapters/dol.js.map +1 -0
  89. package/dist/adapters/eia.d.ts +15 -0
  90. package/dist/adapters/eia.js +456 -0
  91. package/dist/adapters/eia.js.map +1 -0
  92. package/dist/adapters/epa-aqs.d.ts +3 -0
  93. package/dist/adapters/epa-aqs.js +357 -0
  94. package/dist/adapters/epa-aqs.js.map +1 -0
  95. package/dist/adapters/epa.d.ts +3 -0
  96. package/dist/adapters/epa.js +298 -0
  97. package/dist/adapters/epa.js.map +1 -0
  98. package/dist/adapters/fbi.d.ts +3 -0
  99. package/dist/adapters/fbi.js +192 -0
  100. package/dist/adapters/fbi.js.map +1 -0
  101. package/dist/adapters/fda.d.ts +5 -0
  102. package/dist/adapters/fda.js +184 -0
  103. package/dist/adapters/fda.js.map +1 -0
  104. package/dist/adapters/fdic.d.ts +4 -0
  105. package/dist/adapters/fdic.js +95 -0
  106. package/dist/adapters/fdic.js.map +1 -0
  107. package/dist/adapters/fec.d.ts +3 -0
  108. package/dist/adapters/fec.js +142 -0
  109. package/dist/adapters/fec.js.map +1 -0
  110. package/dist/adapters/fed-board.d.ts +12 -0
  111. package/dist/adapters/fed-board.js +581 -0
  112. package/dist/adapters/fed-board.js.map +1 -0
  113. package/dist/adapters/federal-register.d.ts +11 -0
  114. package/dist/adapters/federal-register.js +43 -0
  115. package/dist/adapters/federal-register.js.map +1 -0
  116. package/dist/adapters/fhfa.d.ts +3 -0
  117. package/dist/adapters/fhfa.js +253 -0
  118. package/dist/adapters/fhfa.js.map +1 -0
  119. package/dist/adapters/fsa.d.ts +9 -0
  120. package/dist/adapters/fsa.js +335 -0
  121. package/dist/adapters/fsa.js.map +1 -0
  122. package/dist/adapters/govinfo.d.ts +30 -0
  123. package/dist/adapters/govinfo.js +636 -0
  124. package/dist/adapters/govinfo.js.map +1 -0
  125. package/dist/adapters/gsa-calc.d.ts +10 -0
  126. package/dist/adapters/gsa-calc.js +318 -0
  127. package/dist/adapters/gsa-calc.js.map +1 -0
  128. package/dist/adapters/hud.d.ts +3 -0
  129. package/dist/adapters/hud.js +200 -0
  130. package/dist/adapters/hud.js.map +1 -0
  131. package/dist/adapters/index.d.ts +3 -0
  132. package/dist/adapters/index.js +25 -0
  133. package/dist/adapters/index.js.map +1 -0
  134. package/dist/adapters/irs-soi.d.ts +6 -0
  135. package/dist/adapters/irs-soi.js +576 -0
  136. package/dist/adapters/irs-soi.js.map +1 -0
  137. package/dist/adapters/naep.d.ts +15 -0
  138. package/dist/adapters/naep.js +341 -0
  139. package/dist/adapters/naep.js.map +1 -0
  140. package/dist/adapters/nhtsa.d.ts +10 -0
  141. package/dist/adapters/nhtsa.js +239 -0
  142. package/dist/adapters/nhtsa.js.map +1 -0
  143. package/dist/adapters/nih.d.ts +5 -0
  144. package/dist/adapters/nih.js +196 -0
  145. package/dist/adapters/nih.js.map +1 -0
  146. package/dist/adapters/noaa.d.ts +3 -0
  147. package/dist/adapters/noaa.js +148 -0
  148. package/dist/adapters/noaa.js.map +1 -0
  149. package/dist/adapters/nrel.d.ts +3 -0
  150. package/dist/adapters/nrel.js +186 -0
  151. package/dist/adapters/nrel.js.map +1 -0
  152. package/dist/adapters/nws.d.ts +3 -0
  153. package/dist/adapters/nws.js +119 -0
  154. package/dist/adapters/nws.js.map +1 -0
  155. package/dist/adapters/omb.d.ts +15 -0
  156. package/dist/adapters/omb.js +517 -0
  157. package/dist/adapters/omb.js.map +1 -0
  158. package/dist/adapters/open-payments.d.ts +5 -0
  159. package/dist/adapters/open-payments.js +149 -0
  160. package/dist/adapters/open-payments.js.map +1 -0
  161. package/dist/adapters/pbgc.d.ts +13 -0
  162. package/dist/adapters/pbgc.js +283 -0
  163. package/dist/adapters/pbgc.js.map +1 -0
  164. package/dist/adapters/philfed.d.ts +12 -0
  165. package/dist/adapters/philfed.js +59 -0
  166. package/dist/adapters/philfed.js.map +1 -0
  167. package/dist/adapters/regulations.d.ts +6 -0
  168. package/dist/adapters/regulations.js +58 -0
  169. package/dist/adapters/regulations.js.map +1 -0
  170. package/dist/adapters/sec.d.ts +13 -0
  171. package/dist/adapters/sec.js +504 -0
  172. package/dist/adapters/sec.js.map +1 -0
  173. package/dist/adapters/senate-lobbying.d.ts +3 -0
  174. package/dist/adapters/senate-lobbying.js +181 -0
  175. package/dist/adapters/senate-lobbying.js.map +1 -0
  176. package/dist/adapters/snapqc.d.ts +32 -0
  177. package/dist/adapters/snapqc.js +701 -0
  178. package/dist/adapters/snapqc.js.map +1 -0
  179. package/dist/adapters/treasury-yields.d.ts +3 -0
  180. package/dist/adapters/treasury-yields.js +170 -0
  181. package/dist/adapters/treasury-yields.js.map +1 -0
  182. package/dist/adapters/usaspending.d.ts +3 -0
  183. package/dist/adapters/usaspending.js +340 -0
  184. package/dist/adapters/usaspending.js.map +1 -0
  185. package/dist/adapters/usda-fna.d.ts +7 -0
  186. package/dist/adapters/usda-fna.js +707 -0
  187. package/dist/adapters/usda-fna.js.map +1 -0
  188. package/dist/adapters/usda-fooddata.d.ts +3 -0
  189. package/dist/adapters/usda-fooddata.js +101 -0
  190. package/dist/adapters/usda-fooddata.js.map +1 -0
  191. package/dist/adapters/usda-nass.d.ts +3 -0
  192. package/dist/adapters/usda-nass.js +108 -0
  193. package/dist/adapters/usda-nass.js.map +1 -0
  194. package/dist/adapters/usda-outlook.d.ts +12 -0
  195. package/dist/adapters/usda-outlook.js +696 -0
  196. package/dist/adapters/usda-outlook.js.map +1 -0
  197. package/dist/adapters/usgs.d.ts +9 -0
  198. package/dist/adapters/usgs.js +265 -0
  199. package/dist/adapters/usgs.js.map +1 -0
  200. package/dist/adapters/usitc.d.ts +18 -0
  201. package/dist/adapters/usitc.js +170 -0
  202. package/dist/adapters/usitc.js.map +1 -0
  203. package/dist/adapters/uspto.d.ts +3 -0
  204. package/dist/adapters/uspto.js +47 -0
  205. package/dist/adapters/uspto.js.map +1 -0
  206. package/dist/adapters/world-bank.d.ts +3 -0
  207. package/dist/adapters/world-bank.js +163 -0
  208. package/dist/adapters/world-bank.js.map +1 -0
  209. package/dist/analysis/cite.d.ts +31 -0
  210. package/dist/analysis/cite.js +229 -0
  211. package/dist/analysis/cite.js.map +1 -0
  212. package/dist/analysis/combine.d.ts +27 -0
  213. package/dist/analysis/combine.js +198 -0
  214. package/dist/analysis/combine.js.map +1 -0
  215. package/dist/analysis/compute.d.ts +62 -0
  216. package/dist/analysis/compute.js +583 -0
  217. package/dist/analysis/compute.js.map +1 -0
  218. package/dist/analysis/expr.d.ts +69 -0
  219. package/dist/analysis/expr.js +780 -0
  220. package/dist/analysis/expr.js.map +1 -0
  221. package/dist/analysis/factfmt.d.ts +16 -0
  222. package/dist/analysis/factfmt.js +187 -0
  223. package/dist/analysis/factfmt.js.map +1 -0
  224. package/dist/analysis/facts.d.ts +63 -0
  225. package/dist/analysis/facts.js +355 -0
  226. package/dist/analysis/facts.js.map +1 -0
  227. package/dist/analysis/handoff.d.ts +58 -0
  228. package/dist/analysis/handoff.js +208 -0
  229. package/dist/analysis/handoff.js.map +1 -0
  230. package/dist/analysis/pyfmt.d.ts +16 -0
  231. package/dist/analysis/pyfmt.js +156 -0
  232. package/dist/analysis/pyfmt.js.map +1 -0
  233. package/dist/analysis/rerun.d.ts +13 -0
  234. package/dist/analysis/rerun.js +125 -0
  235. package/dist/analysis/rerun.js.map +1 -0
  236. package/dist/analysis/table.d.ts +18 -0
  237. package/dist/analysis/table.js +109 -0
  238. package/dist/analysis/table.js.map +1 -0
  239. package/dist/analysis/tools.d.ts +67 -0
  240. package/dist/analysis/tools.js +217 -0
  241. package/dist/analysis/tools.js.map +1 -0
  242. package/dist/analysis/write_table.d.ts +13 -0
  243. package/dist/analysis/write_table.js +59 -0
  244. package/dist/analysis/write_table.js.map +1 -0
  245. package/dist/bin/cli.d.ts +10 -0
  246. package/dist/bin/cli.js +177 -0
  247. package/dist/bin/cli.js.map +1 -0
  248. package/dist/core/cache.d.ts +14 -0
  249. package/dist/core/cache.js +90 -0
  250. package/dist/core/cache.js.map +1 -0
  251. package/dist/core/context.d.ts +12 -0
  252. package/dist/core/context.js +15 -0
  253. package/dist/core/context.js.map +1 -0
  254. package/dist/core/env.d.ts +14 -0
  255. package/dist/core/env.js +52 -0
  256. package/dist/core/env.js.map +1 -0
  257. package/dist/core/generic-rest.d.ts +61 -0
  258. package/dist/core/generic-rest.js +639 -0
  259. package/dist/core/generic-rest.js.map +1 -0
  260. package/dist/core/http.d.ts +120 -0
  261. package/dist/core/http.js +514 -0
  262. package/dist/core/http.js.map +1 -0
  263. package/dist/core/keys.d.ts +43 -0
  264. package/dist/core/keys.js +174 -0
  265. package/dist/core/keys.js.map +1 -0
  266. package/dist/core/manual.d.ts +41 -0
  267. package/dist/core/manual.js +218 -0
  268. package/dist/core/manual.js.map +1 -0
  269. package/dist/core/package.d.ts +58 -0
  270. package/dist/core/package.js +228 -0
  271. package/dist/core/package.js.map +1 -0
  272. package/dist/core/packs.d.ts +139 -0
  273. package/dist/core/packs.js +173 -0
  274. package/dist/core/packs.js.map +1 -0
  275. package/dist/core/policy.d.ts +69 -0
  276. package/dist/core/policy.js +189 -0
  277. package/dist/core/policy.js.map +1 -0
  278. package/dist/core/py.d.ts +40 -0
  279. package/dist/core/py.js +171 -0
  280. package/dist/core/py.js.map +1 -0
  281. package/dist/core/routing.d.ts +10 -0
  282. package/dist/core/routing.js +39 -0
  283. package/dist/core/routing.js.map +1 -0
  284. package/dist/core/tabular.d.ts +21 -0
  285. package/dist/core/tabular.js +229 -0
  286. package/dist/core/tabular.js.map +1 -0
  287. package/dist/deep/_bea_api.d.ts +102 -0
  288. package/dist/deep/_bea_api.js +457 -0
  289. package/dist/deep/_bea_api.js.map +1 -0
  290. package/dist/deep/_bea_fetch.d.ts +151 -0
  291. package/dist/deep/_bea_fetch.js +1274 -0
  292. package/dist/deep/_bea_fetch.js.map +1 -0
  293. package/dist/deep/_bea_util.d.ts +14 -0
  294. package/dist/deep/_bea_util.js +156 -0
  295. package/dist/deep/_bea_util.js.map +1 -0
  296. package/dist/deep/_bls_api.d.ts +84 -0
  297. package/dist/deep/_bls_api.js +231 -0
  298. package/dist/deep/_bls_api.js.map +1 -0
  299. package/dist/deep/_bls_ids.d.ts +43 -0
  300. package/dist/deep/_bls_ids.js +188 -0
  301. package/dist/deep/_bls_ids.js.map +1 -0
  302. package/dist/deep/_bls_lib.d.ts +61 -0
  303. package/dist/deep/_bls_lib.js +442 -0
  304. package/dist/deep/_bls_lib.js.map +1 -0
  305. package/dist/deep/_fred_api.d.ts +148 -0
  306. package/dist/deep/_fred_api.js +545 -0
  307. package/dist/deep/_fred_api.js.map +1 -0
  308. package/dist/deep/_fred_pack.d.ts +162 -0
  309. package/dist/deep/_fred_pack.js +1027 -0
  310. package/dist/deep/_fred_pack.js.map +1 -0
  311. package/dist/deep/_fred_py.d.ts +40 -0
  312. package/dist/deep/_fred_py.js +199 -0
  313. package/dist/deep/_fred_py.js.map +1 -0
  314. package/dist/deep/_ipums_bundle.d.ts +29 -0
  315. package/dist/deep/_ipums_bundle.js +194 -0
  316. package/dist/deep/_ipums_bundle.js.map +1 -0
  317. package/dist/deep/_ipums_ddi.d.ts +23 -0
  318. package/dist/deep/_ipums_ddi.js +162 -0
  319. package/dist/deep/_ipums_ddi.js.map +1 -0
  320. package/dist/deep/_opm_io.d.ts +26 -0
  321. package/dist/deep/_opm_io.js +383 -0
  322. package/dist/deep/_opm_io.js.map +1 -0
  323. package/dist/deep/_opm_parquet.d.ts +31 -0
  324. package/dist/deep/_opm_parquet.js +744 -0
  325. package/dist/deep/_opm_parquet.js.map +1 -0
  326. package/dist/deep/_opm_py.d.ts +6 -0
  327. package/dist/deep/_opm_py.js +74 -0
  328. package/dist/deep/_opm_py.js.map +1 -0
  329. package/dist/deep/_treasury_api.d.ts +48 -0
  330. package/dist/deep/_treasury_api.js +221 -0
  331. package/dist/deep/_treasury_api.js.map +1 -0
  332. package/dist/deep/_treasury_context.d.ts +34 -0
  333. package/dist/deep/_treasury_context.js +142 -0
  334. package/dist/deep/_treasury_context.js.map +1 -0
  335. package/dist/deep/_treasury_lib.d.ts +109 -0
  336. package/dist/deep/_treasury_lib.js +686 -0
  337. package/dist/deep/_treasury_lib.js.map +1 -0
  338. package/dist/deep/bea.d.ts +3 -0
  339. package/dist/deep/bea.js +248 -0
  340. package/dist/deep/bea.js.map +1 -0
  341. package/dist/deep/bls.d.ts +3 -0
  342. package/dist/deep/bls.js +220 -0
  343. package/dist/deep/bls.js.map +1 -0
  344. package/dist/deep/fred.d.ts +3 -0
  345. package/dist/deep/fred.js +325 -0
  346. package/dist/deep/fred.js.map +1 -0
  347. package/dist/deep/ipums.d.ts +59 -0
  348. package/dist/deep/ipums.js +744 -0
  349. package/dist/deep/ipums.js.map +1 -0
  350. package/dist/deep/opm.d.ts +56 -0
  351. package/dist/deep/opm.js +1033 -0
  352. package/dist/deep/opm.js.map +1 -0
  353. package/dist/deep/treasury.d.ts +3 -0
  354. package/dist/deep/treasury.js +218 -0
  355. package/dist/deep/treasury.js.map +1 -0
  356. package/dist/envelope.d.ts +47 -0
  357. package/dist/envelope.js +88 -0
  358. package/dist/envelope.js.map +1 -0
  359. package/dist/index.d.ts +277 -0
  360. package/dist/index.js +106 -0
  361. package/dist/index.js.map +1 -0
  362. package/dist/remote/app.d.ts +21 -0
  363. package/dist/remote/app.js +218 -0
  364. package/dist/remote/app.js.map +1 -0
  365. package/dist/remote/oauth.d.ts +14 -0
  366. package/dist/remote/oauth.js +90 -0
  367. package/dist/remote/oauth.js.map +1 -0
  368. package/dist/remote/pages.d.ts +8 -0
  369. package/dist/remote/pages.js +56 -0
  370. package/dist/remote/pages.js.map +1 -0
  371. package/dist/remote/sign.d.ts +4 -0
  372. package/dist/remote/sign.js +40 -0
  373. package/dist/remote/sign.js.map +1 -0
  374. package/dist/remote/store.d.ts +31 -0
  375. package/dist/remote/store.js +129 -0
  376. package/dist/remote/store.js.map +1 -0
  377. package/dist/report/audit_answer.d.ts +94 -0
  378. package/dist/report/audit_answer.js +1349 -0
  379. package/dist/report/audit_answer.js.map +1 -0
  380. package/dist/report/audit_report.d.ts +23 -0
  381. package/dist/report/audit_report.js +637 -0
  382. package/dist/report/audit_report.js.map +1 -0
  383. package/dist/report/build_report.d.ts +27 -0
  384. package/dist/report/build_report.js +1168 -0
  385. package/dist/report/build_report.js.map +1 -0
  386. package/dist/report/method_audit.d.ts +47 -0
  387. package/dist/report/method_audit.js +710 -0
  388. package/dist/report/method_audit.js.map +1 -0
  389. package/dist/report/policyset.d.ts +50 -0
  390. package/dist/report/policyset.js +421 -0
  391. package/dist/report/policyset.js.map +1 -0
  392. package/dist/report/py.d.ts +58 -0
  393. package/dist/report/py.js +311 -0
  394. package/dist/report/py.js.map +1 -0
  395. package/dist/report/scan_secrets.d.ts +21 -0
  396. package/dist/report/scan_secrets.js +234 -0
  397. package/dist/report/scan_secrets.js.map +1 -0
  398. package/dist/report/style_check.d.ts +29 -0
  399. package/dist/report/style_check.js +173 -0
  400. package/dist/report/style_check.js.map +1 -0
  401. package/dist/report/tools.d.ts +87 -0
  402. package/dist/report/tools.js +167 -0
  403. package/dist/report/tools.js.map +1 -0
  404. package/dist/server.d.ts +5 -0
  405. package/dist/server.js +246 -0
  406. package/dist/server.js.map +1 -0
  407. package/dist/session.d.ts +47 -0
  408. package/dist/session.js +107 -0
  409. package/dist/session.js.map +1 -0
  410. package/dist/toolkit.d.ts +21 -0
  411. package/dist/toolkit.js +2 -0
  412. package/dist/toolkit.js.map +1 -0
  413. package/dist/tools.d.ts +299 -0
  414. package/dist/tools.js +491 -0
  415. package/dist/tools.js.map +1 -0
  416. package/guide/WORKFLOW.md +134 -0
  417. package/guide/assets/disclaimer.txt +1 -0
  418. package/guide/assets/download_data.ps1 +162 -0
  419. package/guide/assets/download_data.sh +143 -0
  420. package/guide/assets/report_template.html +597 -0
  421. package/guide/references/report_patterns.md +199 -0
  422. package/guide/references/routing.md +171 -0
  423. package/guide/references/style_guide.md +398 -0
  424. package/package.json +56 -6
  425. package/packs/acf/endpoints.json +114 -0
  426. package/packs/acf/policy.json +104 -0
  427. package/packs/acf/source.md +138 -0
  428. package/packs/actuaries/endpoints.json +82 -0
  429. package/packs/actuaries/policy.json +109 -0
  430. package/packs/actuaries/source.md +137 -0
  431. package/packs/bea/assets/download_bea.ps1 +182 -0
  432. package/packs/bea/assets/download_bea.sh +144 -0
  433. package/packs/bea/docs/bea_api.md +461 -0
  434. package/packs/bea/docs/datasets.md +157 -0
  435. package/packs/bea/docs/report_patterns.md +112 -0
  436. package/packs/bea/policy.json +170 -0
  437. package/packs/bea/source.md +152 -0
  438. package/packs/bls/assets/download_bls.ps1 +152 -0
  439. package/packs/bls/assets/download_bls.sh +167 -0
  440. package/packs/bls/docs/analysis_patterns.md +108 -0
  441. package/packs/bls/docs/bls_api.md +73 -0
  442. package/packs/bls/docs/series_ids.md +149 -0
  443. package/packs/bls/policy.json +238 -0
  444. package/packs/bls/series_ids.json +1375 -0
  445. package/packs/bls/source.md +156 -0
  446. package/packs/bts/endpoints.json +347 -0
  447. package/packs/bts/policy.json +94 -0
  448. package/packs/bts/source.md +97 -0
  449. package/packs/cdc/endpoints.json +197 -0
  450. package/packs/cdc/policy.json +83 -0
  451. package/packs/cdc/source.md +74 -0
  452. package/packs/census/endpoints.json +99 -0
  453. package/packs/census/policy.json +238 -0
  454. package/packs/census/source.md +304 -0
  455. package/packs/census-geocoder/endpoints.json +70 -0
  456. package/packs/census-geocoder/policy.json +80 -0
  457. package/packs/census-geocoder/source.md +53 -0
  458. package/packs/cfpb/endpoints.json +327 -0
  459. package/packs/cfpb/policy.json +119 -0
  460. package/packs/cfpb/source.md +96 -0
  461. package/packs/clinical-trials/endpoints.json +167 -0
  462. package/packs/clinical-trials/policy.json +84 -0
  463. package/packs/clinical-trials/source.md +82 -0
  464. package/packs/cms/endpoints.json +69 -0
  465. package/packs/cms/policy.json +96 -0
  466. package/packs/cms/source.md +112 -0
  467. package/packs/college-scorecard/endpoints.json +253 -0
  468. package/packs/college-scorecard/policy.json +106 -0
  469. package/packs/college-scorecard/source.md +92 -0
  470. package/packs/congress/endpoints.json +1701 -0
  471. package/packs/congress/policy.json +117 -0
  472. package/packs/congress/source.md +190 -0
  473. package/packs/dhs-ohss/endpoints.json +66 -0
  474. package/packs/dhs-ohss/policy.json +107 -0
  475. package/packs/dhs-ohss/source.md +120 -0
  476. package/packs/doj-news/endpoints.json +59 -0
  477. package/packs/doj-news/policy.json +96 -0
  478. package/packs/doj-news/source.md +99 -0
  479. package/packs/dol/endpoints.json +818 -0
  480. package/packs/dol/policy.json +135 -0
  481. package/packs/dol/source.md +181 -0
  482. package/packs/eia/endpoints.json +718 -0
  483. package/packs/eia/policy.json +112 -0
  484. package/packs/eia/source.md +112 -0
  485. package/packs/epa/endpoints.json +292 -0
  486. package/packs/epa/policy.json +99 -0
  487. package/packs/epa/source.md +99 -0
  488. package/packs/epa-aqs/endpoints.json +174 -0
  489. package/packs/epa-aqs/policy.json +96 -0
  490. package/packs/epa-aqs/source.md +97 -0
  491. package/packs/fbi/endpoints.json +1842 -0
  492. package/packs/fbi/policy.json +118 -0
  493. package/packs/fbi/source.md +108 -0
  494. package/packs/fda/endpoints.json +238 -0
  495. package/packs/fda/policy.json +121 -0
  496. package/packs/fda/source.md +117 -0
  497. package/packs/fdic/endpoints.json +417 -0
  498. package/packs/fdic/policy.json +83 -0
  499. package/packs/fdic/source.md +92 -0
  500. package/packs/fec/endpoints.json +708 -0
  501. package/packs/fec/policy.json +93 -0
  502. package/packs/fec/source.md +90 -0
  503. package/packs/fed-board/endpoints.json +89 -0
  504. package/packs/fed-board/policy.json +136 -0
  505. package/packs/fed-board/source.md +118 -0
  506. package/packs/federal-register/endpoints.json +143 -0
  507. package/packs/federal-register/policy.json +86 -0
  508. package/packs/federal-register/source.md +98 -0
  509. package/packs/fema/endpoints.json +646 -0
  510. package/packs/fema/policy.json +103 -0
  511. package/packs/fema/source.md +103 -0
  512. package/packs/fhfa/endpoints.json +105 -0
  513. package/packs/fhfa/policy.json +109 -0
  514. package/packs/fhfa/source.md +108 -0
  515. package/packs/fred/assets/download_fred.ps1 +122 -0
  516. package/packs/fred/assets/download_fred.sh +123 -0
  517. package/packs/fred/docs/analysis_patterns.md +124 -0
  518. package/packs/fred/docs/fred_api.md +94 -0
  519. package/packs/fred/docs/series.md +188 -0
  520. package/packs/fred/policy.json +253 -0
  521. package/packs/fred/source.md +142 -0
  522. package/packs/fsa/endpoints.json +150 -0
  523. package/packs/fsa/policy.json +99 -0
  524. package/packs/fsa/source.md +102 -0
  525. package/packs/govinfo/endpoints.json +520 -0
  526. package/packs/govinfo/policy.json +116 -0
  527. package/packs/govinfo/source.md +241 -0
  528. package/packs/gsa-calc/endpoints.json +93 -0
  529. package/packs/gsa-calc/policy.json +97 -0
  530. package/packs/gsa-calc/source.md +108 -0
  531. package/packs/hud/endpoints.json +147 -0
  532. package/packs/hud/policy.json +84 -0
  533. package/packs/hud/source.md +97 -0
  534. package/packs/ipums/assets/download_ipums.ps1 +215 -0
  535. package/packs/ipums/assets/download_ipums.sh +192 -0
  536. package/packs/ipums/docs/ipums_api.md +67 -0
  537. package/packs/ipums/docs/report_patterns.md +117 -0
  538. package/packs/ipums/docs/variables.md +284 -0
  539. package/packs/ipums/lib/fetch_text.json +112 -0
  540. package/packs/ipums/policy.json +215 -0
  541. package/packs/ipums/source.md +169 -0
  542. package/packs/irs-soi/endpoints.json +114 -0
  543. package/packs/irs-soi/policy.json +107 -0
  544. package/packs/irs-soi/source.md +124 -0
  545. package/packs/medicaid/endpoints.json +412 -0
  546. package/packs/medicaid/policy.json +108 -0
  547. package/packs/medicaid/source.md +136 -0
  548. package/packs/naep/endpoints.json +217 -0
  549. package/packs/naep/policy.json +100 -0
  550. package/packs/naep/source.md +120 -0
  551. package/packs/nhtsa/endpoints.json +132 -0
  552. package/packs/nhtsa/policy.json +93 -0
  553. package/packs/nhtsa/source.md +109 -0
  554. package/packs/nih/endpoints.json +453 -0
  555. package/packs/nih/policy.json +86 -0
  556. package/packs/nih/source.md +108 -0
  557. package/packs/noaa/endpoints.json +432 -0
  558. package/packs/noaa/policy.json +95 -0
  559. package/packs/noaa/source.md +88 -0
  560. package/packs/nrel/endpoints.json +328 -0
  561. package/packs/nrel/policy.json +96 -0
  562. package/packs/nrel/source.md +91 -0
  563. package/packs/nws/endpoints.json +272 -0
  564. package/packs/nws/policy.json +82 -0
  565. package/packs/nws/source.md +81 -0
  566. package/packs/nyfed/endpoints.json +80 -0
  567. package/packs/nyfed/policy.json +92 -0
  568. package/packs/nyfed/source.md +89 -0
  569. package/packs/omb/endpoints.json +460 -0
  570. package/packs/omb/policy.json +106 -0
  571. package/packs/omb/source.md +130 -0
  572. package/packs/open-payments/endpoints.json +298 -0
  573. package/packs/open-payments/policy.json +101 -0
  574. package/packs/open-payments/source.md +99 -0
  575. package/packs/opm/assets/download_opm.ps1 +125 -0
  576. package/packs/opm/assets/download_opm.sh +85 -0
  577. package/packs/opm/docs/fields.md +184 -0
  578. package/packs/opm/docs/opm_api.md +71 -0
  579. package/packs/opm/docs/report_patterns.md +83 -0
  580. package/packs/opm/lib/data_dictionary.csv +73 -0
  581. package/packs/opm/policy.json +142 -0
  582. package/packs/opm/source.md +137 -0
  583. package/packs/pbgc/endpoints.json +483 -0
  584. package/packs/pbgc/policy.json +94 -0
  585. package/packs/pbgc/source.md +95 -0
  586. package/packs/philfed/endpoints.json +85 -0
  587. package/packs/philfed/policy.json +94 -0
  588. package/packs/philfed/source.md +125 -0
  589. package/packs/port.json +287 -0
  590. package/packs/regulations/endpoints.json +288 -0
  591. package/packs/regulations/policy.json +86 -0
  592. package/packs/regulations/source.md +84 -0
  593. package/packs/sec/endpoints.json +237 -0
  594. package/packs/sec/policy.json +86 -0
  595. package/packs/sec/source.md +101 -0
  596. package/packs/senate-lobbying/endpoints.json +554 -0
  597. package/packs/senate-lobbying/policy.json +99 -0
  598. package/packs/senate-lobbying/source.md +100 -0
  599. package/packs/snapqc/endpoints.json +1426 -0
  600. package/packs/snapqc/policy.json +92 -0
  601. package/packs/snapqc/source.md +96 -0
  602. package/packs/treasury/catalog.json +2267 -0
  603. package/packs/treasury/docs/api_guide.md +245 -0
  604. package/packs/treasury/docs/datasets.md +56 -0
  605. package/packs/treasury/docs/report_patterns.md +126 -0
  606. package/packs/treasury/policy.json +159 -0
  607. package/packs/treasury/source.md +165 -0
  608. package/packs/treasury-yields/endpoints.json +226 -0
  609. package/packs/treasury-yields/policy.json +86 -0
  610. package/packs/treasury-yields/source.md +80 -0
  611. package/packs/usaspending/endpoints.json +1316 -0
  612. package/packs/usaspending/policy.json +109 -0
  613. package/packs/usaspending/source.md +103 -0
  614. package/packs/usda-fna/endpoints.json +427 -0
  615. package/packs/usda-fna/policy.json +133 -0
  616. package/packs/usda-fna/source.md +217 -0
  617. package/packs/usda-fooddata/endpoints.json +181 -0
  618. package/packs/usda-fooddata/policy.json +94 -0
  619. package/packs/usda-fooddata/source.md +105 -0
  620. package/packs/usda-nass/endpoints.json +324 -0
  621. package/packs/usda-nass/policy.json +95 -0
  622. package/packs/usda-nass/source.md +85 -0
  623. package/packs/usda-outlook/endpoints.json +86 -0
  624. package/packs/usda-outlook/policy.json +109 -0
  625. package/packs/usda-outlook/source.md +144 -0
  626. package/packs/usgs/endpoints.json +313 -0
  627. package/packs/usgs/policy.json +95 -0
  628. package/packs/usgs/source.md +96 -0
  629. package/packs/usitc/endpoints.json +74 -0
  630. package/packs/usitc/policy.json +111 -0
  631. package/packs/usitc/source.md +90 -0
  632. package/packs/uspto/endpoints.json +141 -0
  633. package/packs/uspto/policy.json +95 -0
  634. package/packs/uspto/source.md +101 -0
  635. package/packs/va/endpoints.json +414 -0
  636. package/packs/va/policy.json +101 -0
  637. package/packs/va/source.md +129 -0
  638. package/packs/world-bank/endpoints.json +122 -0
  639. package/packs/world-bank/policy.json +101 -0
  640. package/packs/world-bank/source.md +93 -0
@@ -0,0 +1,147 @@
1
+ {
2
+ "base_url": "https://www.huduser.gov/hudapi/public",
3
+ "headers": {
4
+ "Accept": "application/json"
5
+ },
6
+ "endpoints": {
7
+ "fmr": {
8
+ "path": "/fmr/data/{entityid}",
9
+ "method": "GET",
10
+ "description": "Fair Market Rents for one county, town or metro area: monthly gross rent by bedroom count (Efficiency to Four-Bedroom); Small Area FMR metros give one row per ZIP plus 'MSA level'.",
11
+ "params": {
12
+ "entityid": {
13
+ "in": "path",
14
+ "required": true,
15
+ "desc": "10-character county code (state FIPS + county FIPS + 99999, e.g. 5100199999), a New England town code, or a metro code (METRO47900M47900)"
16
+ },
17
+ "year": {
18
+ "desc": "fiscal year, e.g. 2027 (default: latest). FMRs take effect October 1 before the fiscal year (FY2027 on 2026-10-01)"
19
+ }
20
+ },
21
+ "records": "data",
22
+ "paging": {
23
+ "type": "none"
24
+ }
25
+ },
26
+ "fmr_state": {
27
+ "path": "/fmr/statedata/{statecode}",
28
+ "method": "GET",
29
+ "description": "Fair Market Rents for every metro area and county (towns in New England) of a state: one row per area, area_type metro or county.",
30
+ "params": {
31
+ "statecode": {
32
+ "in": "path",
33
+ "required": true,
34
+ "desc": "two-letter state code, e.g. MA"
35
+ },
36
+ "year": {
37
+ "desc": "fiscal year, e.g. 2027 (default: latest). FMRs take effect October 1 before the fiscal year (FY2027 on 2026-10-01)"
38
+ }
39
+ },
40
+ "records": "data",
41
+ "paging": {
42
+ "type": "none"
43
+ }
44
+ },
45
+ "income_limits": {
46
+ "path": "/il/data/{entityid}",
47
+ "method": "GET",
48
+ "description": "Section 8 income limits for one area: median family income and Very Low (50%), Extremely Low (30%) and Low (80%) limits for 1-8 person households (il50_p1 ... il80_p8).",
49
+ "params": {
50
+ "entityid": {
51
+ "in": "path",
52
+ "required": true,
53
+ "desc": "10-character county code (state FIPS + county FIPS + 99999, e.g. 5100199999), a New England town code, or a metro code (METRO47900M47900)"
54
+ },
55
+ "year": {
56
+ "desc": "fiscal year, e.g. 2026 (default: latest). Income limits take effect when HUD publishes them in spring, not October 1 (FY2026: May 1, 2026), so the latest IL year can trail the latest FMR year"
57
+ }
58
+ },
59
+ "records": "data",
60
+ "paging": {
61
+ "type": "none"
62
+ }
63
+ },
64
+ "il_state": {
65
+ "path": "/il/statedata/{statecode}",
66
+ "method": "GET",
67
+ "description": "Income limits for every area of a state (response shape not documented by HUD; unverified).",
68
+ "params": {
69
+ "statecode": {
70
+ "in": "path",
71
+ "required": true,
72
+ "desc": "two-letter state code, e.g. MA"
73
+ },
74
+ "year": {
75
+ "desc": "fiscal year, e.g. 2026 (default: latest). Income limits take effect when HUD publishes them in spring, not October 1 (FY2026: May 1, 2026), so the latest IL year can trail the latest FMR year"
76
+ }
77
+ },
78
+ "records": "data",
79
+ "paging": {
80
+ "type": "none"
81
+ }
82
+ },
83
+ "mtspil": {
84
+ "path": "/mtspil/data/{entityid}",
85
+ "method": "GET",
86
+ "description": "Multifamily Tax Subsidy Project (LIHTC) income limits for one area: 20% to 140% limits by household size.",
87
+ "params": {
88
+ "entityid": {
89
+ "in": "path",
90
+ "required": true,
91
+ "desc": "10-character county code (state FIPS + county FIPS + 99999, e.g. 5100199999), a New England town code, or a metro code (METRO47900M47900)"
92
+ },
93
+ "year": {
94
+ "desc": "fiscal year, e.g. 2026 (default: latest). MTSP limits are released with the income limits in spring, not October 1 (FY2026 income limits: May 1, 2026)"
95
+ }
96
+ },
97
+ "records": "data",
98
+ "paging": {
99
+ "type": "none"
100
+ }
101
+ },
102
+ "list_states": {
103
+ "path": "/fmr/listStates",
104
+ "method": "GET",
105
+ "description": "States and territories with HUD state codes.",
106
+ "params": {},
107
+ "records": "data",
108
+ "paging": {
109
+ "type": "none"
110
+ }
111
+ },
112
+ "list_counties": {
113
+ "path": "/fmr/listCounties/{statecode}",
114
+ "method": "GET",
115
+ "description": "Counties (and New England towns) of a state with their 10-character fips_code entity ids.",
116
+ "params": {
117
+ "statecode": {
118
+ "in": "path",
119
+ "required": true,
120
+ "desc": "two-letter state code, e.g. MA"
121
+ },
122
+ "updated": {
123
+ "desc": "2025 = the FIPS codes used by Income Limits 2025 (some counties changed)"
124
+ }
125
+ },
126
+ "records": "data",
127
+ "paging": {
128
+ "type": "none"
129
+ }
130
+ },
131
+ "list_metro_areas": {
132
+ "path": "/fmr/listMetroAreas",
133
+ "method": "GET",
134
+ "description": "HUD metro FMR areas with their cbsa_code entity ids (METRO10180M10180).",
135
+ "params": {
136
+ "updated": {
137
+ "desc": "2025 = the area codes used by Income Limits 2025"
138
+ }
139
+ },
140
+ "records": "data",
141
+ "paging": {
142
+ "type": "none"
143
+ }
144
+ }
145
+ },
146
+ "catalog": {}
147
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "id": "hud",
3
+ "title": "HUD Fair Market Rents and Income Limits API (HUD User)",
4
+ "agency": "U.S. Department of Housing and Urban Development, Office of Policy Development and Research",
5
+ "depth": "standard",
6
+ "domains": [
7
+ "housing"
8
+ ],
9
+ "keywords": [
10
+ "fair market rent",
11
+ "fmr",
12
+ "rent",
13
+ "rents",
14
+ "section 8",
15
+ "housing choice voucher",
16
+ "income limits",
17
+ "area median income",
18
+ "ami",
19
+ "very low income",
20
+ "extremely low income",
21
+ "low income",
22
+ "lihtc",
23
+ "mtsp",
24
+ "small area fmr",
25
+ "affordable housing",
26
+ "hud"
27
+ ],
28
+ "questions": [
29
+ "fair market rent for a two-bedroom in a county",
30
+ "HUD income limits for a family of four",
31
+ "fair market rents for every county in a state",
32
+ "Small Area FMRs by ZIP code in a metro"
33
+ ],
34
+ "homepage": "https://www.huduser.gov/portal/dataset/fmr-api.html",
35
+ "terms_url": "https://www.huduser.gov/portal/dataset/fmr-api.html",
36
+ "auth": {
37
+ "env": "HUD_USER_TOKEN",
38
+ "required": "required",
39
+ "placement": "header",
40
+ "param": "Authorization",
41
+ "prefix": "Bearer ",
42
+ "home": "hud",
43
+ "signup_url": "https://www.huduser.gov/hudapi/public/register",
44
+ "echoes_key": false,
45
+ "key_only": []
46
+ },
47
+ "limits": {
48
+ "rps": 1,
49
+ "burst": 3,
50
+ "max_rows": 50000
51
+ },
52
+ "routes": {
53
+ "api": {
54
+ "base": "https://www.huduser.gov/hudapi/public",
55
+ "probe": "https://www.huduser.gov/hudapi/public/fmr/listStates",
56
+ "hosts": [
57
+ "www.huduser.gov"
58
+ ]
59
+ },
60
+ "manual": {
61
+ "how": "With a HUD User token, run the download script in the bundle (the token goes in a header, so browser links do not work). Without a token, download the published files: FMRs at https://www.huduser.gov/portal/datasets/fmr.html and income limits at https://www.huduser.gov/portal/datasets/il.html (choose the fiscal year and download its data file), save it as CSV, and upload it."
62
+ }
63
+ },
64
+ "cache": {
65
+ "mode": "run_only",
66
+ "ttl_hours": null,
67
+ "why": "Values change once a fiscal year (with occasional mid-year revisions); queries are small."
68
+ },
69
+ "redistribution": {
70
+ "mode": "allowed",
71
+ "why": "FMRs and income limits are U.S. government works published by HUD (17 U.S.C. 105); the HUD User API terms govern access, not reuse of the values."
72
+ },
73
+ "notices": [],
74
+ "retention": null,
75
+ "citation": "U.S. Department of Housing and Urban Development, {dataset}, HUD User FMR and Income Limits API, retrieved {retrieved_long}.",
76
+ "audit_hooks": [],
77
+ "clarify": [
78
+ "Which fiscal year? FMRs and income limits are set per federal fiscal year; FMRs take effect October 1 (FY2027 on October 1, 2026), income limits when HUD publishes them in spring (FY2026 on May 1, 2026), so the latest years differ. The default is the latest of each.",
79
+ "In a Small Area FMR metro, the metro-wide value or ZIP-code values?"
80
+ ],
81
+ "formats": [
82
+ "json"
83
+ ]
84
+ }
@@ -0,0 +1,97 @@
1
+ # HUD Fair Market Rents and Income Limits API (HUD User)
2
+ Depth: standard. Key: required (HUD_USER_TOKEN). HUD's Fair Market Rents (FMRs, including Small Area
3
+ FMRs by ZIP) and Section 8 and Multifamily Tax Subsidy Project (LIHTC) income limits, by county, New
4
+ England town, metro FMR area and state, per federal fiscal year.
5
+
6
+ ## When to use
7
+ - Fair Market Rent by bedroom count for a county, metro or state; Small Area FMRs by ZIP; HUD
8
+ income limits (30%, 50%, 80% of area median) by household size; area median family income as HUD
9
+ sets it; MTSP (LIHTC) limits.
10
+ - Not here: market rents and home values from surveys (census ACS median gross rent), house price
11
+ indexes (fred, FHFA), homelessness counts and public housing (not covered), mortgage complaints
12
+ (cfpb). FMRs are policy values (the 40th percentile gross rent standard), not observed averages.
13
+
14
+ ## Endpoints and datasets
15
+ | Endpoint | Returns (one row per) | Parameters |
16
+ |---|---|---|
17
+ | `fmr` | area, or ZIP for Small Area FMR metros | `entityid`, `year` |
18
+ | `fmr_state` | metro area and county/town of a state (`area_type`) | `statecode`, `year` |
19
+ | `income_limits` | area: median_income, il30_p1..p8, il50_p1..p8, il80_p1..p8 | `entityid`, `year` |
20
+ | `mtspil` | area: MTSP limits by percent and household size | `entityid`, `year` |
21
+ | `il_state` | areas of a state (shape undocumented; unverified) | `statecode`, `year` |
22
+ | `list_states` | state: state_code, state_name, state_num | |
23
+ | `list_counties` | county or town: fips_code (the entity id), county_name, town_name | `statecode`, `updated` (2025) |
24
+ | `list_metro_areas` | metro FMR area: cbsa_code (entity id), area_name | `updated` (2025) |
25
+ Entity ids: county = state FIPS + county FIPS + "99999" (Accomack County, VA = 5100199999); New
26
+ England towns have their own 10-digit codes (Wallingford town, VT = 5002175925); metro areas look
27
+ like METRO47900M47900. Get them from `list_counties` / `list_metro_areas`.
28
+
29
+ ## Spec examples
30
+ ```json
31
+ {"description": "FMRs for Wallingford town, VT (FY2017) and the Washington DC metro (Small Area FMRs)",
32
+ "requests": [{"name": "wallingford_2017", "endpoint": "fmr", "params": {"entityid": "5002175925", "year": 2017}},
33
+ {"name": "dc_metro", "endpoint": "fmr", "params": {"entityid": "METRO47900M47900"}}]}
34
+ ```
35
+ ```json
36
+ {"description": "Income limits for Autauga County, AL, and FMRs for every area of Massachusetts",
37
+ "requests": [{"name": "autauga_il", "endpoint": "income_limits", "params": {"entityid": "0100199999"}},
38
+ {"name": "ma_fmr", "endpoint": "fmr_state", "params": {"statecode": "MA"}}]}
39
+ ```
40
+ ```json
41
+ {"description": "Virginia county entity ids",
42
+ "requests": [{"name": "va_counties", "endpoint": "list_counties", "params": {"statecode": "VA"}}]}
43
+ ```
44
+
45
+ ## Data format and traps
46
+ - FMRs are monthly gross rents (shelter rent plus utilities) in dollars, generally at the 40th
47
+ percentile of recent movers' rents; they are a program standard, not an average rent.
48
+ - Years are federal fiscal years, but the effective dates differ: FMRs take effect October 1 before the
49
+ fiscal year (FY2027 on October 1, 2026); income limits and MTSP limits take effect when HUD publishes
50
+ them in spring (FY2026 on May 1, 2026). So in autumn the latest FMR year is one ahead of the latest
51
+ income-limit year. `year` defaults to the latest year of each; always set it for a reproducible number
52
+ and report it as "FY".
53
+ - Numbers sometimes arrive as text with a decimal ("758.0") and sometimes as integers (1772),
54
+ depending on resource and year; `compute` reads an all-numeric column as numbers (`number(x)` in a derive
55
+ step converts one that is not).
56
+ - Small Area FMR metros (`smallarea_status` "1") return one row per ZIP plus a `zip_code` "MSA level"
57
+ row; use the MSA level row for the metro value and never average ZIP rows.
58
+ - County and metro values differ: a metropolitan county's FMR is its HUD metro FMR area's value
59
+ (`metro_name`); counties in one metro share it.
60
+ - Income limits: il30 = extremely low, il50 = very low, il80 = low income, for 1-8 person households;
61
+ `median_income` is HUD's area median family income for that year. Limits are capped and adjusted by
62
+ HUD rules, so il80 is not always 1.6 x il50.
63
+ - Income Limits 2025 changed some county FIPS codes (HUD's own example is Connecticut): call
64
+ `list_counties` / `list_metro_areas` with `updated: 2025` for IL 2025 ids.
65
+ - A 5-digit county FIPS is not an entity id; the pack refuses it with the fix. '0600000001' is not a valid
66
+ county code (the format is state FIPS + county FIPS + 99999).
67
+ - `il_state`'s response is not documented; the pack turns its lists into rows but the columns are
68
+ unverified. Prefer `income_limits` per area.
69
+ - Error codes (HUD documentation): 401 bad token, 403 token not registered for this dataset (add the
70
+ "FMR and IL" dataset to the token on HUD User), 404 no data for the id or year.
71
+ - Verification status: built from HUD's documented responses (tests use doc_* fixtures); not checked
72
+ against a live token.
73
+
74
+ ## Access
75
+ Key required: a free HUD User access token (https://www.huduser.gov/hudapi/public/register; select the
76
+ "Fair Market Rents and Income Limits" dataset, then Create New Token). The user stores it as
77
+ `HUD_USER_TOKEN` with `npx -y data-analyst-mcp setup hud` in their own terminal (never ask for it in chat); without
78
+ it `fetch` stops with `key_missing`. It is sent as `Authorization: Bearer <token>`. Rate limits are not published;
79
+ the pack sends at most one request a second.
80
+ Manual route (`manual_bundle`): the bundle's download scripts send the token header from the user's own computer
81
+ (browser links alone answer 401). Without a token, use the published files: FMRs at
82
+ https://www.huduser.gov/portal/datasets/fmr.html and income limits at
83
+ https://www.huduser.gov/portal/datasets/il.html (pick the fiscal year; take the "revised" workbook when
84
+ there is one, e.g. FY26_FMRs_revised.xlsx) and upload it named after the request (`<name>.xlsx` or `.csv`,
85
+ e.g. `fmr_fy2027.xlsx` for request `fmr_fy2027`), then call `ingest`. It reads JSON, CSV and Excel (.xlsx,
86
+ .xls; a workbook with malformed metadata is read anyway) and keeps only the rows of the request's
87
+ `entityid` (columns `hud_area_code`, `metro_code`, `fips`, `fips2010`) or `statecode`; it refuses a file with
88
+ no row for the id. A metro area comes back as one row per county or town, all with the metro's values. The
89
+ workbooks' columns differ by year (`metro_code`/`areaname`/`fips2010` in FY2022, `hud_area_code`/
90
+ `hud_area_name`/`fips` in FY2026-FY2027; FMRs in `fmr_0`..`fmr_4`), and nothing in the file states its fiscal
91
+ year: check the file name. Verified with the FY2022, FY2026 and FY2027 FMR workbooks on 2026-10-22. These pages need a
92
+ browser: scripted requests to huduser.gov/portal get HTTP 202 with an empty body (checked 2026-10-22).
93
+
94
+ ## Citation and terms
95
+ "U.S. Department of Housing and Urban Development, Fair Market Rents (or Income Limits), FY<year>, HUD
96
+ User, retrieved <date>." Public domain U.S. government data; redistribution allowed. Name the fiscal
97
+ year in every citation.
@@ -0,0 +1,215 @@
1
+ <#
2
+ .SYNOPSIS
3
+ Download an IPUMS extract with the IPUMS API: submit it, wait for it, and download the data file and
4
+ the codebook. (Windows PowerShell counterpart of download_ipums.sh.)
5
+
6
+ .DESCRIPTION
7
+ - Asks for your IPUMS API key (hidden input), or uses $env:IPUMS_API_KEY when it is set.
8
+ The key is never shown, saved, or put on a command line.
9
+ - Submits the extract defined in this file, waits until IPUMS has built it (minutes for CPS, NHIS or MEPS, up to
10
+ about 30 minutes for multi-year ACS), and downloads the data file (.csv.gz) and the DDI codebook
11
+ (.xml) into the folder that holds this script.
12
+ - Run it again after an interruption: it continues with the same extract instead of submitting
13
+ a new one. -Number overrides that number; -New submits a new extract.
14
+ - Needs nothing beyond Windows PowerShell 5.1 (built into Windows 10 and 11) or PowerShell 7.
15
+
16
+ Get a key at https://account.ipums.org/api_keys (the account must be registered for @COLLECTION_UPPER@).
17
+
18
+ .PARAMETER Number
19
+ An extract number that was already submitted. Skips the submission.
20
+
21
+ .PARAMETER New
22
+ Submit a new extract, even when one was already submitted (for example after its files expired).
23
+
24
+ .PARAMETER NoPause
25
+ Do not wait for Enter before closing the window.
26
+
27
+ .EXAMPLE
28
+ powershell -NoProfile -ExecutionPolicy Bypass -File .\download_ipums.ps1
29
+ #>
30
+ [CmdletBinding()]
31
+ param(
32
+ [string]$Number,
33
+ [switch]$New,
34
+ [switch]$NoPause
35
+ )
36
+
37
+ $ErrorActionPreference = 'Stop'
38
+ $ProgressPreference = 'SilentlyContinue' # Invoke-WebRequest is very slow with the progress bar
39
+ try {
40
+ [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
41
+ } catch { }
42
+
43
+ $Collection = '@COLLECTION@'
44
+ $BakedNumber = '@NUMBER@'
45
+ $SpecId = '@SPEC_ID@' # names the saved-number file, so another extract's file is ignored
46
+ $Api = 'https://api.ipums.org'
47
+ if ($env:IPUMS_API_BASE) { $Api = $env:IPUMS_API_BASE.TrimEnd('/') }
48
+ $PollSeconds = 15
49
+ $MaxWait = 14400 # 4 hours
50
+
51
+ # The extract definition (the request body for the IPUMS API). Do not edit it by hand.
52
+ $SpecJson = @'
53
+ @SPEC_JSON@
54
+ '@
55
+
56
+ $Here = $PSScriptRoot
57
+ if (-not $Here) { $Here = (Get-Location).Path }
58
+ $NumberFile = Join-Path $Here "extract_number_$($Collection)_$($SpecId).txt"
59
+ $NewCommand = "powershell -NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`" -New"
60
+
61
+ # Keep the window open when the script was started with "Run with PowerShell".
62
+ function Finish([int]$Code) {
63
+ $script:Key = $null
64
+ if (-not $NoPause -and -not [Console]::IsInputRedirected) {
65
+ Write-Host ''
66
+ [void](Read-Host -Prompt 'Press Enter to close')
67
+ }
68
+ exit $Code
69
+ }
70
+
71
+ function Fail([string]$Message) {
72
+ Write-Host ''
73
+ Write-Host "ERROR: $Message" -ForegroundColor Red
74
+ Finish 1
75
+ }
76
+
77
+ # ---------------------------------------------------------------------------- API key
78
+ $Key = $env:IPUMS_API_KEY
79
+ if ($Key) {
80
+ Write-Host 'Using the IPUMS API key in $env:IPUMS_API_KEY.'
81
+ } elseif ([Console]::IsInputRedirected) {
82
+ $Key = [Console]::In.ReadLine()
83
+ } else {
84
+ $secure = Read-Host -Prompt 'Paste your IPUMS API key (input is hidden), then press Enter' -AsSecureString
85
+ $bstr = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secure)
86
+ try { $Key = [Runtime.InteropServices.Marshal]::PtrToStringBSTR($bstr) }
87
+ finally { [Runtime.InteropServices.Marshal]::ZeroFreeBSTR($bstr) }
88
+ Remove-Variable secure
89
+ }
90
+ if ($null -eq $Key) { $Key = '' }
91
+ $Key = $Key -replace '\s', ''
92
+ if (-not $Key) { Fail 'No key entered. Get one at https://account.ipums.org/api_keys' }
93
+
94
+ # ---------------------------------------------------------------------------- HTTP helper
95
+ # Calls the IPUMS API and returns the parsed JSON reply. Retries network errors, 429 and 5xx;
96
+ # stops with a clear message on any other error. $What names the step for error messages.
97
+ function Invoke-Ipums([string]$Method, [string]$Uri, [string]$What, [string]$Body) {
98
+ for ($try = 1; ; $try++) {
99
+ $params = @{ Method = $Method; Uri = $Uri; Headers = @{ Authorization = $script:Key } }
100
+ if ($Body) {
101
+ $params.Body = [Text.Encoding]::UTF8.GetBytes($Body)
102
+ $params.ContentType = 'application/json'
103
+ }
104
+ try {
105
+ return (Invoke-RestMethod @params)
106
+ } catch {
107
+ $code = 0
108
+ if ($_.Exception.Response) { $code = [int]$_.Exception.Response.StatusCode }
109
+ $reply = $_.ErrorDetails.Message
110
+ if (($code -eq 0 -or $code -eq 429 -or $code -ge 500) -and $try -lt 5) {
111
+ Start-Sleep -Seconds (10 * $try)
112
+ continue
113
+ }
114
+ if ($code -eq 0) {
115
+ Fail "Could not reach IPUMS ($Api): $($_.Exception.Message) Check the internet connection, VPN and proxy, then run this script again."
116
+ }
117
+ if ($code -eq 401 -or $code -eq 403) {
118
+ Fail "IPUMS rejected the API key (HTTP $code). Check the key, and that your account is registered for $($Collection.ToUpper()) at https://account.ipums.org/api_keys"
119
+ }
120
+ if ($code -eq 404 -and $Method -eq 'GET') {
121
+ Fail "IPUMS has no $Collection extract number $script:Number for this account. Check the number; to submit a new extract instead, run: $NewCommand"
122
+ }
123
+ Write-Host ''
124
+ Write-Host "IPUMS replied (HTTP $code):"
125
+ Write-Host $reply
126
+ Fail "$What failed. Send the reply above to the analyst. Do not change the extract by hand."
127
+ }
128
+ }
129
+ }
130
+
131
+ # Downloads a file under the name IPUMS gave it, into the script's folder. Returns the path.
132
+ function Save-IpumsFile([string]$Url) {
133
+ $name = [Uri]::UnescapeDataString(([Uri]$Url).Segments[-1])
134
+ $dest = Join-Path $Here $name
135
+ Write-Host "Downloading $name ..."
136
+ try {
137
+ Invoke-WebRequest -Uri $Url -Headers @{ Authorization = $script:Key } -OutFile $dest -UseBasicParsing
138
+ } catch {
139
+ Fail "The download of $name failed ($($_.Exception.Message)). Run this script again (it reuses extract $script:Number)."
140
+ }
141
+ return $dest
142
+ }
143
+
144
+ # ---------------------------------------------------------------------------- 1. submit (or reuse a number)
145
+ if ($New) {
146
+ $Number = ''
147
+ } else {
148
+ if (-not $Number -and (Test-Path -LiteralPath $NumberFile)) {
149
+ $Number = ((Get-Content -LiteralPath $NumberFile -Raw) -replace '[^0-9]', '')
150
+ if ($Number) { Write-Host "Continuing with extract $Number (saved in $NumberFile by an earlier run)." }
151
+ }
152
+ if (-not $Number) { $Number = $BakedNumber }
153
+ }
154
+ if ($Number) {
155
+ if ($Number -notmatch '^[0-9]+$') { Fail "The extract number must be a whole number, not '$Number'." }
156
+ Write-Host "Using $Collection extract $Number (already submitted)."
157
+ } else {
158
+ # for the curl steps: always this extract's definition
159
+ $specFile = Join-Path $Here 'extract_spec.json'
160
+ try { [IO.File]::WriteAllText($specFile, $SpecJson + "`n", (New-Object Text.UTF8Encoding($false))) } catch { }
161
+ Write-Host "Submitting the extract to IPUMS ($Collection)..."
162
+ $reply = Invoke-Ipums 'POST' "$Api/extracts?collection=$Collection&version=2" 'Submitting the extract' $SpecJson
163
+ $Number = [string]$reply.number
164
+ if (-not $Number) { Fail 'IPUMS accepted the request but sent no extract number.' }
165
+ try { Set-Content -LiteralPath $NumberFile -Value $Number -Encoding Ascii } catch { }
166
+ Write-Host "Submitted: $Collection extract $Number."
167
+ }
168
+
169
+ # ---------------------------------------------------------------------------- 2. wait until it is built
170
+ Write-Host "Waiting for IPUMS to build the extract (checked every $PollSeconds seconds; Ctrl+C is safe, run again to continue)."
171
+ $clock = [Diagnostics.Stopwatch]::StartNew()
172
+ while ($true) {
173
+ $info = Invoke-Ipums 'GET' "$Api/extracts/$($Number)?collection=$Collection&version=2" 'Checking the extract status'
174
+ $status = [string]$info.status
175
+ $elapsed = [int]$clock.Elapsed.TotalSeconds
176
+ $line = "`r status: {0,-10} ({1} min {2:00} s)" -f $(if ($status) { $status } else { 'unknown' }), [int][Math]::Floor($elapsed / 60), ($elapsed % 60)
177
+ Write-Host $line -NoNewline
178
+ if ($status -eq 'completed') { Write-Host ''; break }
179
+ if ($status -eq 'failed' -or $status -eq 'canceled') {
180
+ Write-Host ''
181
+ Write-Host 'IPUMS replied:'
182
+ Write-Host ($info | ConvertTo-Json -Depth 20)
183
+ Fail "The extract $status. Send the reply above to the analyst. Do not resubmit or change it by hand."
184
+ }
185
+ if ($elapsed -ge $MaxWait) {
186
+ Fail "Still not ready after $($MaxWait / 3600) hours. Run this script again later: it continues with extract $Number."
187
+ }
188
+ Start-Sleep -Seconds $PollSeconds
189
+ }
190
+
191
+ # ---------------------------------------------------------------------------- 3. download the two files
192
+ $links = $info.downloadLinks
193
+ $dataUrl = $null; $ddiUrl = $null; $dataSha = $null
194
+ if ($links) {
195
+ if ($links.data) { $dataUrl = $links.data.url; $dataSha = $links.data.sha256 }
196
+ if ($links.ddiCodebook) { $ddiUrl = $links.ddiCodebook.url }
197
+ }
198
+ if (-not $dataUrl -or -not $ddiUrl) {
199
+ Fail "Extract $Number is complete but has no download links: IPUMS deletes extract files after about 72 hours. To submit a new extract, run: $NewCommand"
200
+ }
201
+
202
+ $dataFile = Save-IpumsFile $dataUrl
203
+ $ddiFile = Save-IpumsFile $ddiUrl
204
+
205
+ if ($dataSha) {
206
+ $sum = (Get-FileHash -LiteralPath $dataFile -Algorithm SHA256).Hash
207
+ if ($sum -ne $dataSha) { Fail 'The data file is damaged (checksum mismatch). Delete it and run this script again.' }
208
+ Write-Host 'Checksum OK.'
209
+ }
210
+
211
+ Write-Host ''
212
+ Write-Host 'Done. Upload these two files to the chat (do not unzip or edit them):' -ForegroundColor Green
213
+ Write-Host " $dataFile"
214
+ Write-Host " $ddiFile"
215
+ Finish 0