Skip to main content

Trajectory analysis ( TrajAn )

Build (python) Docs PyPI version Anaconda-Server Badge

TrajAn is a Python package for working with trajectory datasets that follow the CF-conventions for trajectories. Trajectory datasets contain position time series from e.g. drifting buoys or output from Lagrangian models.

Barents Sea drifter trajectories coloured by speed

Installation

conda / mamba (recommended):

mamba install -c conda-forge trajan

pip:

pip install trajan

Quick start

TrajAn exposes a .traj accessor on xarray Datasets:

import xarray as xr
import trajan as ta

# Open a CF-trajectory dataset (e.g. from drifting buoys)
ds = xr.open_dataset('barents.nc')

# Basic map plot — geographic projection is chosen automatically
ds.traj.plot()

# Calculate drifter speed, drop unreliable fixes, and plot coloured by speed
ds = ds.traj.drop_where(ds.traj.time_to_next() < np.timedelta64(5, "m"))
speed = ds.traj.speed()
ds.traj.plot(color=speed)

# Interpolate to a regular 1-hour time grid
dh = ds.traj.gridtime("1h")

# Animate the trajectories
ds.traj.animate().show()

For more examples and the full API reference see the documentation.

Download files

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

Source Distribution

trajan-0.12.0.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

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

trajan-0.12.0-py3-none-any.whl (65.6 kB view details)

Uploaded Python 3

File details

Details for the file trajan-0.12.0.tar.gz.

File metadata

  • Download URL: trajan-0.12.0.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for trajan-0.12.0.tar.gz
Algorithm Hash digest
SHA256 a08905e7d405a62a0da6e23d745464b1412d654ed80550de9f8eb7821eb58ce6
MD5 da53b6715f0c8ff13599e5b7f7547a84
BLAKE2b-256 5fdd71db6e250d6b8c70ba3dcf00ff1dbdd76037941f29f5e88bb6cba1825319

See more details on using hashes here.

File details

Details for the file trajan-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: trajan-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 65.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for trajan-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c3b3e2a2bd6d4f85fd920be1f884a64d7c941e5db7181b3e5b2315b53546c4e
MD5 6ad689d2ee40423dc6d69e82d8cbceb8
BLAKE2b-256 7503f85eb25c32b55228e7c612525b090773a5cafd5080d74b99c00a520d5fd7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.12.1

2 files

This release

0.12.0 This release

2 files

0.11.0

2 files

0.10.4

2 files

0.8.0

2 files

0.7.0

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page