H3CellClusters

Trait H3CellClusters 

Source
pub trait H3CellClusters {
    // Required methods
    fn h3_cell_clusters(&self) -> Result<DataFrame, Error>;
    fn h3_cell_clusters_eq_value(
        &self,
        values: &Series,
    ) -> Result<DataFrame, Error>;
}

Required Methods§

Source

fn h3_cell_clusters(&self) -> Result<DataFrame, Error>

find clusters of neighboring cells

Returns a new dataframe with two columns:

  • cluster_num: artificial id (u32) for the cluster.
  • cells: list of cells in the cluster
Source

fn h3_cell_clusters_eq_value(&self, values: &Series) -> Result<DataFrame, Error>

find clusters of neighboring cells where the same value is associated with the cells.

The self and values should have the same length. Any excess in either of them will be ignored.

Cells are assumed to be unique, otherwise the behaviour is undefined.

Returns a new dataframe with three columns:

  • cluster_num: artificial id (u32) for the cluster.
  • cells: list of cells in the cluster
  • The value of the series given as the values parameter using the name of that series.

Implementors§