Skip to content

Add visidata or vd command for .tsv (and .tsv.gz etc) and .json files #1

@yarikoptic

Description

@yarikoptic

I have mentioned visidata tool before.

We have description of formats: https://bids-specification.readthedocs.io/en/stable/glossary.html#objects.metadata.Format and there are ways to "style" visidata view of the spreadsheet for types of columns etc which would allow for correct sorting, summaries etc, see e.g.

saulpw/visidata#2872 (comment)

So I think we need a helper/command which would pre-create such styling while opening a file in BIDS which would

  • "collect" all relevant for the .tsv sidecar .json files
  • get columns' formats
  • create such a styling sheet for the .tsv at hands

FWIW, visidata could even be useful to view collections of json files, so we might take it even further and make work for json files as well, in particular adding options like --distinct-only or alike to show only distinct across .json (sidecar) files fields etc (ideally again, first taking inheritance in mind). Similar option could be handy for .tsv files as well. FWIW, we could even make it work across collections of .tsv files, potentially adding a column "path" to point to TSV (or json) where row comes from.

visidata has ability to "follow paths"... I did for visualizing images listed in spreadsheet -- so think about stimuli_file and viewing _events.tsv (hence might be of interest for @neuromechanist ).

Since IP related, might make use of @Lestropie 's https://github.com/Lestropie/IP-freely

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions