API Reference¶
Visualization¶
sdm.simple_bbox¶
sdm.simple_bbox(bbox, projection='PlateCarree')
¶
Plot a bounding box on a global map using Cartopy.
This function displays a world map with coastlines and borders, and overlays a red bounding box. Optionally, it can render the Earth as a globe using Orthographic projection centered on the bounding box.
Parameters¶
bbox : list or tuple of float Bounding box in [min_lon, min_lat, max_lon, max_lat] format.
str, optional
Map projection to use. Options include: - 'PlateCarree' (default) - 'Robinson' - 'Mollweide' - 'Mercator' - 'EqualEarth' - 'InterruptedGoodeHomolosine' - 'globe' (for Orthographic projection centered on the bbox)
Returns¶
None Displays the plot using matplotlib.
Example¶
plot_global_bbox([-25, 10, -10, 30], projection='globe')
Source code in src/sdm/viz.py
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
Data Access¶
sdm.load_trawl_data¶
sdm.load_trawl_data()
¶
Load example trawl abundance data from NE trawl survey.
This dataset contains species abundance observations collected from tows along with metadata like date, location, depth, and swept area.
Returns¶
pd.DataFrame
A DataFrame with columns:
- TOWDATETIME_EST
(str): Tow start datetime in EST
- LAT
, LON
(float): Latitude and longitude of the tow
- MEAN_DEPTH
(float): Mean depth in meters
- SWEPT_AREA_km
(float): Swept area in square kilometers
- One column per species (e.g., acadian redfish
, alewife
, ..., yellowtail flounder
)
with counts or presence/absence data.
Example¶
df = load_trawl_data() df[['LAT', 'LON', 'acadian redfish']].head()
Source code in src/sdm/access_data.py
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 |
|