Skip to content

Commit

Permalink
update doc page
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Oct 22, 2024
1 parent 39df0a0 commit b414d20
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions docs/content/reference/dataframes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,54 @@ For an in-depth introduction to the dataframe API and the possible workflows it
### Using the dataframe API

The following snippet demonstrates how to query the first 10 rows in a Rerun recording:
The following snippet demonstrates how to query the first 10 rows in a Rerun recording using latest-at (i.e. time-aligned) semantics:

snippet: reference/dataframe_query

Check out the API reference to learn more about all the ways that data can be searched and filtered:
* [🐍 Python API reference](https://ref.rerun.io/docs/python/stable/common/dataframe/)
* [🐍 Python example](https://github.com/rerun-io/rerun/blob/c00a9f649fd4463f91620e8e2eac11355b245ac5/examples/python/dataframe_query/dataframe_query.py)
* [🦀 Rust API reference](https://docs.rs/crate/rerun/latest)
* [🦀 Rust example](https://github.com/rerun-io/rerun/blob/c00a9f649fd4463f91620e8e2eac11355b245ac5/examples/rust/dataframe_query/src/main.rs)
* [Example](https://github.com/rerun-io/rerun/blob/c00a9f649fd4463f91620e8e2eac11355b245ac5/examples/python/dataframe_query/dataframe_query.py)
* [🦀 Rust API reference](https://docs.rs/rerun/latest/rerun/dataframe/index.html)
* [Example](https://github.com/rerun-io/rerun/blob/c00a9f649fd4463f91620e8e2eac11355b245ac5/examples/rust/dataframe_query/src/main.rs)


### Using the blueprint API to configure a dataframe view

TODO(cmc): incoming.
The following snippet demonstrates how to query the first 10 rows in a Rerun recording using latest-at (i.e. time-aligned) semantics, and display them in a [dataframe view](types/views/dataframe_view):

snippet: reference/dataframe_view_query

<picture>
<img src="https://static.rerun.io/dataframe_query_example/d3dc908edb09377fbdc4c8f16b1b35a7a35a5e7d/full.png" alt="">
<source media="(max-width: 480px)" srcset="https://static.rerun.io/dataframe_query_example/d3dc908edb09377fbdc4c8f16b1b35a7a35a5e7d/480w.png">
<source media="(max-width: 768px)" srcset="https://static.rerun.io/dataframe_query_example/d3dc908edb09377fbdc4c8f16b1b35a7a35a5e7d/768w.png">
<source media="(max-width: 1024px)" srcset="https://static.rerun.io/dataframe_query_example/d3dc908edb09377fbdc4c8f16b1b35a7a35a5e7d/1024w.png">
<source media="(max-width: 1200px)" srcset="https://static.rerun.io/dataframe_query_example/d3dc908edb09377fbdc4c8f16b1b35a7a35a5e7d/1200w.png">
</picture>

#### Aside: re-using blueprint files from other SDKs

While the blueprint APIs are currently only available in Python, blueprints can be saved and re-logged as needed from any language our SDKs support.

First, save the blueprint to a file (`.rbl` by convention) using either the viewer (`Menu > Save blueprint`) or the python API:

snippet: reference/dataframe_save_blueprint

Then log that blueprint file in addition to the data itself:

snippet: reference/dataframe_view_query_external

Check out the blueprint API reference to learn more about all the ways that data can be searched and filtered:
* [🐍 Python blueprint API reference](https://ref.rerun.io/docs/python/latest/common/blueprint_apis/)
* [🐍 Python `log_file_from_path`](https://ref.rerun.io/docs/python/latest/common/logging_functions/#rerun.log_file_from_path)
* [🦀 Rust `log_file_from_path`](https://docs.rs/rerun/latest/rerun/struct.RecordingStream.html#method.log_file_from_path)
* [🌊 C++ `log_file_from_path`](https://ref.rerun.io/docs/cpp/stable/classrerun_1_1RecordingStream.html#a20798d7ea74cce5c8174e5cacd0a2c47)


### Setting up dataframe view manually in the UI

TODO(cmc): incoming.
The same [dataframe view](types/views/dataframe_view) shown above can be configured purely from the UI:

<video width="100%" autoplay loop muted controls>
<source src="https://static.rerun.io/dataframe/df-dna-demo.webm" type="video/webm" />
</video>

0 comments on commit b414d20

Please sign in to comment.