out_table.TableRenderer.chart

tools.out_table.TableRenderer.chart(
    geo,
    time,
    quantity,
    *,
    chart_length=20,
    ordering='location',
    result_format='dataframe',
)

Renders a table showing a rough time series bar chart for the given selections using ASCII characters.

It is of course limited by the fact that this is a relatively coarse display method. The y-axis of each chart is on its own scale, and thus is not comparable to others. However the x-axis is on a shared scale, so this can give you an idea of the time-series behavior of your simulation and relative timing between the selected quantities and locations.

Parameters

geo: GeoSelection | GeoAggregation

the geographic selection to make on the output data

time: TimeSelection | TimeAggregation

the time selection to make on the output data

quantity: QuantitySelection | QuantityAggregation

the quantity selection to make on the output data

chart_length: int = 20

approximately how many characters should we use to render the charts? This is simply a ballpark, similar to automatically selecting the number of bins in a histogram, so you may get more or less than you ask for. Multiple days may be compressed into one bin, but one day will never be split between bins. The last bin may contain less days of data than the rest of the bins.

ordering: (location, quantity) = “location”

controls the ordering of rows in the result; both location and quantity are used to sort the resulting rows, this just decides which gets priority

result_format: (dataframe, string, print) = “dataframe”

controls the type of the result of this method; “dataframe” returns a Pandas DataFrame, “string” returns the stringified table, and “print” just prints the stringified table directly and returns None

Returns

DataFrame | str | None

according to the value of the result_format parameter