@mailwoman/registry 9.4.0 → 10.1.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 (263) hide show
  1. package/README.md +10 -10
  2. package/lib/address-key.ts +14 -10
  3. package/lib/geocode-handler.ts +6 -4
  4. package/lib/geojson.ts +13 -17
  5. package/lib/ingest.ts +57 -83
  6. package/lib/learned-scorer.ts +38 -44
  7. package/lib/map-html.ts +24 -70
  8. package/lib/models/crosssource-gbt-en-us.ts +9 -7
  9. package/lib/models/dedup-gbt-en-us.ts +9 -8
  10. package/lib/models/org-crosssource-gbt-en-us.ts +10 -8
  11. package/lib/reconcile.ts +45 -55
  12. package/lib/resolve.ts +180 -124
  13. package/lib/types.ts +18 -12
  14. package/out/address-key.d.ts +14 -10
  15. package/out/address-key.d.ts.map +1 -1
  16. package/out/address-key.js +14 -10
  17. package/out/address-key.js.map +1 -1
  18. package/out/geocode-handler.d.ts +6 -4
  19. package/out/geocode-handler.d.ts.map +1 -1
  20. package/out/geocode-handler.js +6 -4
  21. package/out/geocode-handler.js.map +1 -1
  22. package/out/geojson.d.ts +9 -5
  23. package/out/geojson.d.ts.map +1 -1
  24. package/out/geojson.js +13 -15
  25. package/out/geojson.js.map +1 -1
  26. package/out/ingest.d.ts +46 -75
  27. package/out/ingest.d.ts.map +1 -1
  28. package/out/ingest.js +27 -54
  29. package/out/ingest.js.map +1 -1
  30. package/out/learned-scorer.d.ts +29 -26
  31. package/out/learned-scorer.d.ts.map +1 -1
  32. package/out/learned-scorer.js +31 -39
  33. package/out/learned-scorer.js.map +1 -1
  34. package/out/map-html.d.ts +13 -32
  35. package/out/map-html.d.ts.map +1 -1
  36. package/out/map-html.js +9 -62
  37. package/out/map-html.js.map +1 -1
  38. package/out/models/crosssource-gbt-en-us.d.ts +9 -7
  39. package/out/models/crosssource-gbt-en-us.d.ts.map +1 -1
  40. package/out/models/crosssource-gbt-en-us.js +9 -7
  41. package/out/models/crosssource-gbt-en-us.js.map +1 -1
  42. package/out/models/dedup-gbt-en-us.d.ts +9 -8
  43. package/out/models/dedup-gbt-en-us.d.ts.map +1 -1
  44. package/out/models/dedup-gbt-en-us.js +9 -8
  45. package/out/models/dedup-gbt-en-us.js.map +1 -1
  46. package/out/models/org-crosssource-gbt-en-us.d.ts +10 -8
  47. package/out/models/org-crosssource-gbt-en-us.d.ts.map +1 -1
  48. package/out/models/org-crosssource-gbt-en-us.js +10 -8
  49. package/out/models/org-crosssource-gbt-en-us.js.map +1 -1
  50. package/out/reconcile.d.ts +35 -50
  51. package/out/reconcile.d.ts.map +1 -1
  52. package/out/reconcile.js +19 -43
  53. package/out/reconcile.js.map +1 -1
  54. package/out/resolve.d.ts +150 -90
  55. package/out/resolve.d.ts.map +1 -1
  56. package/out/resolve.js +62 -63
  57. package/out/resolve.js.map +1 -1
  58. package/out/tools/coverage-reconciliation.d.ts +23 -23
  59. package/out/tools/coverage-reconciliation.d.ts.map +1 -1
  60. package/out/tools/coverage-reconciliation.js +15 -26
  61. package/out/tools/coverage-reconciliation.js.map +1 -1
  62. package/out/tools/cross/dataset-correlation.d.ts +58 -0
  63. package/out/tools/cross/dataset-correlation.d.ts.map +1 -0
  64. package/out/tools/{cross-dataset-correlation.js → cross/dataset-correlation.js} +10 -62
  65. package/out/tools/cross/dataset-correlation.js.map +1 -0
  66. package/out/tools/cross/source-threshold-sweep.d.ts +60 -0
  67. package/out/tools/cross/source-threshold-sweep.d.ts.map +1 -0
  68. package/out/tools/{cross-source-threshold-sweep.js → cross/source-threshold-sweep.js} +15 -41
  69. package/out/tools/cross/source-threshold-sweep.js.map +1 -0
  70. package/out/tools/dedup-ceiling.d.ts +23 -26
  71. package/out/tools/dedup-ceiling.d.ts.map +1 -1
  72. package/out/tools/dedup-ceiling.js +22 -41
  73. package/out/tools/dedup-ceiling.js.map +1 -1
  74. package/out/tools/eval-geocoder.d.ts +22 -15
  75. package/out/tools/eval-geocoder.d.ts.map +1 -1
  76. package/out/tools/eval-geocoder.js +5 -6
  77. package/out/tools/eval-geocoder.js.map +1 -1
  78. package/out/tools/geocoder/namesake-probe.d.ts +33 -0
  79. package/out/tools/geocoder/namesake-probe.d.ts.map +1 -0
  80. package/out/tools/{geocoder-namesake-probe.js → geocoder/namesake-probe.js} +7 -8
  81. package/out/tools/geocoder/namesake-probe.js.map +1 -0
  82. package/out/tools/geocoder/vs-provided-coords.d.ts +53 -0
  83. package/out/tools/geocoder/vs-provided-coords.d.ts.map +1 -0
  84. package/out/tools/{geocoder-vs-provided-coords.js → geocoder/vs-provided-coords.js} +31 -28
  85. package/out/tools/geocoder/vs-provided-coords.js.map +1 -0
  86. package/out/tools/gold-set-sample.d.ts +27 -18
  87. package/out/tools/gold-set-sample.d.ts.map +1 -1
  88. package/out/tools/gold-set-sample.js +18 -22
  89. package/out/tools/gold-set-sample.js.map +1 -1
  90. package/out/tools/learned/scorer/clustering-eval.d.ts +77 -0
  91. package/out/tools/learned/scorer/clustering-eval.d.ts.map +1 -0
  92. package/out/tools/{learned-scorer-clustering-eval.js → learned/scorer/clustering-eval.js} +29 -39
  93. package/out/tools/learned/scorer/clustering-eval.js.map +1 -0
  94. package/out/tools/learned/scorer/crossstate-eval.d.ts +65 -0
  95. package/out/tools/learned/scorer/crossstate-eval.d.ts.map +1 -0
  96. package/out/tools/{learned-scorer-crossstate-eval.js → learned/scorer/crossstate-eval.js} +20 -26
  97. package/out/tools/learned/scorer/crossstate-eval.js.map +1 -0
  98. package/out/tools/learned/scorer/eval.d.ts +60 -0
  99. package/out/tools/learned/scorer/eval.d.ts.map +1 -0
  100. package/out/tools/{learned-scorer-eval.js → learned/scorer/eval.js} +12 -72
  101. package/out/tools/learned/scorer/eval.js.map +1 -0
  102. package/out/tools/matcher-scale.d.ts +12 -17
  103. package/out/tools/matcher-scale.d.ts.map +1 -1
  104. package/out/tools/matcher-scale.js +11 -29
  105. package/out/tools/matcher-scale.js.map +1 -1
  106. package/out/tools/nppes/dedup-benchmark.d.ts +81 -0
  107. package/out/tools/nppes/dedup-benchmark.d.ts.map +1 -0
  108. package/out/tools/{nppes-dedup-benchmark.js → nppes/dedup-benchmark.js} +21 -67
  109. package/out/tools/nppes/dedup-benchmark.js.map +1 -0
  110. package/out/tools/nppes/org-name.d.ts +5 -4
  111. package/out/tools/nppes/org-name.d.ts.map +1 -1
  112. package/out/tools/nppes/org-name.js +2 -2
  113. package/out/tools/nppes/org-name.js.map +1 -1
  114. package/out/tools/nppes/overmerge-packet.d.ts +15 -11
  115. package/out/tools/nppes/overmerge-packet.d.ts.map +1 -1
  116. package/out/tools/nppes/overmerge-packet.js +7 -8
  117. package/out/tools/nppes/overmerge-packet.js.map +1 -1
  118. package/out/tools/nppes/report.d.ts +17 -13
  119. package/out/tools/nppes/report.d.ts.map +1 -1
  120. package/out/tools/nppes/report.js +6 -14
  121. package/out/tools/nppes/report.js.map +1 -1
  122. package/out/tools/nppes/sample.d.ts +28 -17
  123. package/out/tools/nppes/sample.d.ts.map +1 -1
  124. package/out/tools/nppes/sample.js +23 -26
  125. package/out/tools/nppes/sample.js.map +1 -1
  126. package/out/tools/nppes/scoring.d.ts +7 -6
  127. package/out/tools/nppes/scoring.d.ts.map +1 -1
  128. package/out/tools/nppes/scoring.js +6 -5
  129. package/out/tools/nppes/scoring.js.map +1 -1
  130. package/out/tools/nppes/settings.d.ts +10 -7
  131. package/out/tools/nppes/settings.d.ts.map +1 -1
  132. package/out/tools/nppes/settings.js +16 -16
  133. package/out/tools/nppes/settings.js.map +1 -1
  134. package/out/tools/nppes/truth-grains.d.ts +36 -23
  135. package/out/tools/nppes/truth-grains.d.ts.map +1 -1
  136. package/out/tools/nppes/truth-grains.js +36 -20
  137. package/out/tools/nppes/truth-grains.js.map +1 -1
  138. package/out/tools/shared.d.ts +63 -59
  139. package/out/tools/shared.d.ts.map +1 -1
  140. package/out/tools/shared.js +49 -66
  141. package/out/tools/shared.js.map +1 -1
  142. package/out/tools/train/cross-gbt.d.ts +88 -0
  143. package/out/tools/train/cross-gbt.d.ts.map +1 -0
  144. package/out/tools/{train-cross-gbt.js → train/cross-gbt.js} +15 -26
  145. package/out/tools/train/cross-gbt.js.map +1 -0
  146. package/out/tools/train/gbt.d.ts +85 -0
  147. package/out/tools/train/gbt.d.ts.map +1 -0
  148. package/out/tools/{train-gbt.js → train/gbt.js} +28 -32
  149. package/out/tools/train/gbt.js.map +1 -0
  150. package/out/tools/train/org-cross-gbt.d.ts +84 -0
  151. package/out/tools/train/org-cross-gbt.d.ts.map +1 -0
  152. package/out/tools/{train-org-cross-gbt.js → train/org-cross-gbt.js} +19 -23
  153. package/out/tools/train/org-cross-gbt.js.map +1 -0
  154. package/out/tools/txhhsc-to-oarow.d.ts +14 -9
  155. package/out/tools/txhhsc-to-oarow.d.ts.map +1 -1
  156. package/out/tools/txhhsc-to-oarow.js +16 -15
  157. package/out/tools/txhhsc-to-oarow.js.map +1 -1
  158. package/out/tools/viz/browser.d.ts +6 -5
  159. package/out/tools/viz/browser.d.ts.map +1 -1
  160. package/out/tools/viz/browser.js +6 -5
  161. package/out/tools/viz/browser.js.map +1 -1
  162. package/out/tools/viz/cross-dataset-map.d.ts +7 -4
  163. package/out/tools/viz/cross-dataset-map.d.ts.map +1 -1
  164. package/out/tools/viz/cross-dataset-map.js +9 -6
  165. package/out/tools/viz/cross-dataset-map.js.map +1 -1
  166. package/out/tools/viz/geocode-first-surface.d.ts +10 -5
  167. package/out/tools/viz/geocode-first-surface.d.ts.map +1 -1
  168. package/out/tools/viz/geocode-first-surface.js +16 -11
  169. package/out/tools/viz/geocode-first-surface.js.map +1 -1
  170. package/out/tools/viz/{render-map.d.ts → render/map.d.ts} +6 -6
  171. package/out/tools/viz/render/map.d.ts.map +1 -0
  172. package/out/tools/viz/{render-map.js → render/map.js} +7 -6
  173. package/out/tools/viz/render/map.js.map +1 -0
  174. package/out/tools/viz/render.d.ts +12 -8
  175. package/out/tools/viz/render.d.ts.map +1 -1
  176. package/out/tools/viz/render.js +8 -7
  177. package/out/tools/viz/render.js.map +1 -1
  178. package/out/tools/viz/source-provenance-map.d.ts +19 -7
  179. package/out/tools/viz/source-provenance-map.d.ts.map +1 -1
  180. package/out/tools/viz/source-provenance-map.js +11 -8
  181. package/out/tools/viz/source-provenance-map.js.map +1 -1
  182. package/out/tools/viz/yardstick-figure.d.ts +2 -21
  183. package/out/tools/viz/yardstick-figure.d.ts.map +1 -1
  184. package/out/tools/viz/yardstick-figure.js +3 -39
  185. package/out/tools/viz/yardstick-figure.js.map +1 -1
  186. package/out/types.d.ts +17 -11
  187. package/out/types.d.ts.map +1 -1
  188. package/out/types.js +2 -2
  189. package/out/types.js.map +1 -1
  190. package/package.json +41 -184
  191. package/{lib/tools → tools}/coverage-reconciliation.ts +27 -30
  192. package/{lib/tools/cross-dataset-correlation.ts → tools/cross/dataset-correlation.ts} +31 -72
  193. package/{lib/tools/cross-source-threshold-sweep.ts → tools/cross/source-threshold-sweep.ts} +29 -46
  194. package/{lib/tools → tools}/dedup-ceiling.ts +34 -45
  195. package/tools/eval-geocoder.ts +74 -0
  196. package/{lib/tools/geocoder-namesake-probe.ts → tools/geocoder/namesake-probe.ts} +9 -8
  197. package/{lib/tools/geocoder-vs-provided-coords.ts → tools/geocoder/vs-provided-coords.ts} +39 -30
  198. package/{lib/tools → tools}/gold-set-sample.ts +35 -29
  199. package/{lib/tools/learned-scorer-clustering-eval.ts → tools/learned/scorer/clustering-eval.ts} +49 -45
  200. package/{lib/tools/learned-scorer-crossstate-eval.ts → tools/learned/scorer/crossstate-eval.ts} +34 -30
  201. package/{lib/tools/learned-scorer-eval.ts → tools/learned/scorer/eval.ts} +35 -78
  202. package/{lib/tools → tools}/matcher-scale.ts +21 -33
  203. package/{lib/tools/nppes-dedup-benchmark.ts → tools/nppes/dedup-benchmark.ts} +37 -82
  204. package/{lib/tools → tools}/nppes/org-name.ts +5 -4
  205. package/{lib/tools → tools}/nppes/overmerge-packet.ts +17 -13
  206. package/{lib/tools → tools}/nppes/report.ts +32 -25
  207. package/{lib/tools → tools}/nppes/sample.ts +41 -36
  208. package/{lib/tools → tools}/nppes/scoring.ts +7 -6
  209. package/{lib/tools → tools}/nppes/settings.ts +16 -16
  210. package/{lib/tools → tools}/nppes/truth-grains.ts +46 -26
  211. package/{lib/tools → tools}/shared.ts +73 -83
  212. package/{lib/tools/train-cross-gbt.ts → tools/train/cross-gbt.ts} +38 -34
  213. package/{lib/tools/train-gbt.ts → tools/train/gbt.ts} +55 -41
  214. package/{lib/tools/train-org-cross-gbt.ts → tools/train/org-cross-gbt.ts} +39 -30
  215. package/{lib/tools → tools}/txhhsc-to-oarow.ts +24 -18
  216. package/{lib/tools → tools}/viz/browser.ts +6 -5
  217. package/{lib/tools → tools}/viz/cross-dataset-map.ts +15 -9
  218. package/{lib/tools → tools}/viz/geocode-first-surface.ts +28 -17
  219. package/{lib/tools/viz/render-map.ts → tools/viz/render/map.ts} +7 -6
  220. package/{lib/tools → tools}/viz/render.ts +16 -11
  221. package/{lib/tools → tools}/viz/source-provenance-map.ts +30 -15
  222. package/{lib/tools → tools}/viz/yardstick-figure.ts +6 -43
  223. package/lib/tools/eval-geocoder.ts +0 -67
  224. package/lib/tools/index.ts +0 -31
  225. package/out/tools/cross-dataset-correlation.d.ts +0 -65
  226. package/out/tools/cross-dataset-correlation.d.ts.map +0 -1
  227. package/out/tools/cross-dataset-correlation.js.map +0 -1
  228. package/out/tools/cross-source-threshold-sweep.d.ts +0 -66
  229. package/out/tools/cross-source-threshold-sweep.d.ts.map +0 -1
  230. package/out/tools/cross-source-threshold-sweep.js.map +0 -1
  231. package/out/tools/geocoder-namesake-probe.d.ts +0 -32
  232. package/out/tools/geocoder-namesake-probe.d.ts.map +0 -1
  233. package/out/tools/geocoder-namesake-probe.js.map +0 -1
  234. package/out/tools/geocoder-vs-provided-coords.d.ts +0 -50
  235. package/out/tools/geocoder-vs-provided-coords.d.ts.map +0 -1
  236. package/out/tools/geocoder-vs-provided-coords.js.map +0 -1
  237. package/out/tools/index.d.ts +0 -31
  238. package/out/tools/index.d.ts.map +0 -1
  239. package/out/tools/index.js +0 -31
  240. package/out/tools/index.js.map +0 -1
  241. package/out/tools/learned-scorer-clustering-eval.d.ts +0 -74
  242. package/out/tools/learned-scorer-clustering-eval.d.ts.map +0 -1
  243. package/out/tools/learned-scorer-clustering-eval.js.map +0 -1
  244. package/out/tools/learned-scorer-crossstate-eval.d.ts +0 -59
  245. package/out/tools/learned-scorer-crossstate-eval.d.ts.map +0 -1
  246. package/out/tools/learned-scorer-crossstate-eval.js.map +0 -1
  247. package/out/tools/learned-scorer-eval.d.ts +0 -77
  248. package/out/tools/learned-scorer-eval.d.ts.map +0 -1
  249. package/out/tools/learned-scorer-eval.js.map +0 -1
  250. package/out/tools/nppes-dedup-benchmark.d.ts +0 -101
  251. package/out/tools/nppes-dedup-benchmark.d.ts.map +0 -1
  252. package/out/tools/nppes-dedup-benchmark.js.map +0 -1
  253. package/out/tools/train-cross-gbt.d.ts +0 -78
  254. package/out/tools/train-cross-gbt.d.ts.map +0 -1
  255. package/out/tools/train-cross-gbt.js.map +0 -1
  256. package/out/tools/train-gbt.d.ts +0 -69
  257. package/out/tools/train-gbt.d.ts.map +0 -1
  258. package/out/tools/train-gbt.js.map +0 -1
  259. package/out/tools/train-org-cross-gbt.d.ts +0 -71
  260. package/out/tools/train-org-cross-gbt.d.ts.map +0 -1
  261. package/out/tools/train-org-cross-gbt.js.map +0 -1
  262. package/out/tools/viz/render-map.d.ts.map +0 -1
  263. package/out/tools/viz/render-map.js.map +0 -1
