PerfPlotter
Read data from CSV files using pandas
and generate interactive plots using bokeh
, which can then be embedded into HTML pages and served by server-client applications (or at least allow them to be viewed on a browser).
Contents
Environment
- Python 3.8.x
- macOS 10.15.x
- Firefox 88.x
Setup
- Clone and
cd
into theperfplotter
directory - Install dependencies
$ pipenv install --dev --python=/path/to/python3.8
- Install pre-commit hooks
$ pre-commit install $ pre-commit run --all-files
- Optional:
pre-commit autoupdate
- Optional:
- Activate virtual environment
- In the same directory as setup.py, install *perfplotter as an editable dependency:
$ pip install -e .
- Use bare
pip
here to excludeperfplotter
from the Pipfile* (which is under version control) - Do
pipenv clean
to really make sure it's not included in the Pipfile*
- Use bare
- Start and open any of the jupyter notebooks
$ jupyter notebook --notebook-dir tutorials/notebooks
Usage
Show the main usage/help info
$ perfplotter --help
Show each command's usage/help info
$ perfplotter examples --help
$ perfplotter timeseries --help
$ perfplotter histogram --help
Supported plots
- Plot TimeSeries
$ perfplotter timeseries --help $ perfplotter timeseries /path/to/my.csv -x 1 -y 2
- Plot Histogram
$ perfplotter histogram --help $ perfplotter histogram /path/to/my.csv -x 1 -y 2
examples
to test
Use $ perfplotter examples sample1
Generated
/out/sample1.csv
$ perfplotter timeseries out/sample1.csv
The last command should open up a browser with an interactive plot of sample1.csv
Distribution
- In the same directory as setup.py:
$ python setup.py sdist
- This should create a dist/perfplotter-VERSION.tar.gz file
- In another directory (i.e. a test env) where perfplotter will be used:
$ pipenv install /path/to/perfplotter/dist/perfplotter-VERSION.tar.gz