# Documentation

## Documentation

- [Introduction](https://aisviz.gitbook.io/documentation/introduction.md): A little bit about where we stand.
- [Quick Start](https://aisviz.gitbook.io/documentation/default-start/quick-start.md): A hands-on quick start guide for using AISdb.
- [SQL Database](https://aisviz.gitbook.io/documentation/default-start/sql-database.md): How AISdb organizes decoded AIS messages across SQLite and PostgreSQL/TimescaleDB tables, and how to query them directly with SQL.
- [AIS Hardware](https://aisviz.gitbook.io/documentation/default-start/ais-hardware.md): How to deploy your own Automatic Identification System (AIS) receiver.
- [Database Loading](https://aisviz.gitbook.io/documentation/tutorials/database-loading.md): Load AIS data into a SQLite or PostgreSQL database with AISdb, from installation through a full-year Spire ingestion example.
- [Data Querying](https://aisviz.gitbook.io/documentation/tutorials/data-querying.md): Query AIS data loaded with AISdb using DBQuery and TrackGen, with practical examples for time range, bounding box, and MMSI filters.
- [Data Cleaning](https://aisviz.gitbook.io/documentation/tutorials/data-cleaning.md): Denoise AIS tracks with AISdb, removing duplicate-identifier jumps, anchored vessels, and land-locked positions before analysis.
- [Data Visualization](https://aisviz.gitbook.io/documentation/tutorials/data-visualization.md): Visualize AISdb vessel tracks with the built-in web interface or with Contextily, Basemap, Cartopy, Plotly, and Kepler.gl.
- [Track Interpolation](https://aisviz.gitbook.io/documentation/tutorials/track-interpolation.md): Generate estimated vessel positions between AIS reports using linear, geodesic, cubic spline, and custom interpolation methods.
- [Haversine Distance](https://aisviz.gitbook.io/documentation/tutorials/haversine-distance.md): Compute great-circle distance between AIS positions with the haversine formula, including 3D distance to a submerged reference point.
- [Vessel Speed](https://aisviz.gitbook.io/documentation/tutorials/vessel-speed.md): Calculate vessel speed over ground in knots between consecutive AIS positions, and use it to flag implausible track jumps.
- [Coast, shore, and ports](https://aisviz.gitbook.io/documentation/tutorials/coast-shore-and-ports.md): Extracting distance features from and to points-of-interest using raster files.
- [Using Your AIS Data](https://aisviz.gitbook.io/documentation/tutorials/using-your-ais-data.md): Download open-source AIS data or import your own files into AISdb, from a raw CSV through database loading, querying, cleaning, and processing.
- [Vessel Metadata](https://aisviz.gitbook.io/documentation/tutorials/vessel-metadata.md): Attach vessel particulars, name, IMO, ship type, flag, and tonnage, to decoded tracks from a local metadata database or an official API.
- [AIS Data to CSV](https://aisviz.gitbook.io/documentation/tutorials/ais-data-to-csv.md): Export decoded AIS tracks from a SQLite or PostgreSQL AISdb database to CSV, using the built-in write\_csv() writer or a custom column selection.
- [Decimation with AISdb](https://aisviz.gitbook.io/documentation/tutorials/decimation-with-aisdb.md): Reduce AIS track density with AISdb's Visvalingam-Whyatt line simplification, through TrackGen's decimate argument or direct calls.
- [Bathymetric Data](https://aisviz.gitbook.io/documentation/tutorials/bathymetric-data.md): Merge GEBCO global bathymetric grids onto AIS tracks with AISdb, then color and visualize vessel movement by the depth of water it traveled through.
- [Weather Data](https://aisviz.gitbook.io/documentation/tutorials/weather-data.md): Merge ERA5 reanalysis weather variables onto AIS vessel tracks with AISdb's WeatherDataStore, reading GRIB files from disk or fetching them from the Copernicus Climate Data Store.
- [Automatic Identification System](https://aisviz.gitbook.io/documentation/tutorials/automatic-identification-system.md): An overview of the Automatic Identification System (AIS), the ITU-R M.1371 message set, transponder classes, MMSI structure, and the limitations of AIS as a maritime surveillance data source.
- [Hexagon Discretization](https://aisviz.gitbook.io/documentation/tutorials/hexagon-discretization.md): In this page, we will see how we can use AISdb to discretize AIS tracks to hexagons.
- [Clustering with Scikit Learn](https://aisviz.gitbook.io/documentation/machine-learning/clustering-with-scikit-learn.md): Find shipping lanes, anchorages, and vessel behavior groups in one day of NOAA AIS data by running DBSCAN and KMeans over AISdb tracks.
- [Kalman Filters with FilterPy](https://aisviz.gitbook.io/documentation/machine-learning/kalman-filters-with-filterpy.md): Turn a jittery AIS track into a smooth path and a running velocity estimate with a constant-velocity Kalman filter in FilterPy, then flag GPS outliers with the filter's innovation.
- [seq2seq in PyTorch](https://aisviz.gitbook.io/documentation/machine-learning/seq2seq-in-pytorch.md): Build an attention-based encoder-decoder LSTM in PyTorch that forecasts a vessel's next positions from its recent AIS track, using AISdb to query, clean, and reshape the trajectories for training.
- [AutoEncoders in Keras](https://aisviz.gitbook.io/documentation/machine-learning/autoencoders-in-keras.md): A GRU autoencoder in Keras that compresses four hours of vessel track and decodes an eight-hour forecast, trained with probabilistic teacher forcing.
- [Embedding with traj2vec](https://aisviz.gitbook.io/documentation/machine-learning/embedding-with-traj2vec.md): Discretize AIS trajectories onto an H3 grid and train a t2vec-style encoder-decoder in PyTorch that embeds vessel tracks as fixed-length vectors.
- [Using Newtonian PINNs](https://aisviz.gitbook.io/documentation/machine-learning/using-newtonian-pinns.md): A physics-informed Seq2Seq model that penalizes unrealistic velocity and acceleration in predicted vessel tracks, so forecasts stay kinematically plausible even when AIS data is sparse or noisy.
- [TGNs with TorchGeometric](https://aisviz.gitbook.io/documentation/machine-learning/tgns-with-torchgeometric.md): Turn one day of NOAA AIS data into a temporal transit graph with AISdb and train a Temporal Graph Network on it with PyTorch Geometric.
- [Building a RAG Chatbot](https://aisviz.gitbook.io/documentation/machine-learning/building-a-rag-chatbot.md): Build a documentation chatbot with Retrieval-Augmented Generation. Scrape the AISViz docs, index them in ChromaDB, and ground Gemini answers in real pages that every response cites.
- [A No-Code Interface](https://aisviz.gitbook.io/documentation/machine-learning/a-no-code-interface.md): Preprocess, discretize, and enrich AIS tracks through a point-and-click Gradio app, with built-in plotting and a Gemini assistant, no Python script required.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on a page URL with the `ask` query parameter:
```
GET https://aisviz.gitbook.io/documentation/introduction.md?ask=<question>
```
The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
