Comprehensive documentation for the Ether Data spatio-temporal data workspace
The GeographyInput type is a discriminated union that supports multiple geographic input formats across the Ether APIs. This flexible system allows users to specify geographic areas using the format most convenient for their use case.
All geography inputs use a kind field as a discriminator to determine the specific geography type. The system automatically converts all input types to Well-Known Text (WKT) format for spatial operations.
Purpose: US postal code boundaries
Data Source: BigQuery public datasets (bigquery-public-data.geo_us_boundaries.zip_codes)
{
"kind": "zip",
"code": "94107",
"country": "US"
}
Fields:
kind: Always "zip"code: 5-digit US ZIP code (pattern: ^\d{5}$)country: Country code (default: "US")Purpose: Television market boundaries
Data Source: Local National DMA shapefiles
{
"kind": "dma",
"code": "506"
}
Fields:
kind: Always "dma"code: 3-digit DMA code (pattern: ^\d{3}$)Common DMA Codes:
"501": New York"506": Boston-Manchester"803": Los AngelesPurpose: Geographic coordinates with optional circular buffer
Conversion: Point geometry or buffered polygon approximation
{
"kind": "point",
"lat": 37.7585,
"lon": -122.3995,
"radius": 1000
}
Fields:
kind: Always "point"lat: Latitude in degrees (-90 to 90)lon: Longitude in degrees (-180 to 180)radius: Buffer radius in meters (default: 0, minimum: 0)Behavior:
radius = 0: Creates a POINT geometryradius > 0: Creates a buffered polygon approximating a circleBuffer Parameters (advanced):
n_sides: Number of polygon sides for circle approximation (default: 6)inscribed: Whether vertices lie on circle boundary (default: true)Circle Approximation Quality:
| Sides | Deviation from Circle |
|---|---|
| 6 | 13.4% |
| 8 | 7.6% |
| 12 | 3.4% |
| 20 | 1.2% |
Purpose: Direct geometric input using Well-Known Text format
Validation: Must be valid WKT geometry
{
"kind": "wkt",
"wkt": "POLYGON((-122.4194 37.7749, -122.4094 37.7749, -122.4094 37.7849, -122.4194 37.7849, -122.4194 37.7749))"
}
Fields:
kind: Always "wkt"wkt: Valid WKT geometry stringSupported WKT Types:
POINT(lon lat)POLYGON((lon lat, lon lat, ...))MULTIPOLYGON(...)Purpose: Uber H3 hexagonal spatial indices
Conversion: H3 cell boundary to polygon geometry
{
"kind": "h3",
"h3": "87283082bffffff"
}
Fields:
kind: Always "h3"h3: Valid H3 cell index (pattern: ^[0-9a-f]{15,16}$)H3 Properties:
Purpose: US cities and Census Designated Places (CDPs)
Data Source: BigQuery public datasets (bigquery-public-data.geo_us_boundaries.places)
{
"kind": "city",
"name": "Essex",
"state": "MA"
}
Fields:
kind: Always "city"name: City or Census Designated Place name (examples: “Essex”, “San Francisco”)state: Two-letter state code (pattern: ^[A-Z]{2}$, examples: “MA”, “CA”)Purpose: US counties and parishes
Data Source: BigQuery public datasets (bigquery-public-data.geo_us_boundaries.counties)
{
"kind": "county",
"name": "Alameda",
"state": "CA"
}
Fields:
kind: Always "county"name: County or parish name without “County” suffix (examples: “Alameda”, “Essex”)state: Two-letter state code (pattern: ^[A-Z]{2}$, examples: “CA”, “MA”)Using ZIP Code:
curl -X POST "https://api.example.com/places/count" \
-H "Content-Type: application/json" \
-d '{
"geography": {"kind": "zip", "code": "94107"},
"category": "restaurant"
}'
Using Buffered Point:
curl -X POST "https://api.example.com/places/count" \
-H "Content-Type: application/json" \
-d '{
"geography": {"kind": "point", "lat": 37.7585, "lon": -122.3995, "radius": 1000},
"category": "hospital"
}'
Using H3 Index:
curl -X POST "https://api.example.com/places/count" \
-H "Content-Type: application/json" \
-d '{
"geography": {"kind": "h3", "h3": "87283082bffffff"},
"category": "gas_station"
}'
Using City:
curl -X POST "https://api.example.com/census/query" \
-H "Content-Type: application/json" \
-d '{
"geography": {"kind": "city", "name": "Essex", "state": "MA"},
"query": "What is the total population?"
}'
Using County:
curl -X POST "https://api.example.com/census/query" \
-H "Content-Type: application/json" \
-d '{
"geography": {"kind": "county", "name": "Alameda", "state": "CA"},
"query": "median household income"
}'
All geography inputs are validated for:
Invalid inputs return HTTP 422 with descriptive error messages.
Common validation errors:
{
"detail": [
{
"type": "value_error",
"msg": "Invalid H3 index: not_valid_h3",
"input": "not_valid_h3"
}
]
}
{
"detail": "Invalid geometry: ParseException: Expected number but encountered word: 'invalid'"
}