get_heatmaps

eyefeatures.features.feature_maps.get_heatmaps(data, x, y, shape, pk=None, zoom_to_data=False)[source]
Get heatmaps from scanpaths (given coordinates are scaled and

sorted in time) using Gaussian KDE.

Parameters:
  • data (DataFrame) – input Dataframe with fixations.

  • x (str) – X coordinate column name.

  • y (str) – Y coordinate column name.

  • shape (tuple[int, int]) – if tuple with single integer, then square matrix is returned, otherwise k must be (height, width) tuple and rectangular matrix is returned.

  • pk (list[str]) – List of columns being primary key.

  • zoom_to_data (bool) – if True, normalize coordinates to fill the entire heatmap. If False, use coordinates as-is (assumes [0,1] range).

Returns:

heatmap matrices.

Return type:

ndarray