@mailwoman/registry 9.1.0 → 9.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.
- package/README.md +2 -2
- package/{address-key.ts → lib/address-key.ts} +1 -1
- package/{geocode-handler.ts → lib/geocode-handler.ts} +7 -7
- package/{geojson.ts → lib/geojson.ts} +12 -6
- package/{index.ts → lib/index.ts} +10 -10
- package/{ingest.ts → lib/ingest.ts} +77 -69
- package/{learned-scorer.ts → lib/learned-scorer.ts} +1 -1
- package/{map-html.ts → lib/map-html.ts} +10 -16
- package/{reconcile.ts → lib/reconcile.ts} +9 -24
- package/{resolve.ts → lib/resolve.ts} +31 -13
- package/{tools → lib/tools}/coverage-reconciliation.ts +13 -15
- package/{tools → lib/tools}/cross-dataset-correlation.ts +64 -139
- package/{tools → lib/tools}/cross-source-threshold-sweep.ts +21 -32
- package/{tools → lib/tools}/dedup-ceiling.ts +33 -144
- package/{tools → lib/tools}/eval-geocoder.ts +10 -11
- package/{tools → lib/tools}/geocoder-namesake-probe.ts +5 -12
- package/{tools → lib/tools}/geocoder-vs-provided-coords.ts +12 -11
- package/lib/tools/gold-set-sample.ts +141 -0
- package/lib/tools/index.ts +31 -0
- package/{tools → lib/tools}/learned-scorer-clustering-eval.ts +71 -260
- package/{tools → lib/tools}/learned-scorer-crossstate-eval.ts +62 -245
- package/{tools → lib/tools}/learned-scorer-eval.ts +64 -263
- package/{tools → lib/tools}/matcher-scale.ts +5 -5
- package/lib/tools/nppes/org-name.ts +23 -0
- package/lib/tools/nppes/overmerge-packet.ts +94 -0
- package/lib/tools/nppes/report.ts +373 -0
- package/lib/tools/nppes/sample.ts +245 -0
- package/lib/tools/nppes/scoring.ts +114 -0
- package/lib/tools/nppes/settings.ts +102 -0
- package/lib/tools/nppes/truth-grains.ts +161 -0
- package/lib/tools/nppes-dedup-benchmark.ts +408 -0
- package/lib/tools/shared.ts +763 -0
- package/lib/tools/train-cross-gbt.ts +209 -0
- package/{tools → lib/tools}/train-gbt.ts +38 -156
- package/lib/tools/train-org-cross-gbt.ts +179 -0
- package/{tools → lib/tools}/txhhsc-to-oarow.ts +10 -28
- package/lib/tools/viz/browser.ts +50 -0
- package/{tools → lib/tools}/viz/cross-dataset-map.ts +16 -39
- package/{tools → lib/tools}/viz/geocode-first-surface.ts +13 -39
- package/{tools → lib/tools}/viz/render-map.ts +10 -23
- package/lib/tools/viz/render.ts +98 -0
- package/{tools → lib/tools}/viz/source-provenance-map.ts +20 -39
- package/{tools → lib/tools}/viz/yardstick-figure.ts +6 -5
- package/{types.ts → lib/types.ts} +10 -1
- package/out/address-key.d.ts +1 -1
- package/out/address-key.d.ts.map +1 -1
- package/out/address-key.js.map +1 -1
- package/out/geocode-handler.d.ts +6 -6
- package/out/geocode-handler.d.ts.map +1 -1
- package/out/geocode-handler.js +6 -6
- package/out/geocode-handler.js.map +1 -1
- package/out/geojson.d.ts +7 -2
- package/out/geojson.d.ts.map +1 -1
- package/out/geojson.js +8 -5
- package/out/geojson.js.map +1 -1
- package/out/index.d.ts +10 -10
- package/out/index.d.ts.map +1 -1
- package/out/index.js +10 -10
- package/out/index.js.map +1 -1
- package/out/ingest.d.ts +64 -46
- package/out/ingest.d.ts.map +1 -1
- package/out/ingest.js +33 -46
- package/out/ingest.js.map +1 -1
- package/out/learned-scorer.d.ts +1 -1
- package/out/learned-scorer.d.ts.map +1 -1
- package/out/learned-scorer.js.map +1 -1
- package/out/map-html.d.ts +4 -4
- package/out/map-html.d.ts.map +1 -1
- package/out/map-html.js +6 -11
- package/out/map-html.js.map +1 -1
- package/out/models/crosssource-gbt-en-us.d.ts.map +1 -1
- package/out/models/crosssource-gbt-en-us.js.map +1 -1
- package/out/models/dedup-gbt-en-us.d.ts.map +1 -1
- package/out/models/dedup-gbt-en-us.js.map +1 -1
- package/out/models/org-crosssource-gbt-en-us.d.ts.map +1 -1
- package/out/models/org-crosssource-gbt-en-us.js.map +1 -1
- package/out/reconcile.d.ts +6 -1
- package/out/reconcile.d.ts.map +1 -1
- package/out/reconcile.js +7 -21
- package/out/reconcile.js.map +1 -1
- package/out/resolve.d.ts +19 -7
- package/out/resolve.d.ts.map +1 -1
- package/out/resolve.js +20 -6
- package/out/resolve.js.map +1 -1
- package/out/tools/coverage-reconciliation.d.ts +1 -1
- package/out/tools/coverage-reconciliation.d.ts.map +1 -1
- package/out/tools/coverage-reconciliation.js +12 -12
- package/out/tools/coverage-reconciliation.js.map +1 -1
- package/out/tools/cross-dataset-correlation.d.ts +4 -4
- package/out/tools/cross-dataset-correlation.d.ts.map +1 -1
- package/out/tools/cross-dataset-correlation.js +60 -111
- package/out/tools/cross-dataset-correlation.js.map +1 -1
- package/out/tools/cross-source-threshold-sweep.d.ts +2 -2
- package/out/tools/cross-source-threshold-sweep.d.ts.map +1 -1
- package/out/tools/cross-source-threshold-sweep.js +19 -27
- package/out/tools/cross-source-threshold-sweep.js.map +1 -1
- package/out/tools/dedup-ceiling.d.ts.map +1 -1
- package/out/tools/dedup-ceiling.js +36 -118
- package/out/tools/dedup-ceiling.js.map +1 -1
- package/out/tools/eval-geocoder.d.ts +9 -13
- package/out/tools/eval-geocoder.d.ts.map +1 -1
- package/out/tools/eval-geocoder.js +2 -2
- package/out/tools/eval-geocoder.js.map +1 -1
- package/out/tools/geocoder-namesake-probe.d.ts +2 -2
- package/out/tools/geocoder-namesake-probe.d.ts.map +1 -1
- package/out/tools/geocoder-namesake-probe.js +4 -8
- package/out/tools/geocoder-namesake-probe.js.map +1 -1
- package/out/tools/geocoder-vs-provided-coords.d.ts +1 -1
- package/out/tools/geocoder-vs-provided-coords.d.ts.map +1 -1
- package/out/tools/geocoder-vs-provided-coords.js +11 -9
- package/out/tools/geocoder-vs-provided-coords.js.map +1 -1
- package/out/tools/gold-set-sample.d.ts +5 -5
- package/out/tools/gold-set-sample.d.ts.map +1 -1
- package/out/tools/gold-set-sample.js +37 -121
- package/out/tools/gold-set-sample.js.map +1 -1
- package/out/tools/index.d.ts +24 -29
- package/out/tools/index.d.ts.map +1 -1
- package/out/tools/index.js +24 -29
- package/out/tools/index.js.map +1 -1
- package/out/tools/learned-scorer-clustering-eval.d.ts +1 -1
- package/out/tools/learned-scorer-clustering-eval.d.ts.map +1 -1
- package/out/tools/learned-scorer-clustering-eval.js +35 -170
- package/out/tools/learned-scorer-clustering-eval.js.map +1 -1
- package/out/tools/learned-scorer-crossstate-eval.d.ts +5 -5
- package/out/tools/learned-scorer-crossstate-eval.d.ts.map +1 -1
- package/out/tools/learned-scorer-crossstate-eval.js +44 -166
- package/out/tools/learned-scorer-crossstate-eval.js.map +1 -1
- package/out/tools/learned-scorer-eval.d.ts +1 -1
- package/out/tools/learned-scorer-eval.d.ts.map +1 -1
- package/out/tools/learned-scorer-eval.js +37 -173
- package/out/tools/learned-scorer-eval.js.map +1 -1
- package/out/tools/matcher-scale.d.ts.map +1 -1
- package/out/tools/matcher-scale.js +5 -5
- package/out/tools/matcher-scale.js.map +1 -1
- package/out/tools/nppes/org-name.d.ts +21 -0
- package/out/tools/nppes/org-name.d.ts.map +1 -0
- package/out/tools/nppes/org-name.js +13 -0
- package/out/tools/nppes/org-name.js.map +1 -0
- package/out/tools/nppes/overmerge-packet.d.ts +39 -0
- package/out/tools/nppes/overmerge-packet.d.ts.map +1 -0
- package/out/tools/nppes/overmerge-packet.js +55 -0
- package/out/tools/nppes/overmerge-packet.js.map +1 -0
- package/out/tools/nppes/report.d.ts +93 -0
- package/out/tools/nppes/report.d.ts.map +1 -0
- package/out/tools/nppes/report.js +186 -0
- package/out/tools/nppes/report.js.map +1 -0
- package/out/tools/nppes/sample.d.ts +90 -0
- package/out/tools/nppes/sample.d.ts.map +1 -0
- package/out/tools/nppes/sample.js +131 -0
- package/out/tools/nppes/sample.js.map +1 -0
- package/out/tools/nppes/scoring.d.ts +36 -0
- package/out/tools/nppes/scoring.d.ts.map +1 -0
- package/out/tools/nppes/scoring.js +80 -0
- package/out/tools/nppes/scoring.js.map +1 -0
- package/out/tools/nppes/settings.d.ts +38 -0
- package/out/tools/nppes/settings.d.ts.map +1 -0
- package/out/tools/nppes/settings.js +79 -0
- package/out/tools/nppes/settings.js.map +1 -0
- package/out/tools/nppes/truth-grains.d.ts +50 -0
- package/out/tools/nppes/truth-grains.d.ts.map +1 -0
- package/out/tools/nppes/truth-grains.js +123 -0
- package/out/tools/nppes/truth-grains.js.map +1 -0
- package/out/tools/nppes-dedup-benchmark.d.ts +7 -3
- package/out/tools/nppes-dedup-benchmark.d.ts.map +1 -1
- package/out/tools/nppes-dedup-benchmark.js +106 -673
- package/out/tools/nppes-dedup-benchmark.js.map +1 -1
- package/out/tools/shared.d.ts +244 -7
- package/out/tools/shared.d.ts.map +1 -1
- package/out/tools/shared.js +353 -21
- package/out/tools/shared.js.map +1 -1
- package/out/tools/train-cross-gbt.d.ts +7 -7
- package/out/tools/train-cross-gbt.d.ts.map +1 -1
- package/out/tools/train-cross-gbt.js +47 -145
- package/out/tools/train-cross-gbt.js.map +1 -1
- package/out/tools/train-gbt.d.ts +7 -7
- package/out/tools/train-gbt.d.ts.map +1 -1
- package/out/tools/train-gbt.js +31 -111
- package/out/tools/train-gbt.js.map +1 -1
- package/out/tools/train-org-cross-gbt.d.ts +7 -5
- package/out/tools/train-org-cross-gbt.d.ts.map +1 -1
- package/out/tools/train-org-cross-gbt.js +45 -141
- package/out/tools/train-org-cross-gbt.js.map +1 -1
- package/out/tools/txhhsc-to-oarow.d.ts +2 -2
- package/out/tools/txhhsc-to-oarow.d.ts.map +1 -1
- package/out/tools/txhhsc-to-oarow.js +9 -23
- package/out/tools/txhhsc-to-oarow.js.map +1 -1
- package/out/tools/viz/browser.d.ts +34 -0
- package/out/tools/viz/browser.d.ts.map +1 -0
- package/out/tools/viz/browser.js +33 -0
- package/out/tools/viz/browser.js.map +1 -0
- package/out/tools/viz/cross-dataset-map.d.ts +4 -25
- package/out/tools/viz/cross-dataset-map.d.ts.map +1 -1
- package/out/tools/viz/cross-dataset-map.js +12 -33
- package/out/tools/viz/cross-dataset-map.js.map +1 -1
- package/out/tools/viz/geocode-first-surface.d.ts +6 -35
- package/out/tools/viz/geocode-first-surface.d.ts.map +1 -1
- package/out/tools/viz/geocode-first-surface.js +10 -37
- package/out/tools/viz/geocode-first-surface.js.map +1 -1
- package/out/tools/viz/render-map.d.ts +3 -6
- package/out/tools/viz/render-map.d.ts.map +1 -1
- package/out/tools/viz/render-map.js +9 -19
- package/out/tools/viz/render-map.js.map +1 -1
- package/out/tools/viz/render.d.ts +4 -9
- package/out/tools/viz/render.d.ts.map +1 -1
- package/out/tools/viz/render.js +24 -39
- package/out/tools/viz/render.js.map +1 -1
- package/out/tools/viz/source-provenance-map.d.ts +4 -24
- package/out/tools/viz/source-provenance-map.d.ts.map +1 -1
- package/out/tools/viz/source-provenance-map.js +12 -32
- package/out/tools/viz/source-provenance-map.js.map +1 -1
- package/out/tools/viz/yardstick-figure.d.ts +2 -2
- package/out/tools/viz/yardstick-figure.d.ts.map +1 -1
- package/out/tools/viz/yardstick-figure.js +5 -4
- package/out/tools/viz/yardstick-figure.js.map +1 -1
- package/out/types.d.ts +11 -1
- package/out/types.d.ts.map +1 -1
- package/out/types.js.map +1 -1
- package/package.json +180 -11
- package/tools/gold-set-sample.ts +0 -252
- package/tools/index.ts +0 -36
- package/tools/nppes-dedup-benchmark.ts +0 -1180
- package/tools/shared.ts +0 -160
- package/tools/train-cross-gbt.ts +0 -358
- package/tools/train-org-cross-gbt.ts +0 -329
- package/tools/viz/render.ts +0 -113
- /package/{models → lib/models}/crosssource-gbt-en-us.ts +0 -0
- /package/{models → lib/models}/dedup-gbt-en-us.ts +0 -0
- /package/{models → lib/models}/org-crosssource-gbt-en-us.ts +0 -0
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
* Measured drift across the national join (n≈5.4k): 12.2% name, 4.9% address — the rename /
|
|
12
12
|
* system-vs-facility / acquisition class the org objective exists for.
|
|
13
13
|
*
|
|
14
|
-
* Pipeline: national CCN join → one record per source per facility
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* Pipeline: national CCN join → one record per source per facility (Phases A/B here), then the
|
|
15
|
+
* SHARED `trainCrossSourceModel` runs Phases C–F — geocode → block the UNION, keep only
|
|
16
|
+
* CROSS-source pairs → the SHARED featurizer → label by CCN → held-out-CCN calibration (max
|
|
17
|
+
* recall s.t. precision ≥ bar) → train on all pairs → emit
|
|
17
18
|
* `registry/models/org-crosssource-gbt-en-us.ts`.
|
|
18
19
|
*
|
|
19
20
|
* Sources (both public domain, direct CSVs):
|
|
@@ -24,27 +25,22 @@
|
|
|
24
25
|
* Run: `mailwoman registry train-scorer org-cross-gbt [--cap 6000] [--precision-bar 0.95]
|
|
25
26
|
* [--wof <admin.db>] [--data-root <dir>] [--out registry/models/org-crosssource-gbt-en-us.ts]`
|
|
26
27
|
*/
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { addressFrequencyKey, buildDefaultModel, createMatchFeaturizer, defaultBlockingKeys, ingestRows, streamRows, } from "@mailwoman/registry";
|
|
32
|
-
import { addr, norm, uniqueQuantiles } from "./shared.js";
|
|
28
|
+
import { dataRootPath } from "@mailwoman/core/data-root";
|
|
29
|
+
import { isoDate } from "@mailwoman/core/utils";
|
|
30
|
+
import { addressFrequencyKey, streamRows } from "#index";
|
|
31
|
+
import { addr, norm, trainCrossSourceModel } from "#tools/shared";
|
|
33
32
|
/**
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
const FIT_SPLIT_FRACTION = 0.8;
|
|
37
|
-
/**
|
|
38
|
-
* Train + emit the org-level cross-source link GBT — see the module doc.
|
|
33
|
+
* Train + emit the org-level cross-source link GBT — see the module doc. The CCN is the cross-system facility key; it
|
|
34
|
+
* rides {@link CrossSourceRow.npi} → `record.id` as the held-out label.
|
|
39
35
|
*/
|
|
40
36
|
export async function trainOrgCrossSourceGBT(options, report) {
|
|
41
37
|
const SOURCES = options.sources || String(dataRootPath("record-matcher", "sources"));
|
|
42
38
|
const CAP = options.cap ?? 6000;
|
|
43
|
-
const OUT = options.out || "registry/models/org-crosssource-gbt-en-us.ts";
|
|
39
|
+
const OUT = options.out || "packages/registry/lib/models/org-crosssource-gbt-en-us.ts";
|
|
44
40
|
const LOCALE = options.locale || "en-US";
|
|
45
41
|
// #655 threshold rule: max cross-source recall subject to this held-out pairwise precision.
|
|
46
42
|
const PRECISION_BAR = options.precisionBar ?? 0.95;
|
|
47
|
-
const TRAIN_DATE = options.date ||
|
|
43
|
+
const TRAIN_DATE = options.date || isoDate();
|
|
48
44
|
const POS = `${SOURCES}/cms-pos_hospital-other_2026q1.csv`;
|
|
49
45
|
const CARE_COMPARE = `${SOURCES}/cms-carecompare_hospital-general_20260706.csv`;
|
|
50
46
|
// --- Phase A: Care Compare (Facility ID + name + address). ---
|
|
@@ -92,131 +88,39 @@ export async function trainOrgCrossSourceGBT(options, report) {
|
|
|
92
88
|
frequency: (v) => (v ? (addrCounts.get(addressFrequencyKey(v)) ?? 0) / addrTotal : 0),
|
|
93
89
|
};
|
|
94
90
|
report?.(` ${joined.size} CCN-joined facilities → ${rows.length} records`);
|
|
95
|
-
// ---
|
|
96
|
-
//
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
id: "npi",
|
|
103
|
-
name: "name",
|
|
104
|
-
organization: "org",
|
|
105
|
-
address: "address",
|
|
106
|
-
source,
|
|
107
|
-
});
|
|
108
|
-
const posRows = rows.filter((r) => r.source === "cms-pos");
|
|
109
|
-
const ccRows = rows.filter((r) => r.source === "care-compare");
|
|
110
|
-
const records = [
|
|
111
|
-
...(await ingestRows(posRows, mappingFor("cms-pos"), {
|
|
112
|
-
geocodeAddress: geocoder.seam,
|
|
113
|
-
})),
|
|
114
|
-
...(await ingestRows(ccRows, mappingFor("care-compare"), {
|
|
115
|
-
geocodeAddress: geocoder.seam,
|
|
116
|
-
})),
|
|
117
|
-
];
|
|
118
|
-
geocoder.close();
|
|
119
|
-
report?.(` ${records.length} records, ${records.filter((r) => r.address?.geocode).length} geocoded`);
|
|
120
|
-
// --- Phase D: block over the UNION; keep only CROSS-source pairs; featurize; label by NPI. ---
|
|
121
|
-
report?.("[D] blocking + featurizing (cross-source pairs only)…");
|
|
122
|
-
const comparisons = buildDefaultModel({ collapseSpatial: true, addressFrequency }).comparisons;
|
|
123
|
-
const featurize = createMatchFeaturizer({ comparisons, addressFrequency });
|
|
124
|
-
const { pairs: allPairs } = block(records, defaultBlockingKeys());
|
|
125
|
-
const pairs = allPairs.filter(([a, b]) => a.source !== b.source);
|
|
126
|
-
const X = pairs.map(([a, b]) => featurize(a, b));
|
|
127
|
-
const Y = pairs.map(([a, b]) => (a.id === b.id ? 1 : 0));
|
|
128
|
-
const posRate = Y.reduce((s, y) => s + y, 0) / Math.max(1, Y.length);
|
|
129
|
-
const W = Y.map((y) => (y === 1 ? 1 - posRate : posRate));
|
|
130
|
-
report?.(` ${allPairs.length} blocked pairs → ${pairs.length} cross-source (${(100 * posRate).toFixed(1)}% positive)`);
|
|
131
|
-
// --- Phase E: held-out-NPI calibration — the #655 threshold rule. ---
|
|
132
|
-
report?.("[E] held-out calibration…");
|
|
133
|
-
const hyperparams = { rounds: 120, depth: 3, lr: 0.3, minLeaf: 20 };
|
|
134
|
-
const rnd = makeLcg(655);
|
|
135
|
-
const split = new Map();
|
|
136
|
-
for (const ccn of joined) {
|
|
137
|
-
split.set(ccn, rnd() < FIT_SPLIT_FRACTION ? "fit" : "holdout");
|
|
138
|
-
}
|
|
139
|
-
const fitIdx = pairs
|
|
140
|
-
.map((_, i) => i)
|
|
141
|
-
.filter((i) => split.get(pairs[i][0].id) === "fit" && split.get(pairs[i][1].id) === "fit");
|
|
142
|
-
const holdIdx = pairs
|
|
143
|
-
.map((_, i) => i)
|
|
144
|
-
.filter((i) => split.get(pairs[i][0].id) === "holdout" && split.get(pairs[i][1].id) === "holdout");
|
|
145
|
-
const calib = trainGBT(fitIdx.map((i) => X[i]), fitIdx.map((i) => Y[i]), fitIdx.map((i) => W[i]), hyperparams);
|
|
146
|
-
const holdScores = holdIdx.map((i) => ({ s: gbtScore(calib, X[i]), y: Y[i] }));
|
|
147
|
-
const sorted = holdScores.map((h) => h.s).toSorted((a, b) => a - b);
|
|
148
|
-
const totalPos = holdScores.reduce((s, h) => s + h.y, 0);
|
|
149
|
-
let recommendedThreshold = Number.POSITIVE_INFINITY;
|
|
150
|
-
let barRecall = 0;
|
|
151
|
-
let f1MaxThreshold = 0;
|
|
152
|
-
let bestF1 = -1;
|
|
153
|
-
for (const t of uniqueQuantiles(sorted, 60)) {
|
|
154
|
-
let tp = 0;
|
|
155
|
-
let fp = 0;
|
|
156
|
-
for (const h of holdScores) {
|
|
157
|
-
if (h.s < t)
|
|
158
|
-
continue;
|
|
159
|
-
if (h.y) {
|
|
160
|
-
tp++;
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
fp++;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
const precision = tp + fp > 0 ? tp / (tp + fp) : 1;
|
|
167
|
-
const recall = totalPos > 0 ? tp / totalPos : 0;
|
|
168
|
-
const f1 = precision + recall > 0 ? (2 * precision * recall) / (precision + recall) : 0;
|
|
169
|
-
// The #655 rule: the LOWEST threshold whose precision clears the bar (maximizes recall under it).
|
|
170
|
-
if (precision >= PRECISION_BAR && recall > barRecall) {
|
|
171
|
-
barRecall = recall;
|
|
172
|
-
recommendedThreshold = t;
|
|
173
|
-
}
|
|
174
|
-
if (f1 > bestF1) {
|
|
175
|
-
bestF1 = f1;
|
|
176
|
-
f1MaxThreshold = t;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
if (!Number.isFinite(recommendedThreshold)) {
|
|
180
|
-
recommendedThreshold = f1MaxThreshold;
|
|
181
|
-
}
|
|
182
|
-
report?.(` held-out (${holdIdx.length} pairs, ${totalPos} pos): precision-bar ${PRECISION_BAR} → threshold ${recommendedThreshold.toFixed(3)} (recall ${(100 * barRecall).toFixed(1)}%); F1-max ${(100 * bestF1).toFixed(1)}% @ ${f1MaxThreshold.toFixed(3)}`);
|
|
183
|
-
// --- Phase F: train the SHIPPED model on ALL cross-source pairs; emit the committed module. ---
|
|
184
|
-
report?.("[F] training the shipped model on all pairs…");
|
|
185
|
-
const model = trainGBT(X, Y, W, hyperparams);
|
|
186
|
-
const meta = {
|
|
187
|
-
version: "1.0.0",
|
|
188
|
-
objective: "org-cross-source-link",
|
|
189
|
-
locale: LOCALE,
|
|
190
|
-
trainedOn: TRAIN_DATE,
|
|
191
|
-
facilities: joined.size,
|
|
192
|
-
records: records.length,
|
|
193
|
-
pairs: pairs.length,
|
|
194
|
-
posRate: Number(posRate.toFixed(4)),
|
|
195
|
-
precisionBar: PRECISION_BAR,
|
|
196
|
-
holdoutBarRecall: Number(barRecall.toFixed(4)),
|
|
197
|
-
holdoutF1Max: Number(bestF1.toFixed(4)),
|
|
198
|
-
hyperparams,
|
|
199
|
-
recommendedThreshold: Number(recommendedThreshold.toFixed(4)),
|
|
200
|
-
features: X[0]?.length ?? 0,
|
|
91
|
+
// --- Phases C–F: the SHARED cross-source trainer (geocode → cross-source pairs → #655 calibration
|
|
92
|
+
// → shipped model → committed module). ---
|
|
93
|
+
return trainCrossSourceModel({
|
|
94
|
+
createGeocoder: options.createGeocoder,
|
|
95
|
+
rows,
|
|
96
|
+
joined,
|
|
97
|
+
addressFrequency,
|
|
201
98
|
sources: ["cms-pos", "care-compare"],
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
` *
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
99
|
+
precisionBar: PRECISION_BAR,
|
|
100
|
+
out: OUT,
|
|
101
|
+
exportPrefix: "ORG_CROSS_SOURCE_GBT",
|
|
102
|
+
moduleDoc: ` * The ORG-LEVEL cross-source link scorer (#655 follow-on) — trained on CCN-joined CMS POS ↔\n` +
|
|
103
|
+
` * Care Compare facility pairs (both public domain). Scores "same facility, different registry\n` +
|
|
104
|
+
` * text" links for org-level cross-dataset flows. Generated by\n` +
|
|
105
|
+
` * \`mailwoman registry train-scorer org-cross-gbt\` (registry/tools/train-org-cross-gbt.ts) — retrain rather than editing.\n`,
|
|
106
|
+
meta: (figures) => ({
|
|
107
|
+
version: "1.0.0",
|
|
108
|
+
objective: "org-cross-source-link",
|
|
109
|
+
locale: LOCALE,
|
|
110
|
+
trainedOn: TRAIN_DATE,
|
|
111
|
+
facilities: joined.size,
|
|
112
|
+
records: figures.records,
|
|
113
|
+
pairs: figures.pairs,
|
|
114
|
+
posRate: figures.posRate,
|
|
115
|
+
precisionBar: PRECISION_BAR,
|
|
116
|
+
holdoutBarRecall: figures.barRecall,
|
|
117
|
+
holdoutF1Max: figures.f1Max,
|
|
118
|
+
hyperparams: figures.hyperparams,
|
|
119
|
+
recommendedThreshold: figures.recommendedThreshold,
|
|
120
|
+
features: figures.features,
|
|
121
|
+
sources: ["cms-pos", "care-compare"],
|
|
122
|
+
}),
|
|
123
|
+
report,
|
|
124
|
+
});
|
|
221
125
|
}
|
|
222
126
|
//# sourceMappingURL=train-org-cross-gbt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"train-org-cross-gbt.js","sourceRoot":"","sources":["../../tools/train-org-cross-gbt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"train-org-cross-gbt.js","sourceRoot":"","sources":["../../lib/tools/train-org-cross-gbt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAE/C,OAAO,EAAE,mBAAmB,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oE;YACpE,iIAAiI;QAClI,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACnB,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,uBAAuB;YAClC,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,UAAU;YACrB,UAAU,EAAE,MAAM,CAAC,IAAI;YACvB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,YAAY,EAAE,aAAa;YAC3B,gBAAgB,EAAE,OAAO,CAAC,SAAS;YACnC,YAAY,EAAE,OAAO,CAAC,KAAK;YAC3B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;YAClD,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,OAAO,EAAE,CAAC,SAAS,EAAE,cAAc,CAAC;SACpC,CAAC;QACF,MAAM;KACN,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -29,9 +29,9 @@ export interface TXHHSCConvertOptions {
|
|
|
29
29
|
/**
|
|
30
30
|
* Convert the TX HHSC nursing-facilities TSV into OaRow JSONL for `oa-resolver-eval`.
|
|
31
31
|
*/
|
|
32
|
-
export declare function convertTXHHSC(options?: TXHHSCConvertOptions, report?: (line: string) => void): {
|
|
32
|
+
export declare function convertTXHHSC(options?: TXHHSCConvertOptions, report?: (line: string) => void): Promise<{
|
|
33
33
|
written: number;
|
|
34
34
|
skipped: number;
|
|
35
35
|
out: string;
|
|
36
|
-
}
|
|
36
|
+
}>;
|
|
37
37
|
//# sourceMappingURL=txhhsc-to-oarow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"txhhsc-to-oarow.d.ts","sourceRoot":"","sources":["../../tools/txhhsc-to-oarow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"txhhsc-to-oarow.d.ts","sourceRoot":"","sources":["../../lib/tools/txhhsc-to-oarow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACZ;AAID;;GAEG;AACH,wBAAsB,aAAa,CAClC,OAAO,GAAE,oBAAyB,EAClC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAkE5D"}
|
|
@@ -13,32 +13,18 @@
|
|
|
13
13
|
*
|
|
14
14
|
* Run: `mailwoman registry convert tx-hhsc [--src <tsv>] [--out /tmp/txhhsc-oarow.jsonl]`
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { dataRootPath, tempRootPath } from "@mailwoman/core/data-root";
|
|
17
|
+
import { readLocalTextFile } from "@mailwoman/core/fs/readers";
|
|
18
|
+
import { writeLocalTextFile } from "@mailwoman/core/fs/writers";
|
|
18
19
|
import { TSVSpliterator } from "spliterator";
|
|
19
|
-
|
|
20
|
-
* Texas bounding box, used to reject rows whose coordinates landed in the wrong state.
|
|
21
|
-
*/
|
|
22
|
-
const TX_MIN_LATITUDE = 25;
|
|
23
|
-
/**
|
|
24
|
-
* See {@link TX_MIN_LATITUDE}.
|
|
25
|
-
*/
|
|
26
|
-
const TX_MAX_LATITUDE = 37;
|
|
27
|
-
/**
|
|
28
|
-
* See {@link TX_MIN_LATITUDE}.
|
|
29
|
-
*/
|
|
30
|
-
const TX_MIN_LONGITUDE = -107;
|
|
31
|
-
/**
|
|
32
|
-
* See {@link TX_MIN_LATITUDE}.
|
|
33
|
-
*/
|
|
34
|
-
const TX_MAX_LONGITUDE = -93;
|
|
20
|
+
import { inTXBBOX } from "#tools/shared";
|
|
35
21
|
const GEO = /^\s*(-?\d+\.\d+)\s*,\s*(-?\d+\.\d+)\s*$/;
|
|
36
22
|
/**
|
|
37
23
|
* Convert the TX HHSC nursing-facilities TSV into OaRow JSONL for `oa-resolver-eval`.
|
|
38
24
|
*/
|
|
39
|
-
export function convertTXHHSC(options = {}, report) {
|
|
25
|
+
export async function convertTXHHSC(options = {}, report) {
|
|
40
26
|
const src = options.src || String(dataRootPath("record-matcher", "sources", "txhhsc_nursing-facilities_20260611.tsv"));
|
|
41
|
-
const out = options.out || "
|
|
27
|
+
const out = options.out || tempRootPath("txhhsc-oarow.jsonl");
|
|
42
28
|
const records = [];
|
|
43
29
|
let skipped = 0;
|
|
44
30
|
// Column indices, captured from the first non-blank row. `header: false` keeps that row in the stream so the
|
|
@@ -48,7 +34,7 @@ export function convertTXHHSC(options = {}, report) {
|
|
|
48
34
|
let cZip = -1;
|
|
49
35
|
let cGeo = -1;
|
|
50
36
|
let sawHeader = false;
|
|
51
|
-
for (const f of TSVSpliterator.from(
|
|
37
|
+
for (const f of TSVSpliterator.from(await readLocalTextFile(src), { header: false })) {
|
|
52
38
|
if (f.every((value) => !value.trim()))
|
|
53
39
|
continue;
|
|
54
40
|
if (!sawHeader) {
|
|
@@ -71,7 +57,7 @@ export function convertTXHHSC(options = {}, report) {
|
|
|
71
57
|
const lat = Number(m[1]);
|
|
72
58
|
const lon = Number(m[2]);
|
|
73
59
|
// Sanity: TX bounding box (rejects swapped/garbage coords).
|
|
74
|
-
if (lat
|
|
60
|
+
if (!inTXBBOX(lat, lon)) {
|
|
75
61
|
skipped++;
|
|
76
62
|
continue;
|
|
77
63
|
}
|
|
@@ -84,7 +70,7 @@ export function convertTXHHSC(options = {}, report) {
|
|
|
84
70
|
source: "txhhsc:nursing-facilities",
|
|
85
71
|
}));
|
|
86
72
|
}
|
|
87
|
-
|
|
73
|
+
await writeLocalTextFile(records.join("\n") + "\n", out);
|
|
88
74
|
report?.(`wrote ${records.length} rows (skipped ${skipped}) → ${out}`);
|
|
89
75
|
return { written: records.length, skipped, out };
|
|
90
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"txhhsc-to-oarow.js","sourceRoot":"","sources":["../../tools/txhhsc-to-oarow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"txhhsc-to-oarow.js","sourceRoot":"","sources":["../../lib/tools/txhhsc-to-oarow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAgBxC,MAAM,GAAG,GAAG,yCAAyC,CAAA;AAErD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAClC,UAAgC,EAAE,EAClC,MAA+B;IAE/B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,gBAAgB,EAAE,SAAS,EAAE,wCAAwC,CAAC,CAAC,CAAA;IACtH,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,YAAY,CAAC,oBAAoB,CAAC,CAAA;IAE7D,MAAM,OAAO,GAAa,EAAE,CAAA;IAC5B,IAAI,OAAO,GAAG,CAAC,CAAA;IAEf,6GAA6G;IAC7G,2CAA2C;IAC3C,IAAI,KAAK,GAAG,CAAC,CAAC,CAAA;IACd,IAAI,KAAK,GAAG,CAAC,CAAC,CAAA;IACd,IAAI,IAAI,GAAG,CAAC,CAAC,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C;QAED,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACxB,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAExB,4DAA4D;QAC5D,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,CAAA;YAET,SAAQ;QACT,CAAC;QAED,OAAO,CAAC,IAAI,CACX,IAAI,CAAC,SAAS,CAAC;YACd,KAAK,EAAE,GAAG,IAAI,KAAK,IAAI,QAAQ,GAAG,EAAE;YACpC,GAAG;YACH,GAAG;YACH,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;YACzD,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,2BAA2B;SACnC,CAAC,CACF,CAAA;IACF,CAAC;IAED,MAAM,kBAAkB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAA;IACxD,MAAM,EAAE,CAAC,SAAS,OAAO,CAAC,MAAM,kBAAkB,OAAO,OAAO,GAAG,EAAE,CAAC,CAAA;IAEtE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAA;AACjD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* The shared headless-Chromium harness behind the `registry viz` renderers (an internal helper,
|
|
7
|
+
* not a command). The WebGL consumers (Plotly 3D, MapLibre) get no GPU in headless Chromium, so
|
|
8
|
+
* the browser launches on ANGLE's SwiftShader software rasterizer (`--use-gl=angle
|
|
9
|
+
* --use-angle=swiftshader --enable-unsafe-swiftshader`); each caller owns its own navigation +
|
|
10
|
+
* wait strategy and screenshots inside the callback.
|
|
11
|
+
*
|
|
12
|
+
* Playwright (headless Chromium) is a heavy dev-only dependency — lazy-imported at call time (the
|
|
13
|
+
* corpus-tools lazy-import convention), so importing `@mailwoman/registry/tools` never pays for
|
|
14
|
+
* it.
|
|
15
|
+
*/
|
|
16
|
+
import type { Page } from "playwright";
|
|
17
|
+
/**
|
|
18
|
+
* Options for {@linkcode withChromiumPage}.
|
|
19
|
+
*/
|
|
20
|
+
export interface ChromiumPageOptions {
|
|
21
|
+
viewport: {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Launch headless Chromium (SwiftShader WebGL), open one page at `deviceScaleFactor: 2`, collect console + page errors,
|
|
28
|
+
* run `fn`, and dispose the browser. The callback owns navigation, waits, and the screenshot.
|
|
29
|
+
*/
|
|
30
|
+
export declare function withChromiumPage<T>(options: ChromiumPageOptions, fn: (page: Page) => Promise<T>): Promise<{
|
|
31
|
+
result: T;
|
|
32
|
+
consoleErrors: string[];
|
|
33
|
+
}>;
|
|
34
|
+
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../lib/tools/viz/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3C;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACvC,OAAO,EAAE,mBAAmB,EAC5B,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,GAC5B,OAAO,CAAC;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAiBjD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* The shared headless-Chromium harness behind the `registry viz` renderers (an internal helper,
|
|
7
|
+
* not a command). The WebGL consumers (Plotly 3D, MapLibre) get no GPU in headless Chromium, so
|
|
8
|
+
* the browser launches on ANGLE's SwiftShader software rasterizer (`--use-gl=angle
|
|
9
|
+
* --use-angle=swiftshader --enable-unsafe-swiftshader`); each caller owns its own navigation +
|
|
10
|
+
* wait strategy and screenshots inside the callback.
|
|
11
|
+
*
|
|
12
|
+
* Playwright (headless Chromium) is a heavy dev-only dependency — lazy-imported at call time (the
|
|
13
|
+
* corpus-tools lazy-import convention), so importing `@mailwoman/registry/tools` never pays for
|
|
14
|
+
* it.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Launch headless Chromium (SwiftShader WebGL), open one page at `deviceScaleFactor: 2`, collect console + page errors,
|
|
18
|
+
* run `fn`, and dispose the browser. The callback owns navigation, waits, and the screenshot.
|
|
19
|
+
*/
|
|
20
|
+
export async function withChromiumPage(options, fn) {
|
|
21
|
+
const { chromium } = await import("playwright");
|
|
22
|
+
const browser = await chromium.launch({
|
|
23
|
+
args: ["--use-gl=angle", "--use-angle=swiftshader", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist"],
|
|
24
|
+
});
|
|
25
|
+
const page = await browser.newPage({ viewport: options.viewport, deviceScaleFactor: 2 });
|
|
26
|
+
const errors = [];
|
|
27
|
+
page.on("console", (m) => m.type() === "error" && errors.push(m.text()));
|
|
28
|
+
page.on("pageerror", (e) => errors.push(String(e)));
|
|
29
|
+
const result = await fn(page);
|
|
30
|
+
await browser[Symbol.asyncDispose]();
|
|
31
|
+
return { result, consoleErrors: errors };
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../lib/tools/viz/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACrC,OAA4B,EAC5B,EAA8B;IAE9B,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAA;IAE/C,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;QACrC,IAAI,EAAE,CAAC,gBAAgB,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,wBAAwB,CAAC;KAC5G,CAAC,CAAA;IAEF,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EAAE,CAAC,CAAA;IAExF,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IACxE,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEnD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,CAAA;IAC7B,MAAM,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAA;IAEpC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,CAAA;AACzC,CAAC"}
|
|
@@ -3,29 +3,8 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The matcher resolves entities ACROSS independent sources (NPPES provider registry, FCC RHC
|
|
9
|
-
* funding, TX HHSC facility licensing) with NO shared key — purely on the geocoded location +
|
|
10
|
-
* name agreement. This renders the `cross-dataset-links` GeoJSON (every entity that resolved
|
|
11
|
-
* across ≥2 sources) on the HOUSE map stack via {@link toMapHTML} (MapLibre GL + a Protomaps
|
|
12
|
-
* basemap). Each entity is colored by its SOURCE COMBINATION (a synthesized `bucket`), so the
|
|
13
|
-
* entities spanning all three sources stand out from the two-source links.
|
|
14
|
-
*
|
|
15
|
-
* Neutral entity-resolution view: it shows what resolved to what and how confidently (cohesion
|
|
16
|
-
* sizes the marker). It does NOT interpret coverage/eligibility — that is the consumer's call.
|
|
17
|
-
*
|
|
18
|
-
* SERVE THE OUTPUT OVER LOCALHOST (the house tile server CORS-restricts to localhost + the docs
|
|
19
|
-
* domains; a file:// page shows accurate markers on a blank basemap). e.g. `python3 -m
|
|
20
|
-
* http.server -d <dir>` then open the page; or use `renderServedMapToPNG` (`./render-map.ts`)
|
|
21
|
-
* against the served URL.
|
|
22
|
-
*
|
|
23
|
-
* `--cross-agency-only` keeps just the entities whose sources span >1 AGENCY (the two FCC datasets
|
|
24
|
-
* count as one) — the harder cross-agency slice; most raw links are FCC-internal (RHC ↔
|
|
25
|
-
* commitments).
|
|
26
|
-
*
|
|
27
|
-
* Run: `mailwoman registry viz cross-dataset-map [--in <links.geojson>]
|
|
28
|
-
* [--out-html /tmp/cross-dataset-map.html] [--cross-agency-only]`
|
|
6
|
+
* Render linked entities from a GeoJSON file in MapLibre, colored by source combination.
|
|
7
|
+
* `crossAgencyOnly` removes links whose sources belong to one agency.
|
|
29
8
|
*/
|
|
30
9
|
/**
|
|
31
10
|
* Options for {@linkcode crossDatasetMap}.
|
|
@@ -48,10 +27,10 @@ export interface CrossDatasetMapOptions {
|
|
|
48
27
|
/**
|
|
49
28
|
* Render the cross-dataset-links GeoJSON to a bucket-colored MapLibre HTML page.
|
|
50
29
|
*/
|
|
51
|
-
export declare function crossDatasetMap(options?: CrossDatasetMapOptions, report?: (line: string) => void): {
|
|
30
|
+
export declare function crossDatasetMap(options?: CrossDatasetMapOptions, report?: (line: string) => void): Promise<{
|
|
52
31
|
outHTML: string;
|
|
53
32
|
kept: number;
|
|
54
33
|
total: number;
|
|
55
34
|
triple: number;
|
|
56
|
-
}
|
|
35
|
+
}>;
|
|
57
36
|
//# sourceMappingURL=cross-dataset-map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-dataset-map.d.ts","sourceRoot":"","sources":["../../../tools/viz/cross-dataset-map.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cross-dataset-map.d.ts","sourceRoot":"","sources":["../../../lib/tools/viz/cross-dataset-map.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAcH;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CACzB;AA6BD;;GAEG;AACH,wBAAsB,eAAe,CACpC,OAAO,GAAE,sBAA2B,EACpC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAqD3E"}
|
|
@@ -3,34 +3,13 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The matcher resolves entities ACROSS independent sources (NPPES provider registry, FCC RHC
|
|
9
|
-
* funding, TX HHSC facility licensing) with NO shared key — purely on the geocoded location +
|
|
10
|
-
* name agreement. This renders the `cross-dataset-links` GeoJSON (every entity that resolved
|
|
11
|
-
* across ≥2 sources) on the HOUSE map stack via {@link toMapHTML} (MapLibre GL + a Protomaps
|
|
12
|
-
* basemap). Each entity is colored by its SOURCE COMBINATION (a synthesized `bucket`), so the
|
|
13
|
-
* entities spanning all three sources stand out from the two-source links.
|
|
14
|
-
*
|
|
15
|
-
* Neutral entity-resolution view: it shows what resolved to what and how confidently (cohesion
|
|
16
|
-
* sizes the marker). It does NOT interpret coverage/eligibility — that is the consumer's call.
|
|
17
|
-
*
|
|
18
|
-
* SERVE THE OUTPUT OVER LOCALHOST (the house tile server CORS-restricts to localhost + the docs
|
|
19
|
-
* domains; a file:// page shows accurate markers on a blank basemap). e.g. `python3 -m
|
|
20
|
-
* http.server -d <dir>` then open the page; or use `renderServedMapToPNG` (`./render-map.ts`)
|
|
21
|
-
* against the served URL.
|
|
22
|
-
*
|
|
23
|
-
* `--cross-agency-only` keeps just the entities whose sources span >1 AGENCY (the two FCC datasets
|
|
24
|
-
* count as one) — the harder cross-agency slice; most raw links are FCC-internal (RHC ↔
|
|
25
|
-
* commitments).
|
|
26
|
-
*
|
|
27
|
-
* Run: `mailwoman registry viz cross-dataset-map [--in <links.geojson>]
|
|
28
|
-
* [--out-html /tmp/cross-dataset-map.html] [--cross-agency-only]`
|
|
6
|
+
* Render linked entities from a GeoJSON file in MapLibre, colored by source combination.
|
|
7
|
+
* `crossAgencyOnly` removes links whose sources belong to one agency.
|
|
29
8
|
*/
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import { toMapHTML } from "
|
|
9
|
+
import { dataRootPath, tempRootPath } from "@mailwoman/core/data-root";
|
|
10
|
+
import { readLocalJSONFile } from "@mailwoman/core/fs/readers";
|
|
11
|
+
import { writeLocalFile } from "@mailwoman/core/fs/writers";
|
|
12
|
+
import { toMapHTML } from "#index";
|
|
34
13
|
/**
|
|
35
14
|
* Distinct agencies a combination needs before it is plotted as a cross-agency cluster.
|
|
36
15
|
*/
|
|
@@ -55,15 +34,15 @@ const SOURCE_AGENCY = {
|
|
|
55
34
|
"txhhsc-nursing": "TX HHSC",
|
|
56
35
|
};
|
|
57
36
|
const agencyOf = (s) => SOURCE_AGENCY[s] ?? s;
|
|
58
|
-
const sourcesOf = (f) => Array.isArray(f.properties?.
|
|
37
|
+
const sourcesOf = (f) => Array.isArray(f.properties?.sources) ? f.properties.sources : [];
|
|
59
38
|
/**
|
|
60
39
|
* Render the cross-dataset-links GeoJSON to a bucket-colored MapLibre HTML page.
|
|
61
40
|
*/
|
|
62
|
-
export function crossDatasetMap(options = {}, report) {
|
|
41
|
+
export async function crossDatasetMap(options = {}, report) {
|
|
63
42
|
const IN = options.in || dataRootPath("record-matcher", "2026-06-16-cross-dataset-links.geojson");
|
|
64
|
-
const OUT = options.outHTML || "
|
|
43
|
+
const OUT = options.outHTML || tempRootPath("cross-dataset-map.html");
|
|
65
44
|
const CROSS_AGENCY_ONLY = options.crossAgencyOnly ?? false;
|
|
66
|
-
const parsed =
|
|
45
|
+
const parsed = await readLocalJSONFile(IN);
|
|
67
46
|
const total = parsed.features.length;
|
|
68
47
|
const geojson = CROSS_AGENCY_ONLY
|
|
69
48
|
? { ...parsed, features: parsed.features.filter((f) => new Set(sourcesOf(f).map(agencyOf)).size > 1) }
|
|
@@ -76,7 +55,7 @@ export function crossDatasetMap(options = {}, report) {
|
|
|
76
55
|
const combo = [...new Set(sourcesOf(f))].toSorted();
|
|
77
56
|
const bucket = combo.map(label).join(" + ") || "unlinked";
|
|
78
57
|
if (f.properties) {
|
|
79
|
-
f.properties
|
|
58
|
+
f.properties.bucket = bucket;
|
|
80
59
|
}
|
|
81
60
|
if (new Set(combo.map(agencyOf)).size >= MIN_DISTINCT_AGENCIES) {
|
|
82
61
|
triple++;
|
|
@@ -90,7 +69,7 @@ export function crossDatasetMap(options = {}, report) {
|
|
|
90
69
|
flavor: "light",
|
|
91
70
|
colorBy: "bucket",
|
|
92
71
|
});
|
|
93
|
-
|
|
72
|
+
await writeLocalFile(html, OUT);
|
|
94
73
|
report?.(`[written] ${OUT} (${kept}${CROSS_AGENCY_ONLY ? ` of ${total} cross-AGENCY` : ""} entities)`);
|
|
95
74
|
report?.(` source combinations:`);
|
|
96
75
|
for (const [combo, n] of [...comboCounts.entries()].toSorted((a, b) => b[1] - a[1])) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-dataset-map.js","sourceRoot":"","sources":["../../../tools/viz/cross-dataset-map.ts"],"names":[],"mappings":"AAAA
|
|
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;AAG3D,OAAO,EAAuB,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvD;;GAEG;AACH,MAAM,qBAAqB,GAAG,CAAC,CAAA;AAqB/B,MAAM,aAAa,GAA2B;IAC7C,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,SAAS;IACpB,qBAAqB,EAAE,iBAAiB;IACxC,gBAAgB,EAAE,SAAS;CAC3B,CAAA;AAED,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;AAElD;;;;;GAKG;AACH,MAAM,aAAa,GAA2B;IAC7C,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,KAAK;IAChB,qBAAqB,EAAE,KAAK;IAC5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