https://pypi.org/project/chart-builder/
red = parameter
This package enables a user to provide a path to csv/xlsx file or pass a dataframe directly and create a high quality chart in minutes.
Bare minimum parameters to pass:
- chart_type - string
- Can be ‘line’, ‘bar’, ‘line and bar’, ‘pie’, ‘ranked bar’
- title - string
- This will be the name the chart is saved under
- file/df
- If pass file, can either pass an entire file path (in this case you need to set is_file_path parameter to True) or simply a csv file name that is located in the data folder.
- If the data is not a timeseries data, further need to set turn_to_time parameter to False.
- If pass df, Visualization Pipeline will skip any data cleaning.
- By default, it will plot all columns in the dataframe/file. If there are only specific columns you want to pass, you need to specify by passing a list of the column names in the cols_to_plot paramter.
cols_to_plot=['test1','test2']
- Alternatively, if you are plotting on two axes, you pass the columns for each axis via the axes_data paramter
axes_data=dict(y1=['test1'],y2=['test2'])
Parameter |
Description |
Default |
df |
Pandas DataFrame containing data for the plot. |
None |
chart_type |
Type of chart to create ('line' , 'bar' , 'line and bar' , 'pie' , 'ranked bar' ). |
None |
title |
Title of the chart. |
None |
bar_col |
Columns for bar plot data. |
None |
line_col |
Columns for line plot data. |
None |
directory |
Directory to save the generated plots. |
'../img' |
colors |
List of colors for plot elements. |
combined_colors |