@mailwoman/tiger 1.0.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 (103) hide show
  1. package/README.md +3 -0
  2. package/block-group.ts +151 -0
  3. package/class-code.ts +1026 -0
  4. package/constants.ts +252 -0
  5. package/county-subdivision.ts +154 -0
  6. package/county.ts +135 -0
  7. package/files.ts +251 -0
  8. package/functional-status.ts +64 -0
  9. package/geoid.ts +678 -0
  10. package/index.ts +18 -0
  11. package/legal-statistical-area.ts +222 -0
  12. package/out/block-group.d.ts +135 -0
  13. package/out/block-group.d.ts.map +1 -0
  14. package/out/block-group.js +7 -0
  15. package/out/block-group.js.map +1 -0
  16. package/out/class-code.d.ts +863 -0
  17. package/out/class-code.d.ts.map +1 -0
  18. package/out/class-code.js +864 -0
  19. package/out/class-code.js.map +1 -0
  20. package/out/constants.d.ts +220 -0
  21. package/out/constants.d.ts.map +1 -0
  22. package/out/constants.js +98 -0
  23. package/out/constants.js.map +1 -0
  24. package/out/county-subdivision.d.ts +139 -0
  25. package/out/county-subdivision.d.ts.map +1 -0
  26. package/out/county-subdivision.js +7 -0
  27. package/out/county-subdivision.js.map +1 -0
  28. package/out/county.d.ts +120 -0
  29. package/out/county.d.ts.map +1 -0
  30. package/out/county.js +9 -0
  31. package/out/county.js.map +1 -0
  32. package/out/files.d.ts +118 -0
  33. package/out/files.d.ts.map +1 -0
  34. package/out/files.js +142 -0
  35. package/out/files.js.map +1 -0
  36. package/out/functional-status.d.ts +64 -0
  37. package/out/functional-status.d.ts.map +1 -0
  38. package/out/functional-status.js +65 -0
  39. package/out/functional-status.js.map +1 -0
  40. package/out/geoid.d.ts +438 -0
  41. package/out/geoid.d.ts.map +1 -0
  42. package/out/geoid.js +255 -0
  43. package/out/geoid.js.map +1 -0
  44. package/out/index.d.ts +18 -0
  45. package/out/index.d.ts.map +1 -0
  46. package/out/index.js +18 -0
  47. package/out/index.js.map +1 -0
  48. package/out/legal-statistical-area.d.ts +222 -0
  49. package/out/legal-statistical-area.d.ts.map +1 -0
  50. package/out/legal-statistical-area.js +223 -0
  51. package/out/legal-statistical-area.js.map +1 -0
  52. package/out/sdk/fetch.d.ts.map +1 -0
  53. package/out/sdk/fetch.js.map +1 -0
  54. package/out/sdk/index.d.ts +7 -0
  55. package/out/sdk/index.d.ts.map +1 -0
  56. package/out/sdk/index.js +7 -0
  57. package/out/sdk/index.js.map +1 -0
  58. package/out/sdk/redistricting.d.ts.map +1 -0
  59. package/out/sdk/redistricting.js.map +1 -0
  60. package/out/sdk/schema.d.ts.map +1 -0
  61. package/out/sdk/schema.js.map +1 -0
  62. package/out/sdk/state/TIGERTabulatedBlockEntity.d.ts +13 -0
  63. package/out/sdk/state/TIGERTabulatedBlockEntity.d.ts.map +1 -0
  64. package/out/sdk/state/TIGERTabulatedBlockEntity.js +22 -0
  65. package/out/sdk/state/TIGERTabulatedBlockEntity.js.map +1 -0
  66. package/out/sdk/state/TIGERTractEntity.d.ts +31 -0
  67. package/out/sdk/state/TIGERTractEntity.d.ts.map +1 -0
  68. package/out/sdk/state/TIGERTractEntity.js +7 -0
  69. package/out/sdk/state/TIGERTractEntity.js.map +1 -0
  70. package/out/sdk/state/block-operations.d.ts +36 -0
  71. package/out/sdk/state/block-operations.d.ts.map +1 -0
  72. package/out/sdk/state/block-operations.js +37 -0
  73. package/out/sdk/state/block-operations.js.map +1 -0
  74. package/out/sdk/state/index.d.ts +9 -0
  75. package/out/sdk/state/index.d.ts.map +1 -0
  76. package/out/sdk/state/index.js +9 -0
  77. package/out/sdk/state/index.js.map +1 -0
  78. package/out/state.d.ts +595 -0
  79. package/out/state.d.ts.map +1 -0
  80. package/out/state.js +384 -0
  81. package/out/state.js.map +1 -0
  82. package/out/tabulation-block.d.ts +43 -0
  83. package/out/tabulation-block.d.ts.map +1 -0
  84. package/out/tabulation-block.js +9 -0
  85. package/out/tabulation-block.js.map +1 -0
  86. package/out/tract.d.ts +36 -0
  87. package/out/tract.d.ts.map +1 -0
  88. package/out/tract.js +8 -0
  89. package/out/tract.js.map +1 -0
  90. package/out/tsconfig.tsbuildinfo +1 -0
  91. package/package.json +41 -0
  92. package/sdk/data/nation/index.json +14642 -0
  93. package/sdk/index.ts +7 -0
  94. package/sdk/initialize.sql +161 -0
  95. package/sdk/state/TIGERTabulatedBlockEntity.ts +25 -0
  96. package/sdk/state/TIGERTractEntity.ts +34 -0
  97. package/sdk/state/block-operations.ts +69 -0
  98. package/sdk/state/index.ts +9 -0
  99. package/state.ts +553 -0
  100. package/tabulation-block.ts +68 -0
  101. package/tract.ts +52 -0
  102. package/tsconfig.json +16 -0
  103. package/typedoc.json +5 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Mailwoman TIGER
