geolookup-plugin 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 +201 -0
- package/README.md +485 -0
- package/config.yaml +26 -0
- package/data/alabama.tar.gz +0 -0
- package/data/alaska.tar.gz +0 -0
- package/data/american samoa.tar.gz +0 -0
- package/data/arizona.tar.gz +0 -0
- package/data/arkansas.tar.gz +0 -0
- package/data/california.tar.gz +0 -0
- package/data/cnmi.tar.gz +0 -0
- package/data/colorado.tar.gz +0 -0
- package/data/connecticut.tar.gz +0 -0
- package/data/dc.tar.gz +0 -0
- package/data/delaware.tar.gz +0 -0
- package/data/florida.tar.gz +0 -0
- package/data/georgia.tar.gz +0 -0
- package/data/guam.tar.gz +0 -0
- package/data/hawaii.tar.gz +0 -0
- package/data/idaho.tar.gz +0 -0
- package/data/illinois.tar.gz +0 -0
- package/data/indiana.tar.gz +0 -0
- package/data/iowa.tar.gz +0 -0
- package/data/kansas.tar.gz +0 -0
- package/data/kentucky.tar.gz +0 -0
- package/data/louisiana.tar.gz +0 -0
- package/data/maine.tar.gz +0 -0
- package/data/maryland.tar.gz +0 -0
- package/data/massachusetts.tar.gz +0 -0
- package/data/michigan.tar.gz +0 -0
- package/data/minnesota.tar.gz +0 -0
- package/data/mississippi.tar.gz +0 -0
- package/data/missouri.tar.gz +0 -0
- package/data/montana.tar.gz +0 -0
- package/data/nebraska.tar.gz +0 -0
- package/data/nevada.tar.gz +0 -0
- package/data/new hampshire.tar.gz +0 -0
- package/data/new jersey.tar.gz +0 -0
- package/data/new mexico.tar.gz +0 -0
- package/data/new york.tar.gz +0 -0
- package/data/north carolina.tar.gz +0 -0
- package/data/north dakota.tar.gz +0 -0
- package/data/ohio.tar.gz +0 -0
- package/data/oklahoma.tar.gz +0 -0
- package/data/oregon.tar.gz +0 -0
- package/data/pennsylvania.tar.gz +0 -0
- package/data/puerto rico.tar.gz +0 -0
- package/data/rhode island.tar.gz +0 -0
- package/data/south carolina.tar.gz +0 -0
- package/data/south dakota.tar.gz +0 -0
- package/data/tennessee.tar.gz +0 -0
- package/data/texas.tar.gz +0 -0
- package/data/usvi.tar.gz +0 -0
- package/data/utah.tar.gz +0 -0
- package/data/vermont.tar.gz +0 -0
- package/data/virginia.tar.gz +0 -0
- package/data/washington.tar.gz +0 -0
- package/data/west virginia.tar.gz +0 -0
- package/data/wisconsin.tar.gz +0 -0
- package/data/wyoming.tar.gz +0 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/DataLoad.d.ts +26 -0
- package/dist/resources/DataLoad.js +141 -0
- package/dist/resources/DataLoad.js.map +1 -0
- package/dist/resources/Geolookup.d.ts +44 -0
- package/dist/resources/Geolookup.js +105 -0
- package/dist/resources/Geolookup.js.map +1 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +57 -0
- package/schemas/README.md +11 -0
- package/schemas/schema.graphql +71 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Schemas
|
|
2
|
+
|
|
3
|
+
Your schemas are defined in `.graphql` files within this `schemas` directory. These files contain the structure and types for your database tables, allowing Harper to automatically generate REST APIs for CRUD operations.
|
|
4
|
+
|
|
5
|
+
Take a look at the [Adding Tables with Schemas](../.agents/skills/harper-best-practices/rules/adding-tables-with-schemas.md) to learn more!
|
|
6
|
+
|
|
7
|
+
## Want to read more?
|
|
8
|
+
|
|
9
|
+
Check out the rest of the "skills" documentation!
|
|
10
|
+
|
|
11
|
+
[Harper Best Practices Skill](../.agents/skills/harper-best-practices/SKILL.md)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Location stores geographic entities across three tiers of US administrative hierarchy:
|
|
2
|
+
# Tier 1 (place): Cities, towns, CDPs — partial coverage (urban areas only)
|
|
3
|
+
# Tier 2 (county_subdivision): Townships, MCDs, CCDs — full national coverage
|
|
4
|
+
# Tier 3 (county): Counties, parishes, boroughs — full national coverage
|
|
5
|
+
#
|
|
6
|
+
# Each location links back to its H3 cells via relationship directives. A tier 1
|
|
7
|
+
# location connects to cells through tier_1, tier 2 through tier_2, etc. Not every
|
|
8
|
+
# location has cells at every tier — a county won't have tier_1 cells, for example.
|
|
9
|
+
type Location @table(database: "geolookup") {
|
|
10
|
+
id: ID @primaryKey
|
|
11
|
+
tier: Int
|
|
12
|
+
tier_label: String
|
|
13
|
+
name: String @indexed
|
|
14
|
+
name_full: String
|
|
15
|
+
feature_type: String
|
|
16
|
+
state_name: String
|
|
17
|
+
state_abbrev: String
|
|
18
|
+
lat: Float
|
|
19
|
+
lon: Float
|
|
20
|
+
h3_index: String @indexed
|
|
21
|
+
country_code: String
|
|
22
|
+
lsad: String
|
|
23
|
+
county_name: String
|
|
24
|
+
county_fips: String
|
|
25
|
+
place_cells: [Cell] @relationship(to : tier_1)
|
|
26
|
+
county_subdivision_cells: [Cell] @relationship(to : tier_2)
|
|
27
|
+
county_cells: [Cell] @relationship(to : tier_3)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
# DataLoadJob tracks the progress of asynchronous bulk data loading jobs.
|
|
31
|
+
# When a user hits the DataLoad endpoint with a state name, a job record is created
|
|
32
|
+
# here and returned immediately. The job progresses through statuses:
|
|
33
|
+
# pending → extracting → loading_locations → loading_cells → completed (or error)
|
|
34
|
+
# Exported so it can be queried directly via REST to check job progress.
|
|
35
|
+
type DataLoadJob @table(database: "geolookup") @export {
|
|
36
|
+
id: ID @primaryKey
|
|
37
|
+
state: String @indexed
|
|
38
|
+
status: String @indexed
|
|
39
|
+
error_message: String
|
|
40
|
+
location_count: Int
|
|
41
|
+
cell_count: Int
|
|
42
|
+
started_at: String
|
|
43
|
+
completed_at: String
|
|
44
|
+
duration_ms: Int
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
# Cell is the spatial index that powers reverse geocoding lookups. Each record
|
|
48
|
+
# represents a single H3 hexagonal cell and links to the Location(s) it belongs
|
|
49
|
+
# to at each tier.
|
|
50
|
+
#
|
|
51
|
+
# Cells are stored in H3's "compact" representation — groups of 7 sibling cells
|
|
52
|
+
# sharing a parent are replaced by that parent cell, recursively. This means cells
|
|
53
|
+
# exist at mixed resolutions (2 through 9), dramatically reducing table size while
|
|
54
|
+
# covering the same geographic area.
|
|
55
|
+
#
|
|
56
|
+
# A single cell can belong to locations at multiple tiers simultaneously. For example,
|
|
57
|
+
# one cell might be in San Francisco (tier_1), a county subdivision (tier_2), and
|
|
58
|
+
# San Francisco County (tier_3).
|
|
59
|
+
#
|
|
60
|
+
# The tier fields are indexed to support lookups in both directions:
|
|
61
|
+
# - Cell → Location: the @relationship directives join to Location records
|
|
62
|
+
# - Location → Cells: the Location relationship directives join back via tier fields
|
|
63
|
+
type Cell @table(database: "geolookup") {
|
|
64
|
+
h3_index: ID @primaryKey
|
|
65
|
+
tier_1: String @indexed
|
|
66
|
+
tier_2: String @indexed
|
|
67
|
+
tier_3: String @indexed
|
|
68
|
+
county: Location @relationship(from: tier_3)
|
|
69
|
+
county_subdivision: Location @relationship(from: tier_2)
|
|
70
|
+
place: Location @relationship(from: tier_1)
|
|
71
|
+
}
|