Skip to main content

A Textual User Interface (TUI) for exploring xarray Datasets.

Project description

xr-tui

CI GitHub stars GitHubIssues GitTutorial Ruff linting: pylint PyPI - Status

xr-tui is an interactive terminal user interface (TUI) for exploring and visualizing multi-dimensional datasets. It uses xarray to support loading NetCDF, Zarr and HDF5 tree structures, and provides a user-friendly interface for data exploration directly in the terminal.

Features

  • Interactive navigation through NetCDF, Zarr, and HDF5 datasets.
  • Visualization of 1D and 2D data using plotext for terminal-based plotting.
  • Support for slicing multi-dimensional data.
  • Easy-to-use command-line interface.
  • Displays dataset statistics and metadata.
  • Handles HDF5 files not formatted as xarray datasets.
  • Interactive table view of raw data values.
  • Export dataset structure as JSON without launching the TUI.

Domain Specific Formats

xr-tui additionally supports domain specific formats such as the HDF5 NeXus format along with any custom xarray backends that supports datatrees. The list of actively supported xarray backends is as follows:

  • sdf-xarray - Used for loading the Particle-in-Cell code EPOCH's output files.

Installation

You can install xr-tui via pip:

pipx install xr-tui

Or as a uv tool:

uv tool install xr-tui

Usage

To start xr-tui, simply run the following command in your terminal:

xr <filename>

This will launch the TUI, allowing you to explore the contents of filename.

You can also specify a particular group within a file to load:

xr <filename> --group summary

xr-tui also works with remote datasets accessible via HTTP:

xr http://example.com/data.zarr

You can export the dataset structure as JSON without launching the TUI:

xr <filename> --export-json            # print to stdout
xr <filename> --export-json out.json   # write to file

Key Command Reference

Key Action
q Quit the application.
h Show help menu.
e Expand all nodes in the dataset tree.
space Collapse all nodes in the dataset tree.
Arrow keys Navigate through the dataset.
Enter Select an item or open a variable
s Show statistics of the selected variable.
p Plot the selected variable.
t Show the selected variable as a scrollable data table.

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

xr_tui-0.3.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

xr_tui-0.3.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file xr_tui-0.3.1.tar.gz.

File metadata

  • Download URL: xr_tui-0.3.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xr_tui-0.3.1.tar.gz
Algorithm Hash digest
SHA256 41c2a72c584697b67060b0877ca766ed9fdcbb53eabf95608f861d944e00d31b
MD5 cbbde44774efdc0271f17cf420867aab
BLAKE2b-256 48edc595270b71ec4b21ac532f2a0e960c96fde71b069a9e790dd5b381e5f508

See more details on using hashes here.

Provenance

The following attestation bundles were made for xr_tui-0.3.1.tar.gz:

Publisher: publish.yml on samueljackson92/xr-tui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xr_tui-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: xr_tui-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xr_tui-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d4d3965903de92fa9730e41bf85e60d3d3e7111bfe9aced3ccaca0e0b615948
MD5 bfa0be46ec07749bf04b64ad5dce4c02
BLAKE2b-256 5d2dc31292dc925f7130f8043ca142d9134a0fb4bfe196da2f6b0aadab9ca714

See more details on using hashes here.

Provenance

The following attestation bundles were made for xr_tui-0.3.1-py3-none-any.whl:

Publisher: publish.yml on samueljackson92/xr-tui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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