2
+
3
+ This package contains a collection of utilities for working with US Census TIGER data.
package/block-group.ts ADDED
@@ -0,0 +1,151 @@
1
+ /**
2
+ * @copyright Sister Software.
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ */
6
+
7
+ import type { TIGERClassCode } from "./class-code.js"
8
+ import type { TIGERFunctionalStatus } from "./functional-status.js"
9
+ import type { LegalStatisticalAreaDescription } from "./legal-statistical-area.js"
10
+ import type { AdminLevel1Code } from "./state.js"
11
+
12
+ /**
13
+ * @title TIGER Block Group
14
+ * @public
15
+ */
16
+ export interface TIGERBlockGroup {
17
+ /**
18
+ * @title State FIPS Code
19
+ */
20
+ STATEFP: AdminLevel1Code
21
+
22
+ /**
23
+ * @title County FIPS Code
24
+ * @minLength 3
25
+ * @maxLength 3
26
+ * @pattern ^\d{3}$
27
+ */
28
+ COUNTYFP: string
29
+
30
+ /**
31
+ * @title County Subdivision FIPS Code
32
+ *
33
+ * @minLength 5
34
+ * @maxLength 5
35
+ * @pattern ^\d{5}$
36
+ */
37
+ COUSUBFP: string
38
+
39
+ /**
40
+ * @see {@link https://www.usgs.gov/us-board-on-geographic-names/domestic-names | USGS: Domestic Names}
41
+ * @title County Subdivision GNIS Code
42
+ *
43
+ * @minLength 8
44
+ * @maxLength 8
45
+ * @pattern ^\d{8}$
46
+ */
47
+ COUSUBNS: string
48
+
49
+ /**
50
+ * @title Block Group GEOID
51
+ *
52
+ * @minLength 10
53
+ * @maxLength 10
54
+ * @pattern ^\d{10}$
55
+ */
56
+ GEOID: string
57
+
58
+ /**
59
+ * Fully Qualified GEOID as used in CEDSCI and other systems.
60
+ *
61
+ * @title Fully Qualified Geographic Identifier
62
+ * @minLength 19
63
+ * @maxLength 19
64
+ * @pattern ^\d{19}$
65
+ */
66
+ GEOIDFQ: string
67
+
68
+ /**
69
+ * Current name and the translated legal/statistical area description code for county
70
+ * sub-division.
71
+ *
72
+ * @title Name/Legal Statistical Area Description
73
+ * @minLength 1
74
+ * @maxLength 100
75
+ */
76
+ NAMELSAD: string
77
+
78
+ /**
79
+ * Legal/Statistical Area Description.
80
+ *
81
+ * @title Legal/Statistical Area Description
82
+ */
83
+ LSAD: LegalStatisticalAreaDescription
84
+
85
+ /**
86
+ * Class Code.
87
+ *
88
+ * @title Class Code
89
+ */
90
+ CLASSFP: TIGERClassCode
91
+
92
+ /**
93
+ * MAF/TIGER Feature Class Code.
94
+ *
95
+ * @title MAF/TIGER Feature Class Code
96
+ *
97
+ * @minLength 5
98
+ * @maxLength 5
99
+ * @pattern ^[A-Z]\d{1}$
100
+ */
101
+ MTFCC: TIGERClassCode
102
+
103
+ /**
104
+ * Functional Status.
105
+ *
106
+ * @title Functional Status
107
+ * @minLength 1
108
+ * @maxLength 1
109
+ * @pattern ^[A-Z]$
110
+ */
111
+ FUNCSTAT: TIGERFunctionalStatus
112
+
113
+ /**
114
+ * L Land Area in square meters.
115
+ *
116
+ * @title Land Area
117
+ * @minimum 0
118
+ */
119
+ ALAND: number
120
+
121
+ /**
122
+ * Water Area in square meters.
123
+ *
124
+ * @title Water Area
125
+ * @minimum 0
126
+ */
127
+ AWATER: number
128
+
129
+ /**
130
+ * Latitude of the internal point.
131
+ *
132
+ * @title Internal Point Latitude
133
+ */
134
+ INTPTLAT: string
135
+
136
+ /**
137
+ * Longitude of the internal point.
138
+ *
139
+ * @title Internal Point Longitude
140
+ */
141
+ INTPTLON: string
142
+
143
+ /**
144
+ * Name of the block group.
145
+ *
146
+ * @title Name
147
+ * @minLength 1
148
+ * @maxLength 100
149
+ */
150
+ NAME: string
151
+ }