Skip to content

featurebyte.haversine

haversine(
lat_series_1: Series,
lon_series_1: Series,
lat_series_2: Series,
lon_series_2: Series
) -> Series

Description

Construct a Series that contains the haversince distances between two points.

Parameters

  • lat_series_1: Series
    Series representing the latitude of the first point

  • lon_series_1: Series
    Series representing the longitude of the first point

  • lat_series_2: Series
    Series representing the latitude of the second point

  • lon_series_2: Series
    Series representing the longitude of the second point

Returns

  • Series

Examples

>>> event_view = catalog.get_view("EVENT_VIEW")
>>> event_view["HAVERSINE_DIST"] = fb.haversine(
...     event_view["LAT_1"], event_view["LON_2"], event_view["LAT_2"], event_view["LON_2"]
... )