@mailwoman/tiger 11.2.0 → 11.4.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/tract.d.ts CHANGED
@@ -2,30 +2,31 @@ import type { GeoFeature, MultiPolygonLiteral } from "@mailwoman/spatial";
2
2
  import type { TIGERProperty, TIGERPropertyRecord } from "#constants";
3
3
  import type { FIPSTractGeoID, GeoIDPart, ParsedGeoIDTractLevel } from "#geoid";
4
4
  /**
5
- * @title tiger Tract
5
+ * @title TIGER Tract
6
6
  * @public
7
7
  */
8
8
  export interface TIGERTract extends ParsedGeoIDTractLevel {
9
9
  /**
10
- * The GeoID of the tabulated block.
10
+ * The GeoID that identifies the tract.
11
11
  *
12
12
  * @title Geo ID
13
13
  */
14
14
  GEOID: FIPSTractGeoID;
15
15
  /**
16
- * The geometry of the tabulated block, typically a polygon, but may be a
17
- * multi-polygon for blocks with holes, or islands.
16
+ * The tract's geometry is typically a polygon.
17
+ *
18
+ * It may be a multipolygon when the tract contains holes or islands.
18
19
  *
19
20
  * @title Geometry
20
21
  */
21
22
  GEOMETRY: MultiPolygonLiteral;
22
23
  }
23
24
  /**
24
- * Properties of a Census Tract.
25
+ * Properties recorded for a Census tract.
25
26
  */
26
27
  export type TIGERTractProperties = Pick<TIGERPropertyRecord<FIPSTractGeoID>, typeof TIGERProperty.GeoID | typeof GeoIDPart.State | typeof GeoIDPart.County | typeof GeoIDPart.Tract | typeof TIGERProperty.ClassCode | typeof TIGERProperty.FunctionalStatus | typeof TIGERProperty.LandAreaSqm | typeof TIGERProperty.WaterAreaSqm | typeof TIGERProperty.CentroidLongitude | typeof TIGERProperty.CentroidLatitude>;
27
28
  /**
28
- * A geographci feature representing a Census Tract.
29
+ * A GeoJSON feature that represents a Census tract.
29
30
  */
30
31
  export type TIGERTractFeature = GeoFeature<MultiPolygonLiteral, TIGERTractProperties>;
31
32
  //# sourceMappingURL=tract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tract.d.ts","sourceRoot":"","sources":["../lib/tract.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AAE9E;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,qBAAqB;IACxD;;;;OAIG;IACH,KAAK,EAAE,cAAc,CAAA;IAErB;;;;;OAKG;IACH,QAAQ,EAAE,mBAAmB,CAAA;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACtC,mBAAmB,CAAC,cAAc,CAAC,EACjC,OAAO,aAAa,CAAC,KAAK,GAC1B,OAAO,SAAS,CAAC,KAAK,GACtB,OAAO,SAAS,CAAC,MAAM,GACvB,OAAO,SAAS,CAAC,KAAK,GACtB,OAAO,aAAa,CAAC,SAAS,GAC9B,OAAO,aAAa,CAAC,gBAAgB,GACrC,OAAO,aAAa,CAAC,WAAW,GAChC,OAAO,aAAa,CAAC,YAAY,GACjC,OAAO,aAAa,CAAC,iBAAiB,GACtC,OAAO,aAAa,CAAC,gBAAgB,CACvC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAA"}
