@mailwoman/tiger 4.15.0 → 4.16.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/sdk/fetch.d.ts.map +1 -1
- package/out/sdk/fetch.js +2 -1
- package/out/sdk/fetch.js.map +1 -1
- package/out/sdk/redistricting.d.ts.map +1 -1
- package/out/sdk/redistricting.js +2 -1
- package/out/sdk/redistricting.js.map +1 -1
- package/out/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/sdk/fetch.ts +2 -1
- package/sdk/redistricting.ts +2 -1
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/tiger",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "US Census TIGER/Line data processing and analysis.",
|
|
5
|
-
"license": "AGPL-3.0",
|
|
5
|
+
"license": "AGPL-3.0-only",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
8
8
|
"name": "Teffen Ellis",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
".": "./out/index.js"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@mailwoman/core": "4.
|
|
34
|
-
"@mailwoman/spatial": "4.
|
|
33
|
+
"@mailwoman/core": "4.16.0",
|
|
34
|
+
"@mailwoman/spatial": "4.16.0",
|
|
35
35
|
"@turf/boolean-contains": "^7.3.5",
|
|
36
36
|
"kysely": "^0.29.2",
|
|
37
37
|
"shapefile-parser": "^1.0.3",
|
|
38
38
|
"type-fest": "^5.7.0"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
41
|
+
"node": ">=24.18.0"
|
|
42
42
|
},
|
|
43
43
|
"keywords": [
|
|
44
44
|
"census",
|
package/sdk/fetch.ts
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
import { DatabaseClient } from "@mailwoman/core/kysley/client"
|
|
28
|
+
import { mailwomanDataRoot } from "@mailwoman/core/utils"
|
|
28
29
|
import { spawn } from "node:child_process"
|
|
29
30
|
import { createWriteStream, existsSync } from "node:fs"
|
|
30
31
|
import { mkdir, rename } from "node:fs/promises"
|
|
@@ -37,7 +38,7 @@ import type { TIGERBlockTable, TIGERDatabase, TIGERPlaceTable, TIGERStreetTable
|
|
|
37
38
|
import { initializeTIGERSchema, TIGER_PRAGMAS } from "./schema.js"
|
|
38
39
|
|
|
39
40
|
const CENSUS_HOST = "https://www2.census.gov"
|
|
40
|
-
const DEFAULT_DATA_ROOT =
|
|
41
|
+
const DEFAULT_DATA_ROOT = mailwomanDataRoot()
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* Supported TIGER levels. `tabblock20` is per state + carries geometry; `place`/`addrfeat` are
|
package/sdk/redistricting.ts
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { DatabaseClient } from "@mailwoman/core/kysley/client"
|
|
20
|
+
import { mailwomanDataRoot } from "@mailwoman/core/utils"
|
|
20
21
|
import { spawn } from "node:child_process"
|
|
21
22
|
import { createReadStream, createWriteStream, existsSync } from "node:fs"
|
|
22
23
|
import { mkdir, rename } from "node:fs/promises"
|
|
@@ -30,7 +31,7 @@ import { initializeTIGERSchema, TIGER_PRAGMAS, type PLBlockTable, type TIGERData
|
|
|
30
31
|
|
|
31
32
|
const REDISTRICTING_BASE =
|
|
32
33
|
"https://www2.census.gov/programs-surveys/decennial/2020/data/01-Redistricting_File--PL_94-171"
|
|
33
|
-
const DEFAULT_DATA_ROOT =
|
|
34
|
+
const DEFAULT_DATA_ROOT = mailwomanDataRoot()
|
|
34
35
|
|
|
35
36
|
// P.L. 94-171 (2020) pipe-delimited field offsets (0-based).
|
|
36
37
|
// Geographic header: …|SUMLEV(2)|…|LOGRECNO(7)|GEOID(8)|GEOCODE(9)|… — GEOCODE is the bare 15-char
|