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.4.0.tar.gz (16.2 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.4.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xr_tui-0.4.0.tar.gz
  • Upload date:
  • Size: 16.2 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.4.0.tar.gz
Algorithm Hash digest
SHA256 bef799f83495e01955ee3bc696d5f15b90303e8295add98d87944434b4404134
MD5 2eb1c4ed2e182f1dc0b3381c6876dd7e
BLAKE2b-256 277da827c69cf5cd3a0d6425d3f612d2f785cf6c6b91ee281fa567666b42a7d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for xr_tui-0.4.0.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.4.0-py3-none-any.whl.

File metadata

  • Download URL: xr_tui-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.0 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9848280b7a5aba6732ec43c9829d93a5108cf52502c32e8698793ad0ed7e5ec
MD5 68d16d0e95fe8ef1d3138ef5e647420a
BLAKE2b-256 57f78d13a17f872506529d732976347b23390eeb98980f95a8d1e8c59675f26d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xr_tui-0.4.0-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