@urbankitstudio/atlas 0.1.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/LICENSE +21 -0
- package/README.md +91 -0
- package/data/arizona.json +55 -0
- package/data/california.json +82 -0
- package/data/colorado.json +56 -0
- package/data/florida.json +171 -0
- package/data/georgia.json +51 -0
- package/data/illinois.json +332 -0
- package/data/index.json +61 -0
- package/data/minnesota.json +50 -0
- package/data/nevada.json +47 -0
- package/data/new-york.json +79 -0
- package/data/north-carolina.json +52 -0
- package/data/ohio.json +97 -0
- package/data/pennsylvania.json +86 -0
- package/data/texas.json +133 -0
- package/data/virginia.json +46 -0
- package/data/washington.json +45 -0
- package/dist/index.cjs +1564 -0
- package/dist/index.d.cts +113 -0
- package/dist/index.d.ts +113 -0
- package/dist/index.js +1552 -0
- package/package.json +68 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
type ServiceType = "FeatureServer" | "MapServer";
|
|
2
|
+
type LicenseType = "public" | "open-data" | "restricted" | "unknown";
|
|
3
|
+
type EndpointStatus = "live" | "stale" | "unreachable" | "unverified";
|
|
4
|
+
type VerifiedBy = "manual" | "arcgis-hub-seed" | "automated";
|
|
5
|
+
interface SearchField {
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
searchable: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface EndpointRecord {
|
|
11
|
+
url: string;
|
|
12
|
+
serviceType: ServiceType;
|
|
13
|
+
layerIndex: number;
|
|
14
|
+
layerName: string;
|
|
15
|
+
supportsQuery: boolean;
|
|
16
|
+
corsEnabled: boolean | null;
|
|
17
|
+
searchFields: SearchField[];
|
|
18
|
+
sampleQuery: string | null;
|
|
19
|
+
license: LicenseType;
|
|
20
|
+
licenseUrl: string | null;
|
|
21
|
+
status: EndpointStatus;
|
|
22
|
+
lastVerified: string;
|
|
23
|
+
verifiedBy: VerifiedBy;
|
|
24
|
+
}
|
|
25
|
+
interface ContactInfo {
|
|
26
|
+
department: string;
|
|
27
|
+
url: string | null;
|
|
28
|
+
email: string | null;
|
|
29
|
+
}
|
|
30
|
+
interface CountyRecord {
|
|
31
|
+
id: string;
|
|
32
|
+
state: string;
|
|
33
|
+
stateName: string;
|
|
34
|
+
stateSlug: string;
|
|
35
|
+
county: string;
|
|
36
|
+
countySlug: string;
|
|
37
|
+
countyFips: string | null;
|
|
38
|
+
endpoints: EndpointRecord[];
|
|
39
|
+
contact: ContactInfo | null;
|
|
40
|
+
hasPublicRest: boolean;
|
|
41
|
+
notes: string | null;
|
|
42
|
+
}
|
|
43
|
+
interface StateFile {
|
|
44
|
+
stateSlug: string;
|
|
45
|
+
stateName: string;
|
|
46
|
+
stateAbbrev: string;
|
|
47
|
+
counties: CountyRecord[];
|
|
48
|
+
lastUpdated: string;
|
|
49
|
+
}
|
|
50
|
+
interface StateIndexEntry {
|
|
51
|
+
slug: string;
|
|
52
|
+
name: string;
|
|
53
|
+
abbrev: string;
|
|
54
|
+
countyCount: number;
|
|
55
|
+
endpointCount: number;
|
|
56
|
+
populated: boolean;
|
|
57
|
+
}
|
|
58
|
+
interface AtlasIndex {
|
|
59
|
+
version: string;
|
|
60
|
+
lastUpdated: string;
|
|
61
|
+
states: StateIndexEntry[];
|
|
62
|
+
totals: {
|
|
63
|
+
states: number;
|
|
64
|
+
counties: number;
|
|
65
|
+
endpoints: number;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Look up a county by state slug and county slug.
|
|
71
|
+
* Returns undefined if the state isn't populated yet or the county doesn't exist.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* findCounty("illinois", "kane-county")
|
|
75
|
+
* // → { county: "Kane", endpoints: [...], ... }
|
|
76
|
+
*/
|
|
77
|
+
declare function findCounty(stateSlug: string, countySlug: string): CountyRecord | undefined;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Look up a state's full county list by state slug (e.g. "illinois", "new-york").
|
|
81
|
+
* Returns undefined if the state isn't populated in the bundled data yet.
|
|
82
|
+
*/
|
|
83
|
+
declare function findState(stateSlug: string): StateFile | undefined;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* List all 50 US states from the atlas index, including those without
|
|
87
|
+
* populated county data yet (use the `populated` flag to filter).
|
|
88
|
+
*/
|
|
89
|
+
declare function listStates(): StateIndexEntry[];
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Return the list of counties with mapped REST endpoints for a given state slug.
|
|
93
|
+
* Returns an empty array if the state isn't populated yet.
|
|
94
|
+
*/
|
|
95
|
+
declare function listCountiesByState(stateSlug: string): CountyRecord[];
|
|
96
|
+
|
|
97
|
+
declare function slugify(s: string): string;
|
|
98
|
+
declare function countySlugFromName(county: string): string;
|
|
99
|
+
declare function buildParcelLookupDeepLink(endpoint: EndpointRecord, base?: string): string;
|
|
100
|
+
declare function statePath(stateSlug: string): string;
|
|
101
|
+
declare function countyPath(stateSlug: string, countySlug: string): string;
|
|
102
|
+
|
|
103
|
+
declare const atlasIndex: AtlasIndex;
|
|
104
|
+
interface Atlas {
|
|
105
|
+
version: string;
|
|
106
|
+
lastUpdated: string;
|
|
107
|
+
states: AtlasIndex["states"];
|
|
108
|
+
totals: AtlasIndex["totals"];
|
|
109
|
+
byStateSlug: Map<string, StateFile>;
|
|
110
|
+
}
|
|
111
|
+
declare const atlas: Atlas;
|
|
112
|
+
|
|
113
|
+
export { type Atlas, type AtlasIndex, type ContactInfo, type CountyRecord, type EndpointRecord, type EndpointStatus, type LicenseType, type SearchField, type ServiceType, type StateFile, type StateIndexEntry, type VerifiedBy, atlas, atlasIndex, buildParcelLookupDeepLink, countyPath, countySlugFromName, findCounty, findState, listCountiesByState, listStates, slugify, statePath };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
type ServiceType = "FeatureServer" | "MapServer";
|
|
2
|
+
type LicenseType = "public" | "open-data" | "restricted" | "unknown";
|
|
3
|
+
type EndpointStatus = "live" | "stale" | "unreachable" | "unverified";
|
|
4
|
+
type VerifiedBy = "manual" | "arcgis-hub-seed" | "automated";
|
|
5
|
+
interface SearchField {
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
searchable: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface EndpointRecord {
|
|
11
|
+
url: string;
|
|
12
|
+
serviceType: ServiceType;
|
|
13
|
+
layerIndex: number;
|
|
14
|
+
layerName: string;
|
|
15
|
+
supportsQuery: boolean;
|
|
16
|
+
corsEnabled: boolean | null;
|
|
17
|
+
searchFields: SearchField[];
|
|
18
|
+
sampleQuery: string | null;
|
|
19
|
+
license: LicenseType;
|
|
20
|
+
licenseUrl: string | null;
|
|
21
|
+
status: EndpointStatus;
|
|
22
|
+
lastVerified: string;
|
|
23
|
+
verifiedBy: VerifiedBy;
|
|
24
|
+
}
|
|
25
|
+
interface ContactInfo {
|
|
26
|
+
department: string;
|
|
27
|
+
url: string | null;
|
|
28
|
+
email: string | null;
|
|
29
|
+
}
|
|
30
|
+
interface CountyRecord {
|
|
31
|
+
id: string;
|
|
32
|
+
state: string;
|
|
33
|
+
stateName: string;
|
|
34
|
+
stateSlug: string;
|
|
35
|
+
county: string;
|
|
36
|
+
countySlug: string;
|
|
37
|
+
countyFips: string | null;
|
|
38
|
+
endpoints: EndpointRecord[];
|
|
39
|
+
contact: ContactInfo | null;
|
|
40
|
+
hasPublicRest: boolean;
|
|
41
|
+
notes: string | null;
|
|
42
|
+
}
|
|
43
|
+
interface StateFile {
|
|
44
|
+
stateSlug: string;
|
|
45
|
+
stateName: string;
|
|
46
|
+
stateAbbrev: string;
|
|
47
|
+
counties: CountyRecord[];
|
|
48
|
+
lastUpdated: string;
|
|
49
|
+
}
|
|
50
|
+
interface StateIndexEntry {
|
|
51
|
+
slug: string;
|
|
52
|
+
name: string;
|
|
53
|
+
abbrev: string;
|
|
54
|
+
countyCount: number;
|
|
55
|
+
endpointCount: number;
|
|
56
|
+
populated: boolean;
|
|
57
|
+
}
|
|
58
|
+
interface AtlasIndex {
|
|
59
|
+
version: string;
|
|
60
|
+
lastUpdated: string;
|
|
61
|
+
states: StateIndexEntry[];
|
|
62
|
+
totals: {
|
|
63
|
+
states: number;
|
|
64
|
+
counties: number;
|
|
65
|
+
endpoints: number;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Look up a county by state slug and county slug.
|
|
71
|
+
* Returns undefined if the state isn't populated yet or the county doesn't exist.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* findCounty("illinois", "kane-county")
|
|
75
|
+
* // → { county: "Kane", endpoints: [...], ... }
|
|
76
|
+
*/
|
|
77
|
+
declare function findCounty(stateSlug: string, countySlug: string): CountyRecord | undefined;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Look up a state's full county list by state slug (e.g. "illinois", "new-york").
|
|
81
|
+
* Returns undefined if the state isn't populated in the bundled data yet.
|
|
82
|
+
*/
|
|
83
|
+
declare function findState(stateSlug: string): StateFile | undefined;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* List all 50 US states from the atlas index, including those without
|
|
87
|
+
* populated county data yet (use the `populated` flag to filter).
|
|
88
|
+
*/
|
|
89
|
+
declare function listStates(): StateIndexEntry[];
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Return the list of counties with mapped REST endpoints for a given state slug.
|
|
93
|
+
* Returns an empty array if the state isn't populated yet.
|
|
94
|
+
*/
|
|
95
|
+
declare function listCountiesByState(stateSlug: string): CountyRecord[];
|
|
96
|
+
|
|
97
|
+
declare function slugify(s: string): string;
|
|
98
|
+
declare function countySlugFromName(county: string): string;
|
|
99
|
+
declare function buildParcelLookupDeepLink(endpoint: EndpointRecord, base?: string): string;
|
|
100
|
+
declare function statePath(stateSlug: string): string;
|
|
101
|
+
declare function countyPath(stateSlug: string, countySlug: string): string;
|
|
102
|
+
|
|
103
|
+
declare const atlasIndex: AtlasIndex;
|
|
104
|
+
interface Atlas {
|
|
105
|
+
version: string;
|
|
106
|
+
lastUpdated: string;
|
|
107
|
+
states: AtlasIndex["states"];
|
|
108
|
+
totals: AtlasIndex["totals"];
|
|
109
|
+
byStateSlug: Map<string, StateFile>;
|
|
110
|
+
}
|
|
111
|
+
declare const atlas: Atlas;
|
|
112
|
+
|
|
113
|
+
export { type Atlas, type AtlasIndex, type ContactInfo, type CountyRecord, type EndpointRecord, type EndpointStatus, type LicenseType, type SearchField, type ServiceType, type StateFile, type StateIndexEntry, type VerifiedBy, atlas, atlasIndex, buildParcelLookupDeepLink, countyPath, countySlugFromName, findCounty, findState, listCountiesByState, listStates, slugify, statePath };
|