Expect values in a column to be tuples of degree-decimal (latitude, longitude) within a specified range of a given degree-decimal (latitude, longitude) point.
expect_column_values_to_be_lat_lon_coordinates_in_range_of_given_point
This expectation level is EXPERIMENTAL
Contributors:
Tags:
Metrics:
Description
Expect values in a column to be tuples of degree-decimal (latitude, longitude) within a specified range of a given degree-decimal (latitude, longitude) point.
expect_column_values_to_be_lat_lon_coordinates_in_range_of_given_point is a Column Map Expectation.
Args:
- column (str): The column name.
Keyword Args:
- center_point (tuple(float, float) or list(float, float)): The point from which to measure to the column points. Must be a tuple or list of exactly two (2) floats.
- unit (str or None): The unit of distance with which to measure. Must be one of: [miles, kilometers]. Default: kilometers
range (int or float): The range in [miles, kilometers] from your specified center_point to measure.
projection (str or None): The method by which to calculate distance between points. Must be one of: [fcc, pythagorean]. Default: pythagorean
Other Parameters:
- result_format (str or None): Which output mode to use: BOOLEAN_ONLY, BASIC, COMPLETE, or SUMMARY. For more detail, see result_format.
- include_config (boolean): If True, then include the expectation config as part of the result object.
- catch_exceptions (boolean or None): If True, then catch exceptions and include them as part of the result object. For more detail, see catch_exceptions.
- meta (dict or None): A JSON-serializable dictionary (nesting allowed) that will be included in the output without modification. For more detail, see meta.
Returns:
Exact fields vary depending on the values passed to result_format, include_config, catch_exceptions, and meta.
Notes:
-
- fcc projection: Calculates the distance in kilometers between two lat/lon points on an ellipsoidal earth projected to a plane. Prescribed by the FCC for distances up to and not exceeding 475km/295mi.
-
- pythagorean projection: Calculates the distance in kilometers between two lat/lon points on a spherical earth projected to a plane. Very fast but error increases rapidly as distances increase.
Want to make your own Expectation or an improvement to this one?
We've put together some great how to guides (including videos) on how to create your own expectations in a flash!
You can see those resources here: Contributor Resources