Metadata-Version: 2.4
Name: aistk
Version: 1.0.0
Summary: AIS Toolkit for high-resolution spatio-temporal datasets
Author: Irmina Durlik
License: 
        MIT License
        
        Copyright (c) 2025 Irmina Durlik
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/irmina-d/AIStk
Project-URL: Documentation, https://irmina-d.github.io/AIStk/
Project-URL: Repository, https://github.com/irmina-d/AIStk
Project-URL: Issues, https://github.com/irmina-d/AIStk/issues
Keywords: ais,maritime,tracking,polars,spatio-temporal
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: polars>=1.5.0
Requires-Dist: numpy
Requires-Dist: pyarrow
Provides-Extra: viz
Requires-Dist: folium; extra == "viz"
Provides-Extra: cli
Requires-Dist: typer; extra == "cli"
Dynamic: license-file

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
![Python Version](https://img.shields.io/badge/python-3.9%2B-blue)
[![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://irmina-d.github.io/AIStk/)
![Visitors](https://komarev.com/ghpvc/?username=irmina-d&color=green&style=plastic)

# AIStk — AIS Toolkit for Spatio‑Temporal Datasets

Minimal, fast toolkit for building high‑resolution AIS datasets from decoded CSV files.

## Features
- Lazy loading of 365+ daily CSVs (Polars)
- Column selection, date & MMSI filtering
- Track metrics (distance, straight‑line, tortuosity, turn index, speed stats)
- Event detection (sharp turns, stops, AIS gaps, draft changes)
- Map plotting (Folium) and Parquet export

## Install
```bash
pip install aistk
```

## Quickstart
```python
from aistk import AISDataset

ds = (AISDataset("data/ais/2024", pattern="AIS_2024_*.csv")
      .with_columns(["MMSI","BaseDateTime","LAT","LON","SOG","COG","Draft"])
      .between("2024-01-01","2024-12-31")
      .filter(mmsi=338075892))

df = ds.collect()
stats = ds.stats()                # Polars DataFrame with metrics per MMSI
events = ds.detect_events()       # Detected events
ds.plot_map("track.html")         # Save interactive map to HTML
```

## CLI
```bash
aistk scan --root ./AIS/2024 --pattern "AIS_2024_*.csv"                --from 2024-01-01 --to 2024-12-31                --mmsi 338075892                --cols MMSI,BaseDateTime,LAT,LON,SOG,COG,Draft                --to-parquet out/ais.parquet --html out/track.html
```

## Project layout
```
aistk/
  aistk/ (library)
  tests/
  examples/
```

## License
MIT © 2025 by Irmina Durlik
