ecoscope.analysis.ecograph ========================== .. py:module:: ecoscope.analysis.ecograph Module Contents --------------- .. py:data:: InterpolationOption .. 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.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:attribute:: graphs :type: dict[str, networkx.Graph] .. py:attribute:: trajectory .. py:attribute:: resolution .. py:attribute:: utm_crs .. py:attribute:: features :value: ['dot_product', 'speed', 'step_length', 'sin_time', 'cos_time', 'weight', 'degree',... .. py:attribute:: xmin .. py:attribute:: ymin .. py:attribute:: xmax .. py:attribute:: ymax .. py:attribute:: transform .. py:attribute:: inverse_transform .. py:attribute:: n_rows .. py:attribute:: n_cols .. 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(gdf, radius, cutoff, tortuosity_length) .. 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(lines, time_delta) .. py:method:: _compute_network_metrics(G, radius, cutoff) .. py:method:: _compute_degree(G) :staticmethod: .. py:method:: _compute_collective_influence(G, radius) .. py:method:: _get_collective_influence(G, start, radius) :staticmethod: .. py:method:: _compute_betweenness(G, cutoff) :staticmethod: .. py:method:: _get_feature_mosaic(feature, interpolation = None) .. py:method:: _get_feature_map(feature, individual, interpolation = None) .. py:method:: _get_regular_feature_map(feature, individual) .. py:method:: _get_interpolated_feature_map(feature, individual, interpolation) .. 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