holoviz / holoviz/datashader

Data formats for triangle meshes

Open
#526 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.6k
Forks
376
Avg merge
4h 32m
Merged PRs (30d)
1

Description

https://github.com/bokeh/datashader/pull/525 adds rendering for triangle meshes, as long as data is provided in a specific format. Other formats worth discussing include:

## Row per triangle (current):
```
val x0 y0 x1 y1 x2 y2
```

**Pros**: Simple, efficient to iterate over, easy to stream triangles as needed, easy to associate value with each triangle
**Cons**: Only allows one value per triangle, hard to interpolate (have to find values for neighboring triangles)

## Row per node:
```
nodeid x y val1 val2
```

**Pros**: Allows arbitrary values to be associated with each node, including new values as needed (as new columns should be cheap to add in Pandas for a fixed set of rows); easy to index into large numbers of nodes
**Cons**: Requires separate mesh structure (e.g. ``triangleid nodeid1 nodeid2 nodeid3``); requires conventions about column names to be able to index across time

## Row per observation
```
time node1val node2val node3val node4val ...
```

**Pros**: Fits with streaming dataframe approaches, for visualizing long time series generated incrementally
**Cons**: that's a *lot* of columns; probably not efficient for time or space in Pandas. Requires separate mesh structure (e.g. ``triangleid nodeid1 nodeid2 nodeid3``). Requires separate node location structure (e.g. ``nodeid x y``).

## xarray n-D array
```
Cube of nodeid, valname, time
```

**Pros**: Seems like a natural way to index
**Cons**: Not sure how to add data to a cube like that, which is needed for incrementally processing data from a simulator as it arrives over time?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.