This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.
If your flight alerts were directly linked to airports in the Ontology, this would be a straightforward matter of filtering airports by the selected state and then searching around for linked flight alerts. The fact that your flight alerts are only transitively linked to airports via the [Example Data] Flight
object type complicates the path we need to take to create the needed variables.
In practice, an alternative to the compounding steps below would be to confer with your team and decide whether an Ontology change that places your flight alerts directly in touch with airports might be in order.
You’ll need to create four variables:
[o] Airports in Selected State
— we need a way to know which states have been selected, and the output filter of your choropleth map can be used to narrow in on the airports in the selected state.[s][a] Selected States
— we can create a string array (hence "s") of unique Airport State Codes
from the object set variable above. If we then select New York and California on the choropleth, the string array variable will be set to [NY, CA]
.[o] Flight Alerts in State
— Since the [Example Data] Flight
object type has the state codes (and your flight alerts don't), we'll start with your flight alerts, Search Around to their flights, and then filter by the array above.If this is a common operation we want to perform, we can see why an Ontology change would be preferable! Due to the relative complexity, we’ve provided the image below showing how the configurations fit together. In this example, the state of Florida (FL
) has been selected on the choropleth. Use the image to supplement the instructions in the next two tasks as you work.
[o] Airports in Selected State
object set definition variable with [o] Filtered Airports for Map
as the starting object set and [f] Map State Selection
as the filter variable.[s][a] Selected State
and use [o] Airports in Selected State
as the starting object set. Set Unique values as aggregation method and Airport State Code
as the property.[o] Flight Alerts in Selected State
object set definition variable with [o] Filtered Flight Alerts (COP)
as the starting object set. Then get linked objects [Example Data] Flight
and then filter on the Origin State Abbreviation
property.Origin State Abbreviation
property, click the (x) ▾ arrow below the property value field to reveal the string variables that can be used. Choose [s][a] Selected State
.[n] Flight Alerts in Selected States
, then configure it to perform a count of [o] Flight Alerts in Selected State
.