Plot
The Plot class is designed to make it easy to visualise your data when working in python. We've placed a special emphasis on integrating well with pandas
Novem is currently in closed alpha. This documentation is incomplete and subject to change.
Overview
Plot
The plot module exposes a novem plot class that maps to the /v1/vis/plots/
api
end-point.
The class takes one positional parameter, the plot name, and several optional named parameters. All the named parameters in the constructor are also available as properties.
"""
Below we show the various ways you can set the options on your novem plot
"""
from novem import Plot
# everything in the constructor
barchart = Plot(<name>, \
type='bar', \
title='barchart tiitle', \
caption = 'caption'
)
# property approach
barchart = Plot('plot_name')
barchart.type = 'bar'
barchart.title = 'barchart title'
barchart.caption = 'caption'
Table
The Table
class is a subclass of Plot
for dealing with table visualisations.
We’ve taken this approach because table visualisations contains quite a few
idiosyncratic properties such as selectors.
from novem import Table
import pandas as pd
# read the nei_sample_data
df = pd.read_csv("nei_hier_perf.csv")
# the sample data contains a `lvl` column that we'll use
# to indicate color lvls. Let's construct our hierarchy rows.
hcol = df['level'].copy()