Skip to content

ramiisaac/coda-pack-king-county-property-search

Repository files navigation

King County Property Search

King County Property Search is a Coda pack tailored to the King County, WA ArcGIS REST endpoints (gisdata.kingcounty.gov). It exposes parcel lookups, school proximity, spatial radius searches, distance/bearing calculations, and service discovery against the county's GIS catalog.

Overview

  • Purpose: Bring King County GIS data -- parcels, schools, and arbitrary feature services -- into Coda for property research and proximity analysis.
  • Inputs: Parcel PINs or addresses, latitude/longitude pairs, layer URLs from the King County directory, and SQL WHERE clauses.
  • Outputs: Parcel records, school lists with distances, features within a radius, distances and bearings, and service catalogs.
  • Audience: Coda makers working with King County property/parcel data who want county-specific helpers without composing raw ArcGIS calls.

Requirements

  • A Coda account with permission to install Packs.
  • Network access from Coda to gisdata.kingcounty.gov (declared via pack.addNetworkDomain).
  • The default base URL is https://gisdata.kingcounty.gov/arcgis/rest/services. The default parcel service is Cadastral/KingCo_Parcels_Web/MapServer/15 and the default schools service is Environment/KingCo_Schools/MapServer/0 -- both public and unauthenticated.
  • Familiarity with King County PIN format (10-digit parcel identifier) for GetParcelInfo.

Installation

  1. Install the King County Property Search pack into your Coda doc from the Pack Gallery or by uploading from this repository.
  2. No account connection prompt appears -- the pack is configured with AuthenticationType.None.
  3. Add the FeatureServicesDirectory sync table to enumerate available services, or call any of the formulas directly (GetParcelInfo, FindNearbySchools, FindFeaturesInRadius, etc.).

Authentication

No authentication required. The pack calls setUserAuthentication({ type: AuthenticationType.None }) and only declares gisdata.kingcounty.gov as a network domain. All targeted King County endpoints are public.

Formulas

Name Type Description Inputs Returns
CalculateDistance Formula Computes distance between two coordinates in miles. lat1, lon1, lat2, lon2 Number (miles)
CalculateBearing Formula Computes the compass bearing between two coordinates in degrees. lat1, lon1, lat2, lon2 Number (degrees)
BatchCalculateDistances Formula Calculates distances from a list of points to a single center point. points (array), center Array of distances
QueryFeatures Formula Queries features from a King County feature layer with a SQL WHERE clause. layerUrl, whereClause Array of feature attribute objects
FindFeaturesInRadius Formula Returns features within a radius (miles) of a coordinate. layerUrl, latitude, longitude, radiusMiles Array of feature objects
GetParcelInfo Formula Looks up a parcel by PIN or address from the King County parcels service. searchValue Parcel object
FindNearbySchools Formula Finds schools within a radius (miles) of a coordinate, using the King County schools service. latitude, longitude, radiusMiles Array of school objects with distance
ListAllArcGISServices Formula Lists all services discovered under a King County ArcGIS base URL. baseUrl Array of { name, type, url }
AnalyzeServiceCoverage Formula Analyzes how a service's features cover a circular area defined by a center and radius. serviceUrl, centerLat, centerLon, radiusMiles Coverage analysis object

Tables

FeatureServicesDirectory

Discovers and lists King County feature services from the configured base URL (https://gisdata.kingcounty.gov/arcgis/rest/services). One row per discovered service. Sync model: full re-fetch per run; results are cached in-process for ~5 minutes during a single execution.

Example usage

Property + nearby schools workflow

  1. In a parcel-research table, add a Parcel Info column with GetParcelInfo(thisRow.PIN) to fetch parcel metadata for each row.
  2. Use the parcel's centroid (latitude/longitude) to populate two helper columns.
  3. Add a Nearby Schools column with FindNearbySchools(thisRow.Lat, thisRow.Lon, 1) to list schools within one mile, including their distance.
  4. Add a Distance to Office column using CalculateDistance(thisRow.Lat, thisRow.Lon, 47.6062, -122.3321) for commute estimates.
  5. Optionally add the FeatureServicesDirectory sync table to discover other county services (zoning, environmental layers) you can query with QueryFeatures or FindFeaturesInRadius.

Limitations

  • The pack is hard-wired to King County's ArcGIS base URL; pointing it at non-King-County hosts will fail because no other network domains are declared.
  • GetParcelInfo and FindNearbySchools rely on the specific service URLs baked into the pack. If King County renames or moves those services, the formulas will need a rebuild.
  • The internal rate limit is 10 requests/second; large BatchCalculateDistances or FindFeaturesInRadius calls may queue.
  • Result sets are bounded by the underlying service's maxRecordCount; the pack does not paginate beyond a single response.
  • In-memory caches live for ~5 minutes per execution and are not shared across pack invocations.

Troubleshooting

Problem Likely cause Resolution
GetParcelInfo returns nothing PIN format mismatch or address not normalized Try a 10-digit PIN with no separators, or simplify the address (street + city)
FindFeaturesInRadius returns empty Coordinate is outside the layer's coverage, or radius too small Verify the lat/lon is inside King County and increase radiusMiles
FindNearbySchools errors The default schools service URL has moved Update the service URL in src/pack.ts (PACK_CONFIG.SCHOOLS_SERVICE_URL)
Sync table is empty Base URL is unreachable or returned no services Open https://gisdata.kingcounty.gov/arcgis/rest/services?f=pjson in a browser to verify availability
Slow batch calls Hit the 10 req/sec internal limit Split the workload or call sequentially across rows
QueryFeatures returns truncated rows Hit the layer's maxRecordCount Add a stricter whereClause to narrow the result set

Development notes

  • Entry point: src/pack.ts.
  • Validate: pnpm coda:validate.
  • Build: pnpm coda:build (or pnpm build).
  • Upload: pnpm coda:upload; release with pnpm coda:release.
  • Tests: pnpm test (Jest -- pre-existing; new packs in this workspace default to Mocha).
  • Lint / typecheck / format: pnpm lint, pnpm typecheck, pnpm format.
  • Dependency utilities: pnpm deps:check, pnpm deps:update, pnpm outdated.

Repository

License

MIT -- see LICENSE.

Author

Rami Isaac raisaac@icloud.com -- https://github.com/ramiisaac

About

Specialized integration for King County, Washington geospatial services with county-specific parcel data and property information

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors