Package features:
  • SQL database for storing AIS position reports and vessel metadata

  • Vessel position cleaning and trajectory modeling

  • Utilities for streaming and decoding AIS data in the NMEA binary string format (See Base Station Deployment)

  • Integration with external datasources including depth charts, distances from shore, vessel geometry, etc.

  • Network graph analysis, MMSI deduplication, interpolation, and other processing utilities

  • Data visualization

What is AIS?


Requires Python version 3.8, 3.9, or 3.10. Requires SQLite (included by default in most versions of Python).

python -m venv env_ais && source ./env_ais/*/activate
pip install aisdb

Installing from Source

See Installing from Source

Code examples

  1. Parsing raw format messages into a database

  2. Automatically generate SQL database queries

  3. Compute trajectories from database rows

  4. Vessel trajectory cleaning and MMSI deduplication

  5. Compute network graph of vessel movements between polygons

  6. Integrating data from web sources, such as depth charts, shore distance, etc.

Collecting AIS Data

  1. Decode incoming AIS data and log to SQLite database

from aisdb.receiver import start_receiver

start_receiver(connect_addr='', dbpath='AIS.sqlitedb', stdout=True)