@@ -22,10 +22,13 @@ const SOURCE_LABELS = {
22
22
  };
23
23
  const label = (s) => SOURCE_LABELS[s] ?? s;
24
24
  /**
25
- * Which AGENCY each source belongs to. The two FCC datasets (RHC posted-services + commitments) are ONE agency — so an
26
- * NPPES↔FCC or FCC↔TX link is cross-AGENCY, but an RHC↔commitments link is not. `--cross-agency-only` keeps just the
27
- * entities whose sources span >1 agency: the harder, more striking "no shared key ACROSS agencies" slice (most of the
28
- * raw links are FCC-internal).
25
+ * Which agency each source belongs to.
26
+ *
27
+ * The two FCC datasets (RHC posted-services + commitments) are one agency.
28
+ * So an NPPES↔FCC or FCC↔TX link is cross-agency, but an RHC↔commitments link is not.
29
+ *
30
+ * `--cross-agency-only` keeps just the entities whose sources span >1 agency: the harder,
31
+ * more striking "no shared key across agencies" subset (most of the raw links are FCC-internal).
29
32
  */
30
33
  const SOURCE_AGENCY = {
31
34
  nppes: "CMS",
@@ -36,7 +39,7 @@ const SOURCE_AGENCY = {
36
39
  const agencyOf = (s) => SOURCE_AGENCY[s] ?? s;
37
40
  const sourcesOf = (f) => Array.isArray(f.properties?.sources) ? f.properties.sources : [];
38
41
  /**
39
- * Render the cross-dataset-links GeoJSON to a bucket-colored MapLibre HTML page.
42
+ * Render the cross-dataset-links GeoJSON to a bucket-colored MapLibre html page.
40
43
  */
41
44
  export async function crossDatasetMap(options = {}, report) {
42
45
  const IN = options.in || dataRootPath("record-matcher", "2026-06-16-cross-dataset-links.geojson");
@@ -48,7 +51,7 @@ export async function crossDatasetMap(options = {}, report) {
48
51
  ? { ...parsed, features: parsed.features.filter((f) => new Set(sourcesOf(f).map(agencyOf)).size > 1) }
49
52
  : parsed;
50
53
  // Synthesize a `bucket` per entity = its sorted source-combination, so toMapHTML colors by the link
51
- // TYPE (two-source vs the rarer all-three-source spans) rather than the binary cross/single status.
54
+ // type (two-source vs the rarer all-three-source spans) rather than the binary cross/single status.
52
55
  let triple = 0;
53
56
  const comboCounts = new Map();
54
57
  for (const f of geojson.features) {
@@ -1 +1 @@
1
- {"version":3,"file":"cross-dataset-map.js","sourceRoot":"","sources":["../../../lib/tools/viz/cross-dataset-map.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAG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AC,gBAAgB,CAAA;IAEtE,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE;QAC/B,KAAK,EAAE,gCAAgC,IAAI,aAAa,KAAK,kBAAkB;QAC/E,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,QAAQ;KACjB,CAAC,CAAA;IAEF,MAAM,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC/B,MAAM,EAAE,CAAC,aAAa,GAAG,MAAM,IAAI,GAAG,iBAAiB,CAAC,CAAC,CAAC,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAA;IACvG,MAAM,EAAE,CAAC,wBAAwB,CAAC,CAAA;IAElC,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACrF,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC,CAAA;IACtD,CAAC;IAED,MAAM,EAAE,CAAC,kCAAkC,MAAM,EAAE,CAAC,CAAA;IAEpD,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;AAC7C,CAAC"}
@@ -4,25 +4,30 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
6
  * Plot string-only and string-plus-distance match probabilities using the record matcher's
7
- * Fellegi-Sunter weights. The supplied prior is illustrative and the output is self-contained HTML.
7
+ * Fellegi-Sunter weights. The supplied prior is illustrative and the output is self-contained html.
8
8
  */
9
9
  /**
10
10
  * Options for {@linkcode geocodeFirstSurface}.
11
11
  */
12
12
  export interface GeocodeFirstSurfaceOptions {
13
13
  /**
14
- * Illustrative prior λ. Production's record matcher uses λ=1e-4 (calibrated for the full multi-field model with phone
14
+ * Illustrative prior λ.
15
15
  *
16
- * - Spatial exact-key); here we want the boundary visible in a two-axis slice. Default 0.02.
16
+ * Production's record matcher uses λ=1e-4 (calibrated for the full multi-field model with phone
17
+ *
18
+ * - Spatial exact-key); here we want the boundary visible in a two-axis projection.
19
+ * Default 0.02.
17
20
  */
18
21
  lambda?: number;
19
22
  /**
20
- * Output HTML path. Default `/tmp/geocode-first-surface.html`.
23
+ * Output html path.
24
+ *
25
+ * Default `/tmp/geocode-first-surface.html`.
21
26
  */
22
27
  outHTML?: string;
23
28
  }
24
29
  /**
25
- * Emit the geocode-first decision-surface Plotly HTML — see the module doc.
30
+ * Emit the geocode-first decision-surface Plotly html — see the module doc.
26
31
  */
27
32
  export declare function geocodeFirstSurface(options?: GeocodeFirstSurfaceOptions, report?: (line: string) => void): Promise<{
28
33
  outHTML: string;
@@ -1 +1 @@
1
- {"version":3,"file":"geocode-first-surface.d.ts","sourceRoot":"","sources":["../../../lib/tools/viz/geocode-first-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAuDD;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,GAAE,0BAA+B,EACxC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CA6M9B"}
1
+ {"version":3,"file":"geocode-first-surface.d.ts","sourceRoot":"","sources":["../../../tools/viz/geocode-first-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAuDD;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,GAAE,0BAA+B,EACxC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAkN9B"}
@@ -4,10 +4,11 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
6
  * Plot string-only and string-plus-distance match probabilities using the record matcher's
7
- * Fellegi-Sunter weights. The supplied prior is illustrative and the output is self-contained HTML.
7
+ * Fellegi-Sunter weights. The supplied prior is illustrative and the output is self-contained html.
8
8
  */
9
9
  import { tempRootPath } from "@mailwoman/core/data-root";
10
10
  import { writeLocalFile } from "@mailwoman/core/fs/writers";
11
+ import { stringifyJSON } from "@mailwoman/core/json";
11
12
  /**
12
13
  * Registry/resolve.ts → NAME_LEVELS.
13
14
  */
@@ -48,7 +49,7 @@ function distanceWeight(km) {
48
49
  return levelWeight(DISTANCE_LEVELS.at(-1));
49
50
  }
50
51
  /**
51
- * Emit the geocode-first decision-surface Plotly HTML — see the module doc.
52
+ * Emit the geocode-first decision-surface Plotly html — see the module doc.
52
53
  */
53
54
  export async function geocodeFirstSurface(options = {}, report) {
54
55
  const LAMBDA = options.lambda ?? 0.02;
@@ -62,8 +63,10 @@ export async function geocodeFirstSurface(options = {}, report) {
62
63
  * Geocode-first model: name + distance evidence.
63
64
  */
64
65
  const pGeocodeFirst = (sim, km) => probabilityFromWeight(PRIOR + nameWeight(sim) + distanceWeight(km));
65
- // ── Grid. X = string similarity 0→1. Y = geographic distance, sampled denser near 0 (log-ish) so
66
- // the meaningful same-building / same-block transitions aren't a single pixel. ────────────────
66
+ // ── Grid.
67
+ // X = string similarity 0→1.
68
+ // Y = geographic distance, sampled denser near 0 (log-ish) so the meaningful same-building
69
+ // / same-block transitions aren't a single pixel. ────────────────
67
70
  const NX = 60;
68
71
  const NY = 60;
69
72
  const KM_MAX = 50; // 0 → 50 km, log-spaced
@@ -84,11 +87,12 @@ export async function geocodeFirstSurface(options = {}, report) {
84
87
  label: "Springfield General — IL vs MA",
85
88
  detail: "identical name, ~1500 km apart",
86
89
  sim: 1,
87
- km: 15, // plotted on the far plateau (real distance ~1500 km; clamped into view)
90
+ km: 15, // plotted on the far plateau (real distance ~1500 km. clamped into view)
88
91
  },
89
92
  {
90
- // "St" → "Street" canonicalizes to a high (not exact) name agreement; the trailing "Apt 2"
91
- // keeps it off 1.0. Lands in the 0.88 "high" tier — same place, drifted-but-recognizable string.
93
+ // "St" → "Street" canonicalizes to a high (not exact) name agreement.
94
+ // The trailing "Apt 2" keeps it off 1.0.
95
+ // Lands in the 0.88 "high" tier — same place, drifted-but-recognizable string.
92
96
  label: "123 Main St vs 123 Main Street Apt 2",
93
97
  detail: "same building, drifted string",
94
98
  sim: 0.9,
@@ -102,7 +106,7 @@ export async function geocodeFirstSurface(options = {}, report) {
102
106
  stringP: pStringFirst(t.sim, t.km),
103
107
  geoP: pGeocodeFirst(t.sim, t.km),
104
108
  }));
105
- // ── HTML. ───────────────────────────────────────────────────────────────────────────────────────
109
+ // ── html. ───────────────────────────────────────────────────────────────────────────────────────
106
110
  const data = {
107
111
  simAxis,
108
112
  kmAxis,
@@ -112,9 +116,10 @@ export async function geocodeFirstSurface(options = {}, report) {
112
116
  lambda: LAMBDA,
113
117
  prior: PRIOR,
114
118
  };
115
- // EVERY `<`, not only `</script>`: `<!--` also leaves script-data state in the HTML tokenizer, after which a
116
- // later `</script>` no longer ends the element. `\u003c` is the same string to a JSON reader.
117
- const safe = JSON.stringify(data).replaceAll("<", "\\u003c");
119
+ // Every `<`, not only `</script>`: `<!--` also leaves script-data state in the html
120
+ // tokenizer, after which a later `</script>` no longer ends the element.
121
+ // `\u003c` is the same string to a JSON reader.
122
+ const safe = stringifyJSON(data).replaceAll("<", "\\u003c");
118
123
  const html = `<!doctype html><html><head><meta charset="utf-8"/>
119
124
  <script src="https://cdn.plot.ly/plotly-2.35.2.min.js"></script>
120
125
  <style>
@@ -1 +1 @@
1
- {"version":3,"file":"geocode-first-surface.js","sourceRoot":"","sources":["../../../lib/tools/viz/geocode-first-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AA6B3D;;GAEG;AACH,MAAM,WAAW,GAAY;IAC5B,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE;IACrD,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE;IACxD,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE;CAC1D,CAAA;AAED;;GAEG;AACH,MAAM,eAAe,GAAY;IAChC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE;IACzD,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE;IACpD,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE;IACjD,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE;CACnC,CAAA;AAED,8EAA8E;AAC9E,MAAM,WAAW,GAAG,CAAC,GAAU,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC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AAK,CAAC,CAAC,KAAK,kBAAkB,CAAC,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CACxJ,CAAA;IACF,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAA;AAC7B,CAAC"}
@@ -4,19 +4,19 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
6
  * Render a {@link toMapHTML} page (MapLibre GL + Protomaps basemap) to a PNG via headless Chromium
7
- * — the shared map renderer behind the `registry viz` map figures (an internal helper, not a
7
+ * — the shared map renderer behind the `registry viz` map figures (an internal helper rather than a
8
8
  * command).
9
9
  *
10
10
  * Two house-stack constraints make this fiddlier than the Plotly/SVG renderers:
11
11
  *
12
12
  * - MapLibre needs a real WebGL context — the shared harness (`./browser.ts`) provides one through
13
13
  * SwiftShader.
14
- * - The basemap tiles come from `tiles.mailwoman.ai`, which CORS-restricts to localhost + the docs
15
- * domains — so the page MUST be SERVED OVER LOCALHOST, not opened as a file (a file:// page
14
+ * - The basemap tiles come from `tiles.mailwoman.ai`, which cors-restricts to localhost + the docs
15
+ * domains . Therefore, the page must be served over localhost rather than opened as a file (a file:// page
16
16
  * renders accurate markers on a blank basemap). Serve the output dir first, e.g. `python3 -m
17
17
  * http.server 8899 -d <dir>`, then point this at `http://localhost:8899/<page>.html`.
18
18
  *
19
- * The map paints asynchronously after the network settles; we wait for networkidle, then a fixed
19
+ * The map paints asynchronously after the network settles. we wait for networkidle, then a fixed
20
20
  * beat for the basemap tiles + marker layer to finish compositing.
21
21
  */
22
22
  /**
@@ -24,7 +24,7 @@
24
24
  */
25
25
  export interface RenderMapOptions {
26
26
  /**
27
- * The served localhost URL of the map page (NOT a file:// path — see the module doc).
27
+ * The served localhost URL of the map page (not a file:// path — see the module doc).
28
28
  */
29
29
  url: string;
30
30
  /**
@@ -39,4 +39,4 @@ export declare function renderServedMapToPNG(options: RenderMapOptions, report?:
39
39
  outPNG: string;
40
40
  consoleErrors: string[];
41
41
  }>;
42
- //# sourceMappingURL=render-map.d.ts.map
42
+ //# sourceMappingURL=map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../../tools/viz/render/map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,gBAAgB,EACzB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAgBtD"}
@@ -4,19 +4,19 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
6
  * Render a {@link toMapHTML} page (MapLibre GL + Protomaps basemap) to a PNG via headless Chromium
7
- * — the shared map renderer behind the `registry viz` map figures (an internal helper, not a
7
+ * — the shared map renderer behind the `registry viz` map figures (an internal helper rather than a
8
8
  * command).
9
9
  *
10
10
  * Two house-stack constraints make this fiddlier than the Plotly/SVG renderers:
11
11
  *
12
12
  * - MapLibre needs a real WebGL context — the shared harness (`./browser.ts`) provides one through
13
13
  * SwiftShader.
14
- * - The basemap tiles come from `tiles.mailwoman.ai`, which CORS-restricts to localhost + the docs
15
- * domains — so the page MUST be SERVED OVER LOCALHOST, not opened as a file (a file:// page
14
+ * - The basemap tiles come from `tiles.mailwoman.ai`, which cors-restricts to localhost + the docs
15
+ * domains . Therefore, the page must be served over localhost rather than opened as a file (a file:// page
16
16
  * renders accurate markers on a blank basemap). Serve the output dir first, e.g. `python3 -m
17
17
  * http.server 8899 -d <dir>`, then point this at `http://localhost:8899/<page>.html`.
18
18
  *
19
- * The map paints asynchronously after the network settles; we wait for networkidle, then a fixed
19
+ * The map paints asynchronously after the network settles. we wait for networkidle, then a fixed
20
20
  * beat for the basemap tiles + marker layer to finish compositing.
21
21
  */
22
22
  import { withChromiumPage } from "#tools/viz/browser";
@@ -26,7 +26,8 @@ import { withChromiumPage } from "#tools/viz/browser";
26
26
  export async function renderServedMapToPNG(options, report) {
27
27
  const { consoleErrors: errors } = await withChromiumPage({ viewport: { width: 1100, height: 760 } }, async (page) => {
28
28
  await page.goto(options.url, { waitUntil: "networkidle", timeout: 30_000 });
29
- // MapLibre composites tiles + the marker layer async after the network settles; give it a beat.
29
+ // MapLibre composites tiles + the marker layer async after the network settles.
30
+ // Give it a beat.
30
31
  await page.waitForTimeout(4000);
31
32
  await page.screenshot({ path: options.outPNG });
32
33
  });
@@ -36,4 +37,4 @@ export async function renderServedMapToPNG(options, report) {
36
37
  }
37
38
  return { outPNG: options.outPNG, consoleErrors: errors };
38
39
  }
39
- //# sourceMappingURL=render-map.js.map
40
+ //# sourceMappingURL=map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../tools/viz/render/map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAgBrD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACzC,OAAyB,EACzB,MAA+B;IAE/B,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACnH,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;QAC3E,gFAAgF;QAChF,kBAAkB;QAClB,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;QAC/B,MAAM,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAChD,CAAC,CAAC,CAAA;IAEF,MAAM,EAAE,CAAC,gBAAgB,OAAO,CAAC,MAAM,oBAAoB,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;IAE3E,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACpC,MAAM,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAA;IACnB,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,CAAA;AACzD,CAAC"}
@@ -3,11 +3,11 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Render a self-contained Plotly HTML to a PNG via headless Chromium — the shared renderer behind
7
- * the `registry viz` figures (an internal helper, not a command).
6
+ * Render a self-contained Plotly html to a PNG via headless Chromium — the shared renderer behind
7
+ * the `registry viz` figures (an internal helper rather than a command).
8
8
  *
9
- * Plotly 3D (`surface`/`scatter3d`) needs a real WebGL context, which the shared harness
10
- * (`./browser.ts`) provides through SwiftShader; 2D traces (`contour`/`heatmap`) render on the 2D
9
+ * Plotly 3D (`surface`/`scatter3d`) needs a real WebGL context. The shared harness
10
+ * (`./browser.ts`) provides through SwiftShader. 2D traces (`contour`/`heatmap`) render on the 2D
11
11
  * canvas regardless. We wait for Plotly's `plotly_afterplot` to fire on every graph div rather
12
12
  * than a fixed sleep, so the screenshot can't race the (async) WebGL paint.
13
13
  */
@@ -16,7 +16,7 @@
16
16
  */
17
17
  export interface RenderPlotlyOptions {
18
18
  /**
19
- * The self-contained Plotly HTML file.
19
+ * The self-contained Plotly html file.
20
20
  */
21
21
  inHTML: string;
22
22
  /**
@@ -24,16 +24,20 @@ export interface RenderPlotlyOptions {
24
24
  */
25
25
  outPNG: string;
26
26
  /**
27
- * Viewport width. Default 1160.
27
+ * Viewport width.
28
+ *
29
+ * Default 1160.
28
30
  */
29
31
  width?: number;
30
32
  /**
31
- * Viewport height. Default 1000.
33
+ * Viewport height.
34
+ *
35
+ * Default 1000.
32
36
  */
33
37
  height?: number;
34
38
  }
35
39
  /**
36
- * Screenshot a Plotly HTML page after every graph div's `plotly_afterplot` fires.
40
+ * Screenshot a Plotly html page after every graph div's `plotly_afterplot` fires.
37
41
  */
38
42
  export declare function renderPlotlyHTMLToPNG(options: RenderPlotlyOptions, report?: (line: string) => void): Promise<{
39
43
  outPNG: string;
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../lib/tools/viz/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,mBAAmB,EAC5B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAkDtD"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../tools/viz/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,mBAAmB,EAC5B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAmDtD"}
@@ -3,11 +3,11 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Render a self-contained Plotly HTML to a PNG via headless Chromium — the shared renderer behind
7
- * the `registry viz` figures (an internal helper, not a command).
6
+ * Render a self-contained Plotly html to a PNG via headless Chromium — the shared renderer behind
7
+ * the `registry viz` figures (an internal helper rather than a command).
8
8
  *
9
- * Plotly 3D (`surface`/`scatter3d`) needs a real WebGL context, which the shared harness
10
- * (`./browser.ts`) provides through SwiftShader; 2D traces (`contour`/`heatmap`) render on the 2D
9
+ * Plotly 3D (`surface`/`scatter3d`) needs a real WebGL context. The shared harness
10
+ * (`./browser.ts`) provides through SwiftShader. 2D traces (`contour`/`heatmap`) render on the 2D
11
11
  * canvas regardless. We wait for Plotly's `plotly_afterplot` to fire on every graph div rather
12
12
  * than a fixed sleep, so the screenshot can't race the (async) WebGL paint.
13
13
  */
@@ -15,13 +15,14 @@ import { pathToFileURL } from "@mailwoman/core/module/file-url";
15
15
  import { resolvePath as resolve } from "path-ts";
16
16
  import { withChromiumPage } from "#tools/viz/browser";
17
17
  /**
18
- * Screenshot a Plotly HTML page after every graph div's `plotly_afterplot` fires.
18
+ * Screenshot a Plotly html page after every graph div's `plotly_afterplot` fires.
19
19
  */
20
20
  export async function renderPlotlyHTMLToPNG(options, report) {
21
21
  const { consoleErrors: errors } = await withChromiumPage({ viewport: { width: options.width ?? 1160, height: options.height ?? 1000 } }, async (page) => {
22
22
  await page.goto(pathToFileURL(resolve(options.inHTML)).href, { waitUntil: "networkidle" });
23
- // Resolve once every Plotly graph div has fired plotly_afterplot (3D paints land async, after
24
- // newPlot's promise resolves), with a per-div fallback so an already-painted div can't hang us.
23
+ // Resolve once every Plotly graph div has fired plotly_afterplot
24
+ // (3D paints land async, after newPlot's promise resolves), with a per-div fallback
25
+ // so an already-painted div can't hang us.
25
26
  await page.evaluate(async () => {
26
27
  const doc = Reflect.get(globalThis, "document");
27
28
  const divs = [...doc.querySelectorAll("div")]
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../../../lib/tools/viz/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,SAAS,CAAA;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAwBrD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAC1C,OAA4B,EAC5B,MAA+B;IAE/B,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM,gBAAgB,CACvD,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI,EAAE,EAAE,EAC9E,KAAK,EAAE,IAAI,EAAE,EAAE;QACd,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CAAA;QAE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6
  * Sample `address_point.source` rows from a state database and render them by source in MapLibre.
7
- * The output requires an HTTP origin because the tile server does not serve `file:` origins.
7
+ * The output requires an http origin because the tile server does not serve `file:` origins.
8
8
  */
9
9
  /**
10
10
  * Options for {@linkcode sourceProvenanceMap}.
11
11
  */
12
12
  export interface SourceProvenanceMapOptions {
13
13
  /**
14
- * State (lowercase postal). Default ny.
14
+ * State (lowercase postal).
15
+ *
16
+ * Default ny.
15
17
  */
16
18
  state?: string;
17
19
  /**
18
- * Address-point DB path. Default `$MAILWOMAN_DATA_ROOT/address-points/address-points-us-<state>.db`.
20
+ * Address-point DB path.
21
+ *
22
+ * Default `$MAILWOMAN_DATA_ROOT/db/address-points/address-points-us-<state>.db`.
19
23
  */
20
24
  db?: string;
21
25
  /**
22
- * Output HTML path. Default `/tmp/source-provenance.html`.
26
+ * Output html path.
27
+ *
28
+ * Default `/tmp/source-provenance.html`.
23
29
  */
24
30
  outHTML?: string;
25
31
  /**
26
- * Keep ~1/N of NAD points. Default 700.
32
+ * Keep ~1/N of NAD points.
33
+ *
34
+ * Default 700.
27
35
  */
28
36
  nadMod?: number;
29
37
  /**
30
- * Keep ~1/N of OpenAddresses points. Default 120.
38
+ * Keep ~1/N of OpenAddresses points.
39
+ *
40
+ * Default 120.
31
41
  */
32
42
  oaMod?: number;
33
43
  /**
34
- * Per-source marker cap. Default 7000.
44
+ * Per-source marker cap.
45
+ *
46
+ * Default 7000.
35
47
  */
36
48
  cap?: number;
37
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"source-provenance-map.d.ts","sourceRoot":"","sources":["../../../lib/tools/viz/source-provenance-map.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACZ;AAuBD;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,GAAE,0BAA+B,EACxC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CA+D9C"}
1
+ {"version":3,"file":"source-provenance-map.d.ts","sourceRoot":"","sources":["../../../tools/viz/source-provenance-map.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACZ;AAwBD;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,GAAE,0BAA+B,EACxC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAgE9C"}
@@ -4,16 +4,18 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
6
  * Sample `address_point.source` rows from a state database and render them by source in MapLibre.
7
- * The output requires an HTTP origin because the tile server does not serve `file:` origins.
7
+ * The output requires an http origin because the tile server does not serve `file:` origins.
8
8
  */
9
- import { dataRootPath, tempRootPath } from "@mailwoman/core/data-root";
9
+ import { tempRootPath } from "@mailwoman/core/data-root";
10
10
  import { writeLocalFile } from "@mailwoman/core/fs/writers";
11
11
  import { isPresent } from "@mailwoman/core/objects";
12
+ import { addressPointDatabasePath } from "@mailwoman/resolver-wof-sqlite/paths";
12
13
  import { DatabaseClient } from "@mailwoman/sqlite/client";
13
14
  import { toMapHTML } from "#index";
14
- // Collapse the raw `source` string into a human, mappable category. The address-point DB stores e.g.
15
- // "overture:NAD" or "overture:OpenAddresses/NY/NYC Open Data" — the suffix is the real upstream
16
- // publisher, which is what we want to color by (the "overture:" prefix is just the theme it arrived in).
15
+ // Collapse the raw `source` string into a human, mappable category.
16
+ // The address-point DB stores e.g. "overture:NAD" or "overture:OpenAddresses/NY/NYC Open Data".
17
+ // The suffix gives the real upstream publisher.
18
+ // Color features by that value (the "overture:" prefix is just the theme it arrived in).
17
19
  function categorize(source) {
18
20
  if (source === "overture:NAD")
19
21
  return { bucket: "National Address Database", publisher: "NAD (federal)" };
@@ -28,14 +30,15 @@ function categorize(source) {
28
30
  */
29
31
  export async function sourceProvenanceMap(options = {}, report) {
30
32
  const STATE = (options.state || "ny").toLowerCase();
31
- const DB = options.db || String(dataRootPath("address-points", `address-points-us-${STATE}.db`));
33
+ const DB = options.db || addressPointDatabasePath(`address-points-us-${STATE}.db`);
32
34
  const OUT = options.outHTML || tempRootPath("source-provenance.html");
33
35
  const NAD_MOD = options.nadMod ?? 700; // keep ~1/700 of NAD points
34
36
  const OA_MOD = options.oaMod ?? 120; // keep ~1/120 of OpenAddresses points
35
37
  const CAP = options.cap ?? 7000; // per-source marker cap
36
38
  using db = new DatabaseClient(DB, { readOnly: true });
37
- // Two stratified samples so the smaller source (OpenAddresses, ~1/6 of NY) stays visible next to NAD.
38
- // abs(random()) % mod == 0 keeps a spatially-uniform ~1/mod fraction; LIMIT caps the marker count.
39
+ // Two stratified samples so the smaller source (OpenAddresses, ~1/6 of NY) stays visible
40
+ // next to NAD. abs(random()) % mod == 0 keeps a spatially-uniform ~1/mod fraction.
41
+ // Limit caps the marker count.
39
42
  const sample = (where, mod) => db
40
43
  .prepare(`SELECT lat, lon, source, number, street_raw FROM address_point
41
44
  WHERE ${where} AND lat IS NOT NULL AND lon IS NOT NULL AND abs(random()) % ${mod} = 0
@@ -1 +1 @@
1
- {"version":3,"file":"source-provenance-map.js","sourceRoot":"","sources":["../../../lib/tools/viz/source-provenance-map.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,EAAuB,SAAS,EAAE,MAAM,QAAQ,CAAA;AAgCvD,qGAAqG;AACrG,gGAAgG;AAChG,yGAAyG;AACzG,SAAS,UAAU,CAAC,MAAc;IACjC,IAAI,MAAM,KAAK,cAAc;QAAE,OAAO,EAAE,MAAM,EAAE,2BAA2B,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;IAEzG,IAAI,MAAM,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAAE,CAAC;QACjD,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,eAAe,CAAA;QAE7D,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,mBAAmB,SAAS,EAAE,EAAE,CAAA;IAC9E,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAA;AAC7C,CAAC;AAQD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,UAAsC,EAAE,EACxC,MAA+B;IAE/B,MAAM,KAAK,GAAG,CAAC,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KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC,CAAA;IACrD,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAA;AACjD,CAAC"}
@@ -2,33 +2,14 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * The yardstick figure — "the dedup F1 climbs as the entity-truth gets honest."
7
- *
8
- * The #625 finding, made visual: the matcher's MEASURED dedup quality depends almost entirely on
9
- * which ruler you grade it against, not on the model. NPI-as-truth OVER-SEGMENTS (one org holds
10
- * many NPIs), so the matcher's correct co-located same-org merges are scored as errors. Grade the
11
- * IDENTICAL clusters against a gold-set-validated org-name truth and the F1 climbs — the ruler
12
- * ceasing to charge for correct merges, not the model changing — peaking when the ruler keys on
13
- * the geocoded BUILDING (the geocode-first coordinate) rather than the address string (+14.5pp
14
- * NPI → coord).
15
- *
16
- * A slope chart over four rulers (NPI → site → org-name → org-name-coord) for the shipped GBT
17
- * scorer and the FS baseline. Numbers are the committed measurement in
18
- * `docs/records/evals/matcher-dedup/2026-06-16-dedup-dual-level-benchmark.md` (1000 TX NPIs → 2757 records).
19
- *
20
- * Emits a self-contained SVG (the docs' committed-chart-asset convention — see
21
- * `docs/records/evals/charts/*.svg`), no browser required.
22
- *
23
- * Run: `mailwoman registry viz yardstick-figure
24
- * [--out-svg docs/records/evals/charts/dedup-yardstick.svg]`
25
5
  */
26
6
  /**
27
7
  * Options for {@linkcode yardstickFigure}.
28
8
  */
29
9
  export interface YardstickFigureOptions {
30
10
  /**
31
- * Output SVG path. Default `docs/records/evals/charts/dedup-yardstick.svg` (relative to cwd).
11
+ * Sets the output SVG path relative to the working directory, defaulting
12
+ * to `docs/records/evals/charts/dedup-yardstick.svg`.
32
13
  */
33
14
  outSVG?: string;
34
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"yardstick-figure.d.ts","sourceRoot":"","sources":["../../../lib/tools/viz/yardstick-figure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAKH;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;AA6DD;;GAEG;AACH,wBAAsB,eAAe,CACpC,OAAO,GAAE,sBAA2B,EACpC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAiI7B"}
1
+ {"version":3,"file":"yardstick-figure.d.ts","sourceRoot":"","sources":["../../../tools/viz/yardstick-figure.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;AAmDD;;GAEG;AACH,wBAAsB,eAAe,CACpC,OAAO,GAAE,sBAA2B,EACpC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAyH7B"}