Plot time-series data from line-delimited JSON.
Project description
foxplot
Plot time-series data from newline-delimited JSON.
Foxplot stands for "Frequent Observation diXionary plots". Frequent observations arise from the project's initial use case with robot control loops, while dictionaries are a common weakly-typed self-describing format (used e.g. in the GitHub REST API, robot logging, ...).
Installation
pip install foxplot
Usage
Interactive mode
In interactive mode, you can explore the data in data
(tab completion works) and plot it using the foxplot
function:
$ foxplot -i upkie_2023-05-03-103245.mpack
Python 3.8.10 (default, Mar 13 2023, 10:26:41)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: foxplot(
...: [
...: data.observation.servo.left_knee.torque,
...: data.observation.servo.left_wheel.torque,
...: ],
...: right=[
...: data.observation.servo.left_knee.velocity,
...: data.observation.servo.left_wheel.velocity,
...: ],
...: )
New tab opened in your web browser! The command line is to produce it directly is:
foxplot upkie_2023-05-03-103245.mpack -l /observation/servo/left_knee/torque /observation/servo/left_wheel/torque -r /observation/servo/left_knee/velocity /observation/servo/left_wheel/velocity
Plotting from files
- JSON:
foxplot my_data.json -l /observation/cpu_temperature
- MessagePack:
foxplot my_data.mpack -l /observation/cpu_temperature
Design notes
- Foxplot prioritizes ease-of-use (interactive mode) over performance
Tips
- For Zsh users:
zstyle ":completion:*:*:foxplot:*" ignored-patterns "^*.(json|mpack)"
See also
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
foxplot-0.4.0.tar.gz
(78.6 kB
view details)
Built Distribution
foxplot-0.4.0-py3-none-any.whl
(57.3 kB
view details)
File details
Details for the file foxplot-0.4.0.tar.gz
.
File metadata
- Download URL: foxplot-0.4.0.tar.gz
- Upload date:
- Size: 78.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eca15d37d14820f788497b56cdcf4058f562ea4d0560a6cf193661760a05893a |
|
MD5 | 2798f372e54d12952c29930514aa3edd |
|
BLAKE2b-256 | b1581f05d71d6bcf18a084edcc8b8ff7dff486604aada036929f7d3760a3a91f |
File details
Details for the file foxplot-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: foxplot-0.4.0-py3-none-any.whl
- Upload date:
- Size: 57.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4578f394ac5d78b1ddd36d4417bdf19bacbd2b4cb9ba12a62584c59e631d8b74 |
|
MD5 | a67ec8af1b1ed9f125291961dc83bd95 |
|
BLAKE2b-256 | b4638c20996faf6644485e6bbb7f76379c8e326d0f31c7e42a445ab79488a36a |