pygeoda.distance_weights

pygeoda.distance_weights(geoda_obj, dist_thres, **kwargs)[source]

Distance-based Spatial Weights Create a distance-based weights

Parameters
  • geoda_obj (geoda) – An instance of geoda class.

  • dist_thres (float) – A positive numeric value of distance threshold used to find neighbors. For example, one can use the pygeoda.min_distthreshold() to get a distance that guarantees that every observation has at least 1 neighbor.

  • power (float, optional) – The power (or exponent) of a number indicates how many times to use the number in a multiplication.

  • is_inverse (bool, optional) – A bool flag indicates whether or not to apply inverse on distance value. Defaults to False.

  • is_arc (bool, optional) – A bool flag indicates if compute arc distance or Euclidean distance. Defaults to False (Euclidean distance)

  • is_mile (bool, optional) – A bool flag indicates if the distance unit is mile or km. Defaults to True (mile).

Returns

An instance of Weight class

Return type

Weight