Properties

Properties are key-value pairs that store descriptive information about geographic sets. They provide a way to attach metadata and filter sets based on specific attributes.

What are Properties?

A property is a key-value pair attached to a set that describes characteristics of that geographic area. Properties can include names, codes, numeric values like population, or any other relevant metadata.

json
"uuid": "80a25c7e-f0de-4be0-be9d-6826ac63c792"
"name": "Zion National Park"
"unit_code": "ZION"
"unit_type": "National Park"
"gnis_feature_id": "1455157"

Common Properties

Different types of geographic sets have different properties. Here are some examples of properties you'll find in pre-loaded sets:

U.S. States

  • name - Full state name (e.g., "California")
  • abbreviation - Two-letter code (e.g., "CA")
  • fips_code - Federal Information Processing Standard code

U.S. Counties

  • name - County name
  • state_abbreviation - Parent state code
  • fips_code - County FIPS code

National Parks

  • name - Park name
  • unit_code - Park identifier code
  • unit_type - Type of unit (e.g., "National Park")

Countries

  • name - Country name
  • iso_a2 - Two-letter ISO code
  • iso_a3 - Three-letter ISO code

Querying by Properties

Use the properties filter to find sets based on their property values. The most common operator is eq (equals):

json

Property Operators

Properties support various comparison operators for flexible filtering:

  • eq - Equals (exact match)
  • ne - Not equals
  • gt - Greater than (numeric values)
  • gte - Greater than or equal to
  • lt - Less than
  • lte - Less than or equal to
  • in - Matches any value in a list
  • contains - String contains substring

Numeric Comparison Example

Find countries with population greater than 100 million:

json

Using the "in" Operator

Find multiple states by name:

json

Properties vs Relationships

Important: Properties should not be used to store information about how one geographic area relates to another. For example, don't add a country property to a state set to indicate which country it belongs to. Instead, use relationships, which are a first-class concept in Deliberate API designed specifically for modeling geographic associations.

Custom Properties

When creating your own geographic sets, you can define any properties that are relevant to your application. Properties can be strings, numbers, booleans, or nested objects, giving you flexibility to model your domain-specific data.