Spaces:
Sleeping
Sleeping
File size: 4,740 Bytes
27b6a20 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Python: module analysis</title>
</head><body>
<table class="heading">
<tr class="heading-text decor">
<td class="title"> <br><strong class="title">analysis</strong></td>
<td class="extra"><a href=".">index</a><br><a href="file:/Users/samuelveliveli/Downloads/marine-tracker/src/analysis.py">/Users/samuelveliveli/Downloads/marine-tracker/src/analysis.py</a></td></tr></table>
<p><span class="code">Per-individual and per-study movement analysis.<br>
<br>
Distance/speed/activity-pattern metrics work for any study in the common<br>
event schema (see ingest.py). Dive metrics only apply to studies whose raw<br>
data includes a depth/pressure sensor column -- none of this project's three<br>
default studies are depth-instrumented (they're Argos/GPS location-only), so<br>
<a href="#-dive_metrics">dive_metrics</a>() detects that and returns None rather than fabricating numbers.</span></p>
<p>
<table class="section">
<tr class="decor pkg-content-decor heading-text">
<td class="section-title" colspan=3> <br><strong class="bigsection">Modules</strong></td></tr>
<tr><td class="decor pkg-content-decor"><span class="code"> </span></td><td> </td>
<td class="singlecolumn"><table><tr><td class="multicolumn"><a href="numpy.html">numpy</a><br>
</td><td class="multicolumn"><a href="pandas.html">pandas</a><br>
</td><td class="multicolumn"></td><td class="multicolumn"></td></tr></table></td></tr></table><p>
<table class="section">
<tr class="decor functions-decor heading-text">
<td class="section-title" colspan=3> <br><strong class="bigsection">Functions</strong></td></tr>
<tr><td class="decor functions-decor"><span class="code"> </span></td><td> </td>
<td class="singlecolumn"><dl><dt><a name="-activity_pattern"><strong>activity_pattern</strong></a>(individual_df)</dt><dd><span class="code">Fix count by hour-of-day (0-23, UTC as provided by Movebank), a simple activity proxy.<br>
<br>
Not a true diel activity/dive-behavior classification -- just how the<br>
fixes are distributed across the day, which can hint at surfacing<br>
patterns if the tag only reports while at the surface.</span></dd></dl>
<dl><dt><a name="-dive_metrics"><strong>dive_metrics</strong></a>(individual_df)</dt><dd><span class="code">Dive/surface summary if the raw data includes a depth or pressure column, else None.</span></dd></dl>
<dl><dt><a name="-individual_summary"><strong>individual_summary</strong></a>(individual_df)</dt><dd><span class="code">Total distance (km), average speed (km/h), and track span for one individual's fixes.</span></dd></dl>
<dl><dt><a name="-movement_corridor_bins"><strong>movement_corridor_bins</strong></a>(study_df, grid_size_deg=0.5)</dt><dd><span class="code">Aggregate all individuals' fixes into a lat/lon grid for a movement-corridor density overlay.<br>
<br>
Returns a DataFrame of (lat_bin, lon_bin, count), suitable for a heatmap<br>
showing which areas the study's tracked individuals used most, as a<br>
reasonable "movement corridor" proxy without fitting a formal utilization<br>
distribution model.</span></dd></dl>
<dl><dt><a name="-study_summary"><strong>study_summary</strong></a>(study_df)</dt><dd><span class="code">Per-individual summary table for every individual in a study's DataFrame.</span></dd></dl>
</td></tr></table><p>
<table class="section">
<tr class="decor data-decor heading-text">
<td class="section-title" colspan=3> <br><strong class="bigsection">Data</strong></td></tr>
<tr><td class="decor data-decor"><span class="code"> </span></td><td> </td>
<td class="singlecolumn"><strong>DEPTH_COLUMN_CANDIDATES</strong> = ['depth', 'pressure', 'argos:depth', 'eobs:pressure']</td></tr></table>
</body></html> |