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.0.tar.gz (15.3 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.0-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xr_tui-0.3.0.tar.gz
  • Upload date:
  • Size: 15.3 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.0.tar.gz
Algorithm Hash digest
SHA256 1cdb8a5a7b4088e04fc5f859c086c9279ea6913755e2e486b278b37ff5462318
MD5 c37d329aa92f7581851a8d575bae8390
BLAKE2b-256 397daabfc94d286ce447a1381d1ab228a7d1238a22a1965c45de27824deb6b8c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: xr_tui-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 15.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70df07a1193b948ef24ff6c585f358fd3979a7edfbe3598d3be8d06342d422a9
MD5 06afeb4105c326594cf3b6a7d804014c
BLAKE2b-256 8304f1c92b151557fe0b5e8ec1bade2c5c5e5b55220c6d429ebfe992dc69c264

See more details on using hashes here.

Provenance

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