ecoscope.analysis
#
Subpackages#
Submodules#
Package Contents#
- class ecoscope.analysis.Ecograph(trajectory, resolution=15, radius=2, cutoff=None, tortuosity_length=3)[source]#
A class that analyzes movement tracking data using Network Theory.
- Parameters
trajectory (ecoscope.base.Trajectory) – Trajectory dataframe
resolution (float) – Pixel size, in meters
radius (int) – Radius to compute Collective Influence (Default : 2)
cutoff (int) – Cutoff to compute an approximation of betweenness index if the standard algorithm is too slow. Can be useful for very large graphs (Default : None)
tortuosity_length (int) – The number of steps used to compute the two tortuosity metrics (Default : 3 steps)
- to_csv(output_path)[source]#
Saves the features of all nodes in a CSV file
- Parameters
output_path (str, Pathlike) – Output path for the CSV file
- to_geotiff(feature, output_path, individual='all', interpolation=None, transform=None)[source]#
Saves a specific node feature as a GeoTIFF
- Parameters
feature (str) – Feature of interest
output_path (str, Pathlike) – Output path for the GeoTIFF file
individual (str) – The individual for which we want to output the node feature (Default : “all”)
interpolation (str or None) – 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”
transform (sklearn.base.TransformerMixin or None) – A feature transform method (Default : None)
- ecoscope.analysis.get_feature_gdf(input_path)[source]#
Convert a GeoTIFF feature map into a GeoDataFrame
- Parameters
input_path (str, Pathlike) – Input path for the GeoTIFF file
- ecoscope.analysis.get_percentile_area(percentile_levels, raster_path, subject_id='')[source]#
- Parameters
percentile_levels (Typing.List[Int]) – list of k-th percentile scores.
raster_path (str or os.PathLike) – file path to where the raster is stored.
subject_id (str) – unique identifier for the subject
- Return type
GeoDataFrame
- class ecoscope.analysis.SpeedDataFrame(data=None, *args, **kwargs)[source]#
Bases:
ecoscope.base.EcoDataFrame
EcoDataFrame extends geopandas.GeoDataFrame to provide customizations and allow for simpler extension.
- classmethod from_trajectory(trajectory, classification_method='equal_interval', num_classes=6, bins=None, speed_colors=None)[source]#
- Parameters
trajectory (ecoscope.base.Trajectory) –
classification_method (str) –
num_classes (int) –
bins (List) –
speed_colors (List) –