> For the complete documentation index, see [llms.txt](https://aisviz.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aisviz.gitbook.io/documentation/tutorials.md).

# Tutorials

- [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.


---

# 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 that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://aisviz.gitbook.io/documentation/tutorials.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
