:py:mod:`ecoscope.analysis.ecograph` ==================================== .. py:module:: ecoscope.analysis.ecograph Module Contents --------------- .. py:class:: Ecograph(trajectory, resolution=15, radius=2, cutoff=None, tortuosity_length=3) A class that analyzes movement tracking data using Network Theory. :param trajectory: Trajectory dataframe :type trajectory: ecoscope.base.Trajectory :param resolution: Pixel size, in meters :type resolution: float :param radius: Radius to compute Collective Influence (Default : 2) :type radius: int :param cutoff: Cutoff to compute an approximation of betweenness index if the standard algorithm is too slow. Can be useful for very large graphs (Default : None) :type cutoff: int :param tortuosity_length: The number of steps used to compute the two tortuosity metrics (Default : 3 steps) :type tortuosity_length: int .. py:method:: to_csv(output_path) Saves the features of all nodes in a CSV file :param output_path: Output path for the CSV file :type output_path: str, Pathlike .. py:method:: to_geotiff(feature, output_path, individual='all', interpolation=None, transform=None) Saves a specific node feature as a GeoTIFF :param feature: Feature of interest :type feature: str :param output_path: Output path for the GeoTIFF file :type output_path: str, Pathlike :param individual: The individual for which we want to output the node feature (Default : "all") :type individual: str :param interpolation: Whether to interpolate the feature for each step in the trajectory (Default : None). If provided, has to be one of those four types of interpolation : "mean", "median", "max" or "min" :type interpolation: str or None :param transform: A feature transform method (Default : None) :type transform: sklearn.base.TransformerMixin or None .. py:method:: _get_ecograph(self, trajectory_gdf, individual_name, radius, cutoff, tortuosity_length) :staticmethod: .. py:method:: _update_node(G, node_id, attributes) :staticmethod: .. py:method:: _get_day_night_value(day_night_value) :staticmethod: .. py:method:: _initialize_node(G, node_id, attributes, empty=False) :staticmethod: .. py:method:: _get_dot_product(x, y, z, w) :staticmethod: .. py:method:: _get_tortuosities(self, lines, time_delta) :staticmethod: .. py:method:: _compute_network_metrics(self, G, radius, cutoff) :staticmethod: .. py:method:: _compute_degree(G) :staticmethod: .. py:method:: _compute_collective_influence(self, G, radius) :staticmethod: .. py:method:: _get_collective_influence(G, start, radius) :staticmethod: .. py:method:: _compute_betweenness(G, cutoff) :staticmethod: .. py:method:: _get_feature_mosaic(self, feature, interpolation=None) :staticmethod: .. py:method:: _get_feature_map(self, feature, individual, interpolation) :staticmethod: .. py:method:: _get_regular_feature_map(self, feature, individual) :staticmethod: .. py:method:: _get_interpolated_feature_map(self, feature, individual, interpolation) :staticmethod: .. py:exception:: InterpolationError Bases: :py:obj:`Exception` Common base class for all non-exit exceptions. .. py:exception:: IndividualNameError Bases: :py:obj:`Exception` Common base class for all non-exit exceptions. .. py:exception:: FeatureNameError Bases: :py:obj:`Exception` Common base class for all non-exit exceptions. .. py:function:: get_feature_gdf(input_path) Convert a GeoTIFF feature map into a GeoDataFrame :param input_path: Input path for the GeoTIFF file :type input_path: str, Pathlike