Find The: Distance From 
distance_from
Statistics of the distance from the location of the current event to the location of multiple past events matching the criteria.
For example:
- Average and maximum distance from this device to previous account logins.

Configuration
- Feature Name: The "dictionary" name under which the feature value will be stored and referenced by in rules.
- Coordinate Attribute: The attribute holding the location. It must have the Coordinate data type; anything else is rejected at build time.
- In Units:
kilometersormiles. Required. - For Events:
- With The Same: Provides a way of filtering past events based on the attribute values. There must be at least one Identifier and only Identifier and Subject attributes can be used.
- Into Features: Distance From can calculate multiple statistics from a single configuration and output them to the Feature Names given. Fill in the Feature Name for each statistic required and leave the rest blank. Every statistic you want needs its own Feature Name.
Optional Configuration
- Default Value: A value that can be assigned to the feature if the attributes to calculate the features are not present.
- Scope: Can be used to extend the event search from the local node, to all nodes within the same organization all the way to all across customers (global).
- For Events:
- All event types: Default, no filter
- Same as current: Filter by event_type of event being processed
- Specific event type: List out the
event_typeto restrict to, as a list. Example: only consideraccount_login_success.
- Condition: A Query-Language filter that can be used to refine Features for specific use cases.
- Time Window: Can be used to limit the Feature calculation to a specific time period/window. e.g 1 week. Default is
all; no time window - Starting: Can be used to remove recent events from Feature calculation. Default is
immediately; no lag.
Use Case 1
Calculate the average and maximum distance between the location of this event and past logins over a 1 month period.
Implementing In The Feature Editor




- name: webrtc_login_dist_1mth
default_value: 0
time_window:
months: 1
starting: immediately
find_the:
distance_from:
events:
event_type:
- account_login_success
include_current_event: false
with_the_same:
- identity['ACCOUNT'].customer_token.customer_token
coordinate: profiling.tcp_connection['WEBRTC'].ipdb.coordinate
in_units: miles
into_features:
maximum: max_webrtc_login_dist_1mth
average: avg_webrtc_login_dist_1mth
with_scope: same_node_instance