@mailwoman/registry 5.8.0 → 5.10.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/out/address-key.d.ts +1 -1
- package/out/geocode-handler.d.ts +2 -2
- package/out/geojson.d.ts +1 -1
- package/out/index.d.ts +10 -10
- package/out/ingest.d.ts +1 -1
- package/out/learned-scorer.d.ts +2 -2
- package/out/learned-scorer.js +1 -1
- package/out/map-html.d.ts +1 -1
- package/out/reconcile.d.ts +2 -2
- package/out/reconcile.js +1 -1
- package/out/resolve.d.ts +1 -1
- package/out/tools/coverage-reconciliation.d.ts +51 -0
- package/out/tools/coverage-reconciliation.d.ts.map +1 -0
- package/out/tools/coverage-reconciliation.js +166 -0
- package/out/tools/coverage-reconciliation.js.map +1 -0
- package/out/tools/cross-dataset-correlation.d.ts +49 -0
- package/out/tools/cross-dataset-correlation.d.ts.map +1 -0
- package/out/tools/cross-dataset-correlation.js +340 -0
- package/out/tools/cross-dataset-correlation.js.map +1 -0
- package/out/tools/cross-source-threshold-sweep.d.ts +52 -0
- package/out/tools/cross-source-threshold-sweep.d.ts.map +1 -0
- package/out/tools/cross-source-threshold-sweep.js +328 -0
- package/out/tools/cross-source-threshold-sweep.js.map +1 -0
- package/out/tools/dedup-ceiling.d.ts +21 -3
- package/out/tools/dedup-ceiling.d.ts.map +1 -1
- package/out/tools/dedup-ceiling.js +16 -30
- package/out/tools/dedup-ceiling.js.map +1 -1
- package/out/tools/eval-geocoder.d.ts +45 -0
- package/out/tools/eval-geocoder.d.ts.map +1 -0
- package/out/tools/eval-geocoder.js +14 -0
- package/out/tools/eval-geocoder.js.map +1 -0
- package/out/tools/geocoder-namesake-probe.d.ts +26 -0
- package/out/tools/geocoder-namesake-probe.d.ts.map +1 -0
- package/out/tools/geocoder-namesake-probe.js +59 -0
- package/out/tools/geocoder-namesake-probe.js.map +1 -0
- package/out/tools/geocoder-vs-provided-coords.d.ts +38 -0
- package/out/tools/geocoder-vs-provided-coords.d.ts.map +1 -0
- package/out/tools/geocoder-vs-provided-coords.js +132 -0
- package/out/tools/geocoder-vs-provided-coords.js.map +1 -0
- package/out/tools/gold-set-sample.d.ts +22 -3
- package/out/tools/gold-set-sample.d.ts.map +1 -1
- package/out/tools/gold-set-sample.js +17 -32
- package/out/tools/gold-set-sample.js.map +1 -1
- package/out/tools/index.d.ts +36 -0
- package/out/tools/index.d.ts.map +1 -0
- package/out/tools/index.js +36 -0
- package/out/tools/index.js.map +1 -0
- package/out/tools/learned-scorer-clustering-eval.d.ts +54 -0
- package/out/tools/learned-scorer-clustering-eval.d.ts.map +1 -0
- package/out/tools/learned-scorer-clustering-eval.js +368 -0
- package/out/tools/learned-scorer-clustering-eval.js.map +1 -0
- package/out/tools/learned-scorer-crossstate-eval.d.ts +43 -0
- package/out/tools/learned-scorer-crossstate-eval.d.ts.map +1 -0
- package/out/tools/learned-scorer-crossstate-eval.js +305 -0
- package/out/tools/learned-scorer-crossstate-eval.js.map +1 -0
- package/out/tools/learned-scorer-eval.d.ts +59 -0
- package/out/tools/learned-scorer-eval.d.ts.map +1 -0
- package/out/tools/learned-scorer-eval.js +450 -0
- package/out/tools/learned-scorer-eval.js.map +1 -0
- package/out/tools/matcher-scale.d.ts +17 -3
- package/out/tools/matcher-scale.d.ts.map +1 -1
- package/out/tools/matcher-scale.js +14 -30
- package/out/tools/matcher-scale.js.map +1 -1
- package/out/tools/nppes-dedup-benchmark.d.ts +75 -0
- package/out/tools/nppes-dedup-benchmark.d.ts.map +1 -0
- package/out/tools/nppes-dedup-benchmark.js +846 -0
- package/out/tools/nppes-dedup-benchmark.js.map +1 -0
- package/out/tools/train-cross-gbt.d.ts +58 -0
- package/out/tools/train-cross-gbt.d.ts.map +1 -0
- package/out/tools/train-cross-gbt.js +324 -0
- package/out/tools/train-cross-gbt.js.map +1 -0
- package/out/tools/train-gbt.d.ts +51 -0
- package/out/tools/train-gbt.d.ts.map +1 -0
- package/out/tools/train-gbt.js +268 -0
- package/out/tools/train-gbt.js.map +1 -0
- package/out/tools/train-org-cross-gbt.d.ts +51 -0
- package/out/tools/train-org-cross-gbt.d.ts.map +1 -0
- package/out/tools/train-org-cross-gbt.js +296 -0
- package/out/tools/train-org-cross-gbt.js.map +1 -0
- package/out/tools/txhhsc-to-oarow.d.ts +14 -3
- package/out/tools/txhhsc-to-oarow.d.ts.map +1 -1
- package/out/tools/txhhsc-to-oarow.js +44 -52
- package/out/tools/txhhsc-to-oarow.js.map +1 -1
- package/out/tools/viz/cross-dataset-map.d.ts +23 -4
- package/out/tools/viz/cross-dataset-map.d.ts.map +1 -1
- package/out/tools/viz/cross-dataset-map.js +42 -46
- package/out/tools/viz/cross-dataset-map.js.map +1 -1
- package/out/tools/viz/geocode-first-surface.d.ts +17 -4
- package/out/tools/viz/geocode-first-surface.d.ts.map +1 -1
- package/out/tools/viz/geocode-first-surface.js +71 -78
- package/out/tools/viz/geocode-first-surface.js.map +1 -1
- package/out/tools/viz/render-map.d.ts +17 -3
- package/out/tools/viz/render-map.d.ts.map +1 -1
- package/out/tools/viz/render-map.js +26 -26
- package/out/tools/viz/render-map.js.map +1 -1
- package/out/tools/viz/render.d.ts +21 -3
- package/out/tools/viz/render.d.ts.map +1 -1
- package/out/tools/viz/render.js +43 -39
- package/out/tools/viz/render.js.map +1 -1
- package/out/tools/viz/source-provenance-map.d.ts +24 -5
- package/out/tools/viz/source-provenance-map.d.ts.map +1 -1
- package/out/tools/viz/source-provenance-map.js +53 -62
- package/out/tools/viz/source-provenance-map.js.map +1 -1
- package/out/tools/viz/yardstick-figure.d.ts +11 -3
- package/out/tools/viz/yardstick-figure.d.ts.map +1 -1
- package/out/tools/viz/yardstick-figure.js +68 -73
- package/out/tools/viz/yardstick-figure.js.map +1 -1
- package/package.json +50 -10
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Render a {@link toMapHTML} page (MapLibre GL + Protomaps basemap) to a PNG via headless Chromium
|
|
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
|
|
8
|
+
* command).
|
|
7
9
|
*
|
|
8
10
|
* Two house-stack constraints make this fiddlier than the Plotly/SVG renderers:
|
|
9
11
|
*
|
|
@@ -17,7 +19,19 @@
|
|
|
17
19
|
* The map paints asynchronously after the network settles; we wait for networkidle, then a fixed
|
|
18
20
|
* beat for the basemap tiles + marker layer to finish compositing.
|
|
19
21
|
*
|
|
20
|
-
*
|
|
22
|
+
* Playwright (headless Chromium) is a heavy dev-only dependency — lazy-imported inside the entry
|
|
23
|
+
* fn (the corpus-tools lazy-import convention).
|
|
21
24
|
*/
|
|
22
|
-
|
|
25
|
+
/** Options for {@linkcode renderServedMapToPNG}. */
|
|
26
|
+
export interface RenderMapOptions {
|
|
27
|
+
/** The served localhost URL of the map page (NOT a file:// path — see the module doc). */
|
|
28
|
+
url: string;
|
|
29
|
+
/** Output PNG path. */
|
|
30
|
+
outPNG: string;
|
|
31
|
+
}
|
|
32
|
+
/** Screenshot a served MapLibre map page once the tiles + marker layer settle. */
|
|
33
|
+
export declare function renderServedMapToPNG(options: RenderMapOptions, report?: (line: string) => void): Promise<{
|
|
34
|
+
outPNG: string;
|
|
35
|
+
consoleErrors: string[];
|
|
36
|
+
}>;
|
|
23
37
|
//# sourceMappingURL=render-map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-map.d.ts","sourceRoot":"","sources":["../../../tools/viz/render-map.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"render-map.d.ts","sourceRoot":"","sources":["../../../tools/viz/render-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,oDAAoD;AACpD,MAAM,WAAW,gBAAgB;IAChC,0FAA0F;IAC1F,GAAG,EAAE,MAAM,CAAA;IACX,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAA;CACd;AAED,kFAAkF;AAClF,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,CA0BtD"}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Render a {@link toMapHTML} page (MapLibre GL + Protomaps basemap) to a PNG via headless Chromium
|
|
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
|
|
8
|
+
* command).
|
|
7
9
|
*
|
|
8
10
|
* Two house-stack constraints make this fiddlier than the Plotly/SVG renderers:
|
|
9
11
|
*
|
|
@@ -17,31 +19,29 @@
|
|
|
17
19
|
* The map paints asynchronously after the network settles; we wait for networkidle, then a fixed
|
|
18
20
|
* beat for the basemap tiles + marker layer to finish compositing.
|
|
19
21
|
*
|
|
20
|
-
*
|
|
22
|
+
* Playwright (headless Chromium) is a heavy dev-only dependency — lazy-imported inside the entry
|
|
23
|
+
* fn (the corpus-tools lazy-import convention).
|
|
21
24
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
page.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
console.error(`[map-render] ${out}; console errors=${errors.length}`);
|
|
44
|
-
for (const e of errors.slice(0, 6)) {
|
|
45
|
-
console.error(" " + e);
|
|
25
|
+
/** Screenshot a served MapLibre map page once the tiles + marker layer settle. */
|
|
26
|
+
export async function renderServedMapToPNG(options, report) {
|
|
27
|
+
// playwright + Chromium are heavy — lazy import (the pipeline convention).
|
|
28
|
+
const { chromium } = await import("playwright");
|
|
29
|
+
const browser = await chromium.launch({
|
|
30
|
+
args: ["--use-gl=angle", "--use-angle=swiftshader", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist"],
|
|
31
|
+
});
|
|
32
|
+
const page = await browser.newPage({ viewport: { width: 1100, height: 760 }, deviceScaleFactor: 2 });
|
|
33
|
+
const errors = [];
|
|
34
|
+
page.on("console", (m) => m.type() === "error" && errors.push(m.text()));
|
|
35
|
+
page.on("pageerror", (e) => errors.push(String(e)));
|
|
36
|
+
await page.goto(options.url, { waitUntil: "networkidle", timeout: 30_000 });
|
|
37
|
+
// MapLibre composites tiles + the marker layer async after the network settles; give it a beat.
|
|
38
|
+
await page.waitForTimeout(4_000);
|
|
39
|
+
await page.screenshot({ path: options.outPNG });
|
|
40
|
+
await browser.close();
|
|
41
|
+
report?.(`[map-render] ${options.outPNG}; console errors=${errors.length}`);
|
|
42
|
+
for (const e of errors.slice(0, 6)) {
|
|
43
|
+
report?.(" " + e);
|
|
44
|
+
}
|
|
45
|
+
return { outPNG: options.outPNG, consoleErrors: errors };
|
|
46
46
|
}
|
|
47
47
|
//# sourceMappingURL=render-map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-map.js","sourceRoot":"","sources":["../../../tools/viz/render-map.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"render-map.js","sourceRoot":"","sources":["../../../tools/viz/render-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAUH,kFAAkF;AAClF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACzC,OAAyB,E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,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,7 +3,8 @@
|
|
|
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
|
|
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).
|
|
7
8
|
*
|
|
8
9
|
* Plotly 3D (`surface`/`scatter3d`) needs a real WebGL context; headless Chromium has none by
|
|
9
10
|
* default, so we force ANGLE's SwiftShader software rasterizer (`--use-gl=angle
|
|
@@ -11,7 +12,24 @@
|
|
|
11
12
|
* on the 2D canvas regardless. We wait for Plotly's `plotly_afterplot` to fire on every graph div
|
|
12
13
|
* rather than a fixed sleep, so the screenshot can't race the (async) WebGL paint.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
+
* Playwright (headless Chromium) is a heavy dev-only dependency — lazy-imported inside the entry
|
|
16
|
+
* fn (the corpus-tools lazy-import convention), so importing `@mailwoman/registry/tools` never
|
|
17
|
+
* pays for it.
|
|
15
18
|
*/
|
|
16
|
-
|
|
19
|
+
/** Options for {@linkcode renderPlotlyHTMLToPNG}. */
|
|
20
|
+
export interface RenderPlotlyOptions {
|
|
21
|
+
/** The self-contained Plotly HTML file. */
|
|
22
|
+
inHTML: string;
|
|
23
|
+
/** Output PNG path. */
|
|
24
|
+
outPNG: string;
|
|
25
|
+
/** Viewport width. Default 1160. */
|
|
26
|
+
width?: number;
|
|
27
|
+
/** Viewport height. Default 1000. */
|
|
28
|
+
height?: number;
|
|
29
|
+
}
|
|
30
|
+
/** Screenshot a Plotly HTML page after every graph div's `plotly_afterplot` fires. */
|
|
31
|
+
export declare function renderPlotlyHTMLToPNG(options: RenderPlotlyOptions, report?: (line: string) => void): Promise<{
|
|
32
|
+
outPNG: string;
|
|
33
|
+
consoleErrors: string[];
|
|
34
|
+
}>;
|
|
17
35
|
//# sourceMappingURL=render.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../tools/viz/render.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../tools/viz/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,qDAAqD;AACrD,MAAM,WAAW,mBAAmB;IACnC,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;AAED,sFAAsF;AACtF,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,CAwDtD"}
|
package/out/tools/viz/render.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
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
|
|
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).
|
|
7
8
|
*
|
|
8
9
|
* Plotly 3D (`surface`/`scatter3d`) needs a real WebGL context; headless Chromium has none by
|
|
9
10
|
* default, so we force ANGLE's SwiftShader software rasterizer (`--use-gl=angle
|
|
@@ -11,47 +12,50 @@
|
|
|
11
12
|
* on the 2D canvas regardless. We wait for Plotly's `plotly_afterplot` to fire on every graph div
|
|
12
13
|
* rather than a fixed sleep, so the screenshot can't race the (async) WebGL paint.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
+
* Playwright (headless Chromium) is a heavy dev-only dependency — lazy-imported inside the entry
|
|
16
|
+
* fn (the corpus-tools lazy-import convention), so importing `@mailwoman/registry/tools` never
|
|
17
|
+
* pays for it.
|
|
15
18
|
*/
|
|
16
19
|
import { resolve } from "node:path";
|
|
17
20
|
import { pathToFileURL } from "node:url";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
page.on("
|
|
32
|
-
page.
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
await page.
|
|
48
|
-
await
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
21
|
+
/** Screenshot a Plotly HTML page after every graph div's `plotly_afterplot` fires. */
|
|
22
|
+
export async function renderPlotlyHTMLToPNG(options, report) {
|
|
23
|
+
// playwright + Chromium are heavy — lazy import (the pipeline convention).
|
|
24
|
+
const { chromium } = await import("playwright");
|
|
25
|
+
const browser = await chromium.launch({
|
|
26
|
+
args: ["--use-gl=angle", "--use-angle=swiftshader", "--enable-unsafe-swiftshader", "--ignore-gpu-blocklist"],
|
|
27
|
+
});
|
|
28
|
+
const page = await browser.newPage({
|
|
29
|
+
viewport: { width: options.width ?? 1160, height: options.height ?? 1000 },
|
|
30
|
+
deviceScaleFactor: 2,
|
|
31
|
+
});
|
|
32
|
+
const errors = [];
|
|
33
|
+
page.on("console", (m) => m.type() === "error" && errors.push(m.text()));
|
|
34
|
+
page.on("pageerror", (e) => errors.push(String(e)));
|
|
35
|
+
await page.goto(pathToFileURL(resolve(options.inHTML)).href, { waitUntil: "networkidle" });
|
|
36
|
+
// Resolve once every Plotly graph div has fired plotly_afterplot (3D paints land async, after
|
|
37
|
+
// newPlot's promise resolves), with a per-div fallback so an already-painted div can't hang us.
|
|
38
|
+
await page.evaluate(async () => {
|
|
39
|
+
const doc = globalThis.document;
|
|
40
|
+
const divs = [...doc.querySelectorAll("div")]
|
|
41
|
+
.map((d) => d)
|
|
42
|
+
.filter((d) => d._fullLayout && typeof d.on === "function");
|
|
43
|
+
await Promise.all(divs.map((d) => new Promise((res) => {
|
|
44
|
+
d.on("plotly_afterplot", () => res());
|
|
45
|
+
setTimeout(() => res(), 2000);
|
|
46
|
+
})));
|
|
47
|
+
});
|
|
48
|
+
// Final settle for the software WebGL rasterizer.
|
|
49
|
+
await page.waitForTimeout(800);
|
|
50
|
+
await page.screenshot({ path: resolve(options.outPNG), fullPage: true });
|
|
51
|
+
await browser.close();
|
|
52
|
+
if (errors.length) {
|
|
53
|
+
report?.(`[render] ${errors.length} console error(s):`);
|
|
54
|
+
for (const e of errors.slice(0, 8)) {
|
|
55
|
+
report?.(" " + e);
|
|
56
|
+
}
|
|
54
57
|
}
|
|
58
|
+
report?.(`[render] ${options.outPNG}`);
|
|
59
|
+
return { outPNG: options.outPNG, consoleErrors: errors };
|
|
55
60
|
}
|
|
56
|
-
console.error(`[render] ${outPNG}`);
|
|
57
61
|
//# sourceMappingURL=render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../tools/viz/render.ts"],"names":[],"mappings":"AAA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pC,MAAM,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAA;QACnB,CAAC;IACF,CAAC;IACD,MAAM,EAAE,CAAC,YAAY,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAEtC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,CAAA;AACzD,CAAC"}
|
|
@@ -20,11 +20,30 @@
|
|
|
20
20
|
* layer not plotted here; this map is the rooftop-point sources only.
|
|
21
21
|
*
|
|
22
22
|
* SERVE THE OUTPUT OVER LOCALHOST (the house tile server CORS-restricts to localhost + the docs
|
|
23
|
-
* domains). e.g. `python3 -m http.server -d <dir>`, or `render-map.
|
|
23
|
+
* domains). e.g. `python3 -m http.server -d <dir>`, or `renderServedMapToPNG` (`./render-map.ts`)
|
|
24
|
+
* against the served URL.
|
|
24
25
|
*
|
|
25
|
-
* Run:
|
|
26
|
-
* [--
|
|
27
|
-
* [--nad-mod 700] [--oa-mod 120] [--cap 7000]
|
|
26
|
+
* Run: `mailwoman registry viz source-provenance-map [--state ny] [--db <address-points-us-XX.db>]
|
|
27
|
+
* [--out-html /tmp/source-provenance.html] [--nad-mod 700] [--oa-mod 120] [--cap 7000]`
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
/** Options for {@linkcode sourceProvenanceMap}. */
|
|
30
|
+
export interface SourceProvenanceMapOptions {
|
|
31
|
+
/** State (lowercase postal). Default ny. */
|
|
32
|
+
state?: string;
|
|
33
|
+
/** Address-point DB path. Default `$MAILWOMAN_DATA_ROOT/address-points/address-points-us-<state>.db`. */
|
|
34
|
+
db?: string;
|
|
35
|
+
/** Output HTML path. Default `/tmp/source-provenance.html`. */
|
|
36
|
+
outHtml?: string;
|
|
37
|
+
/** Keep ~1/N of NAD points. Default 700. */
|
|
38
|
+
nadMod?: number;
|
|
39
|
+
/** Keep ~1/N of OpenAddresses points. Default 120. */
|
|
40
|
+
oaMod?: number;
|
|
41
|
+
/** Per-source marker cap. Default 7000. */
|
|
42
|
+
cap?: number;
|
|
43
|
+
}
|
|
44
|
+
/** Render the per-state address-point provenance map — see the module doc. */
|
|
45
|
+
export declare function sourceProvenanceMap(options?: SourceProvenanceMapOptions, report?: (line: string) => void): {
|
|
46
|
+
outHtml: string;
|
|
47
|
+
points: number;
|
|
48
|
+
};
|
|
30
49
|
//# sourceMappingURL=source-provenance-map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-provenance-map.d.ts","sourceRoot":"","sources":["../../../tools/viz/source-provenance-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
|
|
1
|
+
{"version":3,"file":"source-provenance-map.d.ts","sourceRoot":"","sources":["../../../tools/viz/source-provenance-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAQH,mDAAmD;AACnD,MAAM,WAAW,0BAA0B;IAC1C,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yGAAyG;IACzG,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAA;CACZ;AAmBD,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAClC,OAAO,GAAE,0BAA+B,EACxC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA8DrC"}
|
|
@@ -20,38 +20,16 @@
|
|
|
20
20
|
* layer not plotted here; this map is the rooftop-point sources only.
|
|
21
21
|
*
|
|
22
22
|
* SERVE THE OUTPUT OVER LOCALHOST (the house tile server CORS-restricts to localhost + the docs
|
|
23
|
-
* domains). e.g. `python3 -m http.server -d <dir>`, or `render-map.
|
|
23
|
+
* domains). e.g. `python3 -m http.server -d <dir>`, or `renderServedMapToPNG` (`./render-map.ts`)
|
|
24
|
+
* against the served URL.
|
|
24
25
|
*
|
|
25
|
-
* Run:
|
|
26
|
-
* [--
|
|
27
|
-
* [--nad-mod 700] [--oa-mod 120] [--cap 7000]
|
|
26
|
+
* Run: `mailwoman registry viz source-provenance-map [--state ny] [--db <address-points-us-XX.db>]
|
|
27
|
+
* [--out-html /tmp/source-provenance.html] [--nad-mod 700] [--oa-mod 120] [--cap 7000]`
|
|
28
28
|
*/
|
|
29
29
|
import { writeFileSync } from "node:fs";
|
|
30
30
|
import { DatabaseSync } from "node:sqlite";
|
|
31
|
-
import { parseArgs } from "node:util";
|
|
32
31
|
import { dataRootPath } from "@mailwoman/core/utils";
|
|
33
32
|
import { toMapHTML } from "@mailwoman/registry";
|
|
34
|
-
// Loose scan parity with the retired local argv helpers: unknown flags tolerated.
|
|
35
|
-
const { values: rawValues } = parseArgs({
|
|
36
|
-
options: {
|
|
37
|
-
cap: { type: "string" },
|
|
38
|
-
db: { type: "string" },
|
|
39
|
-
"nad-mod": { type: "string" },
|
|
40
|
-
"oa-mod": { type: "string" },
|
|
41
|
-
"out-html": { type: "string" },
|
|
42
|
-
state: { type: "string" },
|
|
43
|
-
},
|
|
44
|
-
strict: false,
|
|
45
|
-
allowPositionals: true,
|
|
46
|
-
});
|
|
47
|
-
// Typed view: strict:false loosens TS inference, but declared options always parse to their schema type.
|
|
48
|
-
const values = rawValues;
|
|
49
|
-
const STATE = (values["state"] || "ny").toLowerCase();
|
|
50
|
-
const DB = values["db"] || `${dataRootPath("address-points")}/address-points-us-${STATE}.db`;
|
|
51
|
-
const OUT = values["out-html"] || "/tmp/source-provenance.html";
|
|
52
|
-
const NAD_MOD = Number(values["nad-mod"] || "700"); // keep ~1/700 of NAD points
|
|
53
|
-
const OA_MOD = Number(values["oa-mod"] || "120"); // keep ~1/120 of OpenAddresses points
|
|
54
|
-
const CAP = Number(values["cap"] || "7000"); // per-source marker cap
|
|
55
33
|
// Collapse the raw `source` string into a human, mappable category. The address-point DB stores e.g.
|
|
56
34
|
// "overture:NAD" or "overture:OpenAddresses/NY/NYC Open Data" — the suffix is the real upstream
|
|
57
35
|
// publisher, which is what we want to color by (the "overture:" prefix is just the theme it arrived in).
|
|
@@ -64,43 +42,56 @@ function categorize(source) {
|
|
|
64
42
|
}
|
|
65
43
|
return { bucket: source, publisher: source };
|
|
66
44
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
45
|
+
/** Render the per-state address-point provenance map — see the module doc. */
|
|
46
|
+
export function sourceProvenanceMap(options = {}, report) {
|
|
47
|
+
const STATE = (options.state || "ny").toLowerCase();
|
|
48
|
+
const DB = options.db || `${dataRootPath("address-points")}/address-points-us-${STATE}.db`;
|
|
49
|
+
const OUT = options.outHtml || "/tmp/source-provenance.html";
|
|
50
|
+
const NAD_MOD = options.nadMod ?? 700; // keep ~1/700 of NAD points
|
|
51
|
+
const OA_MOD = options.oaMod ?? 120; // keep ~1/120 of OpenAddresses points
|
|
52
|
+
const CAP = options.cap ?? 7000; // per-source marker cap
|
|
53
|
+
const db = new DatabaseSync(DB, { readOnly: true });
|
|
54
|
+
// Two stratified samples so the smaller source (OpenAddresses, ~1/6 of NY) stays visible next to NAD.
|
|
55
|
+
// abs(random()) % mod == 0 keeps a spatially-uniform ~1/mod fraction; LIMIT caps the marker count.
|
|
56
|
+
const sample = (where, mod) => db
|
|
57
|
+
.prepare(`SELECT lat, lon, source, number, street_raw FROM address_point
|
|
72
58
|
WHERE ${where} AND lat IS NOT NULL AND lon IS NOT NULL AND abs(random()) % ${mod} = 0
|
|
73
59
|
LIMIT ${CAP}`)
|
|
74
|
-
|
|
75
|
-
const rows = [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
60
|
+
.all();
|
|
61
|
+
const rows = [
|
|
62
|
+
...sample("source = 'overture:NAD'", NAD_MOD),
|
|
63
|
+
...sample("source LIKE 'overture:OpenAddresses%'", OA_MOD),
|
|
64
|
+
];
|
|
65
|
+
db.close();
|
|
66
|
+
const counts = new Map();
|
|
67
|
+
const features = rows.map((r) => {
|
|
68
|
+
const { bucket, publisher } = categorize(r.source);
|
|
69
|
+
counts.set(bucket, (counts.get(bucket) ?? 0) + 1);
|
|
70
|
+
const addr = [r.number, r.street_raw].filter(Boolean).join(" ").trim();
|
|
71
|
+
return {
|
|
72
|
+
type: "Feature",
|
|
73
|
+
geometry: { type: "Point", coordinates: [r.lon, r.lat] },
|
|
74
|
+
properties: {
|
|
75
|
+
bucket,
|
|
76
|
+
sources: [bucket],
|
|
77
|
+
recordCount: 1,
|
|
78
|
+
geocodeTier: "address_point",
|
|
79
|
+
organization: publisher,
|
|
80
|
+
address: addr || null,
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
const geojson = { type: "FeatureCollection", features };
|
|
85
|
+
const html = toMapHTML(geojson, {
|
|
86
|
+
title: `Address-point provenance — ${STATE.toUpperCase()}, every point colored by its open-data source`,
|
|
87
|
+
flavor: "light",
|
|
88
|
+
colorBy: "bucket",
|
|
89
|
+
});
|
|
90
|
+
writeFileSync(OUT, html);
|
|
91
|
+
report?.(`[written] ${OUT} (${features.length} points)`);
|
|
92
|
+
for (const [bucket, n] of [...counts.entries()].sort((a, b) => b[1] - a[1])) {
|
|
93
|
+
report?.(` ${n.toString().padStart(5)} ${bucket}`);
|
|
94
|
+
}
|
|
95
|
+
return { outHtml: OUT, points: features.length };
|
|
105
96
|
}
|
|
106
97
|
//# sourceMappingURL=source-provenance-map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-provenance-map.js","sourceRoot":"","sources":["../../../tools/viz/source-provenance-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"source-provenance-map.js","sourceRoot":"","sources":["../../../tools/viz/source-provenance-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAkB/C,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,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,eAAe,CAAA;QAEnE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,mBAAmB,SAAS,EAAE,EAAE,CAAA;IA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,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7E,MAAM,EAAE,CAAC,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"}
|
|
@@ -20,8 +20,16 @@
|
|
|
20
20
|
* Emits a self-contained SVG (the docs' committed-chart-asset convention — see
|
|
21
21
|
* `docs/articles/evals/charts/*.svg`), no browser required.
|
|
22
22
|
*
|
|
23
|
-
* Run:
|
|
24
|
-
* [--out-svg docs/articles/evals/charts/dedup-yardstick.svg]
|
|
23
|
+
* Run: `mailwoman registry viz yardstick-figure
|
|
24
|
+
* [--out-svg docs/articles/evals/charts/dedup-yardstick.svg]`
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
/** Options for {@linkcode yardstickFigure}. */
|
|
27
|
+
export interface YardstickFigureOptions {
|
|
28
|
+
/** Output SVG path. Default `docs/articles/evals/charts/dedup-yardstick.svg` (relative to cwd). */
|
|
29
|
+
outSvg?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Emit the dedup-yardstick slope chart as a self-contained SVG — see the module doc. */
|
|
32
|
+
export declare function yardstickFigure(options?: YardstickFigureOptions, report?: (line: string) => void): {
|
|
33
|
+
outSvg: string;
|
|
34
|
+
};
|
|
27
35
|
//# sourceMappingURL=yardstick-figure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yardstick-figure.d.ts","sourceRoot":"","sources":["../../../tools/viz/yardstick-figure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG"}
|
|
1
|
+
{"version":3,"file":"yardstick-figure.d.ts","sourceRoot":"","sources":["../../../tools/viz/yardstick-figure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,+CAA+C;AAC/C,MAAM,WAAW,sBAAsB;IACtC,mGAAmG;IACnG,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;AAuDD,yFAAyF;AACzF,wBAAgB,eAAe,CAC9B,OAAO,GAAE,sBAA2B,EACpC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAgHpB"}
|