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.
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 namestate_abbreviation- Parent state codefips_code- County FIPS code
National Parks
name- Park nameunit_code- Park identifier codeunit_type- Type of unit (e.g., "National Park")
Countries
name- Country nameiso_a2- Two-letter ISO codeiso_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):
Property Operators
Properties support various comparison operators for flexible filtering:
eq- Equals (exact match)ne- Not equalsgt- Greater than (numeric values)gte- Greater than or equal tolt- Less thanlte- Less than or equal toin- Matches any value in a listcontains- String contains substring
Numeric Comparison Example
Find countries with population greater than 100 million:
Using the "in" Operator
Find multiple states by name:
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.