Python API to access and download the HODOR dataset.
Project description
🐟🐍 HODOR Python API
A Python package for programmatic access, download, and analysis of the HODOR dataset.
About the HODOR Dataset
HODOR (Hydroacoustic and Optical Dataset for Oceanic Research) is a large, open-access dataset of synchronized underwater stereo video and sonar recordings, with detailed animal activity counts. The main HODOR data repository and documentation are available at: https://github.com/TAWilts/HODOR
This package provides a convenient Python interface to access, download, and analyze HODOR data. It is installable via PyPI and designed for easy integration with pandas and scientific workflows.
Features
- Download HODOR activity counts, stereo video, and sonar data by sequence ID
- Filter and analyze metadata and animal activity using pandas DataFrames
- Download only the data you need (safe, repeatable, skips files already present)
- Enum-based filtering for species
- Simple API for targeted or bulk downloads
Installation
This package is available on PyPI.
pip install hodor-python
Quickstart
from hodor_python import HODOR_Dataset, Species
# Set a local folder for data storage
hodor = HODOR_Dataset(dataset_folder="/path/to/hodor_data")
# Access activity counts as a pandas DataFrame
df = hodor.counts
# Filter for sequences with high cod activity
cod_sequences = df[df[Species.FISH_COD] > 0]
# Download video and sonar for a specific sequence
hodor.download_sequence(1)
For more in-depth examples using the API, have a look at:
https://github.com/TAWilts/HODOR/tree/main/meta/hodor_python
CLI Usage
The package installs a hodor-python command that mirrors the core API.
# List sequences (default columns)
hodor-python list --limit 5
# Show details for a specific sequences
hodor-python info 1
# Download video and sonar for specific sequences
hodor-python download 1 2 3
# Download only video or only sonar for a specific sequence
hodor-python download 4 --video
hodor-python download 5 --sonar
# Export counts to a file
hodor-python counts --output counts.csv
All commands accept --dataset-folder to set a custom cache location:
hodor-python --dataset-folder /path/to/hodor_data list --limit 5
API Overview
HODOR_Dataset
HODOR_Dataset(dataset_folder: str)– Main entry point. Manages local cache and access..counts– Returns a pandas DataFrame with sequence metadata and activity counts..download_video(sequence_ids)– Download stereo video for one or more sequence IDs..download_sonar(sequence_ids)– Download sonar data for one or more sequence IDs..download_sequence(sequence_ids)– Download both video and sonar for one or more sequence IDs.
Species Enum
Use for filtering DataFrame columns by species (e.g., Species.FISH_COD).
More Information
- Main HODOR data repository: https://github.com/TAWilts/HODOR
- Data is hosted on PANGAEA, with DOIs for each subset.
License
See LICENSE.
Citation
If you use HODOR in your research, please cite the main dataset as:
@ARTICLE{11121653,
author={Wilts, Thomas and Böer, Gordon and Winkler, Julian and Cisewski, Boris and Schramm, Hauke and Badri-Hoeher, Sabah},
journal={IEEE Data Descriptions},
title={Descriptor: Hydroacoustic and Optical Dataset for Oceanic Research (HODOR)},
year={2025},
volume={2},
number={},
pages={262-270},
keywords={Sonar;Cameras;Optical sensors;Optical imaging;Fish;Optical recording;Acoustics;Synchronization;Sonar measurements;Baltic Sea;camera;sonar;stereo camera},
doi={10.1109/IEEEDATA.2025.3596913}}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hodor_python-1.1.0.tar.gz.
File metadata
- Download URL: hodor_python-1.1.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4999e7e8386481a4cf7e91c66eb0845687b23d39581e9cab6ddffb76b99d82e
|
|
| MD5 |
f559bc74458a84a648ba9282013ede1a
|
|
| BLAKE2b-256 |
3571faab9755a05fd50f35a34d22bb8937a133f3507365058e13879ba2e1a799
|
File details
Details for the file hodor_python-1.1.0-py3-none-any.whl.
File metadata
- Download URL: hodor_python-1.1.0-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1a078b01f4c1762fd04061640167c085a0f1104678fd7057aa92a16e24a22ce
|
|
| MD5 |
5a28a3acdc600e53c104581e1eab033f
|
|
| BLAKE2b-256 |
6480c5dae1c56d3c677c36fe0138131ab8d6f1ae2271e0d320149b10660b1f9b
|