Skip to main content

Tool for exploring columnar data, including multimedia

Project description

datagrid

Open source DataGrid implementation

Installation

git clone git@github.com:comet-ml/datagrid.git
cd datagrid
pip install -e .

Running Server

In the datagrid repo folder, run:

datagrid server

That runs the server on port 4001. That will serve any DataGrid in the current directory by filename.

Testing

In one terminal, run:

datagrid server --frontend no --open no

In a separate terminal, run:

datagrid viewer

to see a list of DataGrid files being served. Assume that "images.datagrid" is listed. Then run:

datagrid viewer images.datagrid

That will show the first 10 rows of images.datagrid.

Other datagrid viewer flags:

optional arguments:
  -h, --help            show this help message and exit
  --port PORT
  --debug
  --width WIDTH
  --offset OFFSET
  --group-by GROUP_BY
  --where-expr WHERE_EXPR
  --limit LIMIT
  --sort-by SORT_BY
  --sort-desc
  --select SELECT [SELECT ...]
  --query-type QUERY_TYPE
  --column-name COLUMN_NAME
  --column-value COLUMN_VALUE
  --column-offset COLUMN_OFFSET
  --column-limit COLUMN_LIMIT
  --asset-id ASSET_ID
  --computed-columns COMPUTED_COLUMNS

Developer Notes:

  1. computed-columns and where-expr can use DataGrid Python query expressions
  2. DataGrid Python query expressions use the format {"Column Name"} to refer to a column, and can use Python expressions, including math ("math.sqrt"), Python functions (like "abs", "min", "max", "round").
  3. DataGrid query expressions can use aggregate functions: AVG, MAX, MIN, SUM, TOTAL, and COUNT.
  4. computed-columns are defined as a dictionary mapping a column's name to a dictionary with "expr", "field", and "type" defined.

Developer Examples:

# Create a virtual column called "Average Score" that is the
# aggregate Average value of the Score column.

data viewer images.datagrid \
    --computed-columns '{"Average Score": \
          {"field": "cc1", \
	   "expr": "AVG({\"Score\"})," \
	   "type": "FLOAT"}}'

# Create a virtual column called "Average Score" that is the
# aggregate Average value of the Score column, and filter
# on those rows where the Score is above average.

data viewer images.datagrid \
    --computed-columns '{"Average Score": \
          {"field": "cc1", \
	   "expr": "AVG({\"Score\"})," \
	   "type": "FLOAT"}}' \
    --where-exp '{"Score"} - {"Average Score"} > 0'

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

kangas-1.0.1.tar.gz (12.8 MB view details)

Uploaded Source

Built Distribution

kangas-1.0.1-py3-none-any.whl (14.7 MB view details)

Uploaded Python 3

File details

Details for the file kangas-1.0.1.tar.gz.

File metadata

  • Download URL: kangas-1.0.1.tar.gz
  • Upload date:
  • Size: 12.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.28.1 setuptools/61.2.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.5

File hashes

Hashes for kangas-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3a0b2d84d1d4f755377b1d5f619a30a6b92b1d148ef0b6fe1555a982d0a55b1c
MD5 69b8bf5321f95ab9bc678ed94d09ccf2
BLAKE2b-256 7f2b8d6db9fb6e99c88af7882c07c30a8d96a086c0d6f819af572efad868f4f3

See more details on using hashes here.

File details

Details for the file kangas-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: kangas-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.28.1 setuptools/61.2.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.5

File hashes

Hashes for kangas-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e4124ce774ef6dd4865b2cdf1bb4a7e18298a8c208a2d92028046aff32238448
MD5 cf5fdf3fca99d474c85068b5bf8f4f4a
BLAKE2b-256 684c27f28527df13dfa42a981cdc6390b6f559837f67af7c15f479a3066ccc93

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page