1
+ {"version":3,"file":"tract.d.ts","sourceRoot":"","sources":["../lib/tract.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AAE9E;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,qBAAqB;IACxD;;;;OAIG;IACH,KAAK,EAAE,cAAc,CAAA;IAErB;;;;;;OAMG;IACH,QAAQ,EAAE,mBAAmB,CAAA;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACtC,mBAAmB,CAAC,cAAc,CAAC,EACjC,OAAO,aAAa,CAAC,KAAK,GAC1B,OAAO,SAAS,CAAC,KAAK,GACtB,OAAO,SAAS,CAAC,MAAM,GACvB,OAAO,SAAS,CAAC,KAAK,GACtB,OAAO,aAAa,CAAC,SAAS,GAC9B,OAAO,aAAa,CAAC,gBAAgB,GACrC,OAAO,aAAa,CAAC,WAAW,GAChC,OAAO,aAAa,CAAC,YAAY,GACjC,OAAO,aAAa,CAAC,iBAAiB,GACtC,OAAO,aAAa,CAAC,gBAAgB,CACvC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/tiger",
3
- "version": "11.2.0",
3
+ "version": "11.4.0",
4
4
  "description": "US Census TIGER/Line data processing and analysis.",
5
5
  "keywords": [
6
6
  "census",
@@ -132,9 +132,9 @@
132
132
  "test": "node ./out/sdk/TIGERService.test.js"
133
133
  },
134
134
  "dependencies": {
135
- "@mailwoman/core": "11.2.0",
136
- "@mailwoman/spatial": "11.2.0",
137
- "@mailwoman/sqlite": "11.2.0",
135
+ "@mailwoman/core": "11.4.0",
136
+ "@mailwoman/spatial": "11.4.0",
137
+ "@mailwoman/sqlite": "11.4.0",
138
138
  "@turf/boolean-contains": "^7.4.0",
139
139
  "kysely": "^0.29.7",
140
140
  "path-ts": "^2.5.0",
package/sdk/fetch.ts CHANGED
@@ -5,7 +5,7 @@ import { APIClient, pluckResponseData } from "@mailwoman/core/api"
5
5
  import { dataRootPath } from "@mailwoman/core/data-root"
6
6
  import { makeDirectories } from "@mailwoman/core/fs/writers"
7
7
  import { extractZipEntries } from "@mailwoman/core/fs/zip"
8
- import { stringifyJSON } from "@mailwoman/core/json"
8
+ import { stringifyJSON } from "@mailwoman/core/values/json"
9
9
  import { ogr2ogrGeoJSONSeq } from "@mailwoman/spatial/tools/ogr/stream"
10
10
  import { DatabaseClient } from "@mailwoman/sqlite/client"
11
11
  import { PathBuilder } from "path-ts"
@@ -20,7 +20,7 @@
20
20
 
21
21
  import { tempRootPath } from "@mailwoman/core/data-root"
22
22
  import { writeLocalFile } from "@mailwoman/core/fs/writers"
23
- import { stringifyJSON } from "@mailwoman/core/json"
23
+ import { stringifyJSON } from "@mailwoman/core/values/json"
24
24
 
25
25
  /**
26
26
  * Options for {@linkcode raceDotsMap}.
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { tempRootPath } from "@mailwoman/core/data-root"
10
10
  import { openWriteStream } from "@mailwoman/core/fs/streams"
11
- import { tryParsingJSON, stringifyJSON } from "@mailwoman/core/json"
11
+ import { tryParsingJSON, stringifyJSON } from "@mailwoman/core/values/json"
12
12
  import { DatabaseClient } from "@mailwoman/sqlite/client"
13
13
 
14
14
  import { tigerDatabasePath } from "#paths"
@@ -2,13 +2,15 @@
2
2
  // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
3
 
4
4
  /**
5
- * Minimal static file server that honors http Range requests (206) — Python's `http.server` doesn't .
5
+ * This module provides a minimal static file server that honors HTTP Range responses (206).
6
+ * Python's `http.server` doesn't honor those requests.
6
7
  *
7
8
  * PMTiles reads via Range, so this server cannot serve it.
8
9
  * Used to preview/render a local `.pmtiles` tileset
9
10
  * (e.g. the race-dot map, via `mailwoman tiger race-dots-map --serve`).
10
11
  *
11
- * Not for production. the deployed tiles go through the tile worker.
12
+ * This server isn't intended for production.
13
+ * Deployed tiles go through the tile worker.
12
14
  *
13
15
  * Internal helper module — no standalone command.
14
16
  */
@@ -60,7 +62,8 @@ const TYPES: Record<string, string> = {
60
62
  * Serve `dir` over localhost with http Range support.
61
63
  *
62
64
  * Resolves once the server is listening.
63
- * The caller owns the lifetime (dispose it to stop. Commands typically hold the process open instead).
65
+ * The caller owns the lifetime and can dispose it to stop the server.
66
+ * Commands typically hold the process open instead.
64
67
  */
65
68
  export async function serveWithRangeSupport(
66
69
  options: ServeRangeOptions = {},