Skip to main content

A Python package designed to analyze and visualize Automatic Identification System (AIS) data, enabling easy exploration of maritime vessel movements through data extraction, cleaning, and analysis. Utilize powerful libraries like NumPy and Pandas for efficient data manipulation, and leverage the interactive mapping capabilities of Leafmap for insightful visualizations of vessel trajectories and other key maritime information.

Project description

https://img.shields.io/pypi/v/maritimeviz.svg https://img.shields.io/travis/Thaliavch/maritimeviz.svg Documentation Status Dependency Status

A Python package to ingest, analyze and visualize Automatic Identification System (AIS) data for maritime vessels, with built-in support for global views, rich export formats, interactive Leafmap maps, and integration with the Global Fishing Watch API.

⚠️ DISCLAIMER: This is the first public release (v0.1.0) and is still under active development. APIs and behaviors may change in future versions.

Installation

pip install maritimeviz

Quickstart

  1. Build or open a DuckDB-backed AIS database and ingest a raw AIS stream:

    from maritimeviz.ais_db import AISDatabase
    
    db = AISDatabase("my_data.duckdb")
    db.process("raw_ais_stream.nmea")
  2. Query global position reports as GeoJSON:

    geojson = db.get_geojson(report_type="position")
  3. Render on an interactive map:

    from maritimeviz.viz import Map as VesselMap
    
    m1 = VesselMap()
    m1.map_all(geojson, layer_name="Position Reports") \
      .ship_routes(geojson)
    m1.add_layer_control()
    m1.m  # display in Jupyter or Colab
  4. Fetch fishing events from Global Fishing Watch:

    from maritimeviz.gfw_api import GFW_api
    
    client = GFW_api()
    vessels = client.search_vessel(9111254)
    vessel_id = vessels[1]["combinedSourcesInfo"][0]["vesselId"]
    df_events = client.get_fishing_events(
        vessel_id,
        start_date="2023-01-01",
        end_date="2023-06-30",
        limit=20
    )
    df_events.head()

Core Features

  • AIS Database Management

    • Ingest raw AIS streams (NMEA, CSV, etc.) sequentially.

    • Materialize global “position” and “static” views

    • Flexible filtering by MMSI, date range, or spatial polygon, and more.

    • Export to GeoJSON, CSV, Shapefile, KML, Excel, or WKT

  • Interactive Mapping

    • Leafmap/Folium wrapper for points, routes, heatmaps, and base stations

    • Polygon‐based and MMSI filtering

  • Global Fishing Watch API

    • Vessel identity lookup (MMSI/IMO → vesselId)

    • Fetch fishing events, effort statistics, vessel insights

    • Built-in mapping helpers

  • Extensible Architecture

    • Pluggable “message processor” classes for Class A, Class B, long‐range, ASM, etc.

    • Utilities for cache clearing, and data cleaning.

    • Roadmap: buoy/water data ingestion, anomaly detection, ML pipelines

Credits

  • Global Fishing Watch for vessel & event data (https://globalfishingwatch.org)

  • libais for AIS message decoding and parsing (https://github.com/schwehr/libais)

  • Mentorship and guidance by Kurt Schewher

  • Built on top of: DuckDB, Pandas, GeoPandas, Leafmap, Folium, Shapely, Cachetools, Requests

  • Project template courtesy of audreyr/cookiecutter-pypackage

License

Released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maritimeviz-0.1.0.tar.gz (5.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maritimeviz-0.1.0-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

Details for the file maritimeviz-0.1.0.tar.gz.

File metadata

  • Download URL: maritimeviz-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for maritimeviz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6200ac5024ca30f8d673deaa49661418cea88f73bb92ec9a4ff79c827c619b06
MD5 084a9d2f29adada947f08aacacdbc488
BLAKE2b-256 d8cdd9041b4199de771ecb9c1a6163304057b468b6d3cb348f4fe17a2b0202aa

See more details on using hashes here.

File details

Details for the file maritimeviz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: maritimeviz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for maritimeviz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07cfe8c512231fa2296579b4cc2dd7a98bad14b2e1fb01ac1fa33874adb92192
MD5 bf19ca7bcf843b0098520a5beefe6175
BLAKE2b-256 03788c7e38fce5bc1bfaae2b4972296843d4047edb4deb4811142e9c221f35fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page