Welcome to Clean Business Chart
Why Clean Business Chart?
As a data analyst, I'm using Python for more complex analysis. And right there, where I have some findings, I need to do a lot of work to get a good business chart out of matplotlib or seaborn (both are visualisation packages in the Python world).
Next to that, a couple of years ago I was introduced into IBCS (International Business Communication Standards). They have great guidelines on making charts that stand on their own.
I found that there were no IBCS-inspired packages for Python and that's were my intrinsically motivation for business data visualisations and my software engineering knowledge came together.
So, you are looking at the first release of Clean Business Chart. I am planning to add functionality to it, but I don't have a strict time schedule for it. I have other hobbies like my family, music, photography, learning and more. If you are a Python developer and wants to contribute to this package, feel free. This Open Source package has the MIT License, which means you can do almost anything with this package or parts of it. Use it, change it, sell it, integrate it in your own product and so on. More details in the MIT-license information.
Thanks for reading, and now back to business!
Marcel Wuijtenburg
marcelw1323(at)gmail.com
IBCS-inspired, what means that?
IBCS-inspired means that this package follows most of the IBCS-rules (IBCS is Creative Commons (https://www.ibcs.com/terms-of-use/)). In the provided charts you'll see the following:
-
Visualisation of the main bars:
- Solid. These are the actual figures. You have a dark grey (almost black) color for the actuals of the reporting year (AC) and a lighter grey for actuals of a previous year (PY).
- Outlined. These are the planned (PL) or budget figures.
- Hatched. These are the forecast (FC) figures. By the way: "Solid, Outlined, Hatched" is a good book about IBCS. The first example underneath is inspired of the chart on page 193.
-
Colors:
- Green: Only used to express a good variance from a business perspective
- Red: Only used to express a bad variance from a business perspective.
- Blue: Only used to highlight things in the Charts.
Starting with the first Clean Business Chart
To make a Clean Business Chart you need to follow these 4 steps:
- Install the package
- Import the package
- Make the dataset
- Show the business chart
1. Install the package
You need to install the Clean Business Chart package only once. It has a dependency with the matplotlib-package and will be resolved automatically.
pip install clean_business_chart2. Import the package
Everytime you want to use the package, you need to import the package only once per Jupyter-notebook or other file
import clean_business_chart as cbc # cbc is an abbreviation making it easier to make a call to the parts of the package3. Make the dataset
Clean Business Chart supports three ways of making the dataset. The dataset below is the easiest one. And you see that you can fill a title which makes the business chart stand on its own.
# Declare an empty dictionary called 'title_dict' to store title-values
title_dict = dict()
# Fill the title-values
title_dict['Reporting_unit'] = 'Engineering Corporation' # Name of the company or the department
title_dict['Business_measure'] = 'Net sales' # Name of the business measure
title_dict['Unit'] = 'USD' # Unit: USD or EUR (monetary) or # (count)
title_dict['Time'] = '2022' # More specific information about the time selection
# Fill the data to be visualized in this dataset
dataset = {'PY': [14, 16, 14, 17, 19, 17, 19, 22, 16, 17, 16, 22], # Previous Year information for 12 months
'PL': [11, 10, 10, 10, 10, 10, 15, 14, 15, 15, 15, 19], # Plan information for 12 months
'AC': [15, 13, 16, 7, 5, 6, 17, 11], # Actual information for up to 12 months
'FC': [0, 0, 0, 0, 0, 0, 0, 0, 26, 22, 13, 29], # Forecast information to go after the actual months
'Year': 2022} # Year of the main information (Plan/Actual/Forecast)4. Show the business chart
Call the ColumnWithWaterfall with the parameters to show the business chart
chart1 = cbc.ColumnWithWaterfall(data=dataset, # Assign the dataset to the parameter data
preferred_base_scenario='PL', # Which delta chart do you wish to see? PL or PY?
title=title_dict, # Assign the title_dict to the parameter title
force_zero_decimals=True, # Make the business chart more clean with zero decimals
multiplier='m') # Multiplier will be used in the title, but can also
# be used with optimizationsOk, that's it! You made your first business chart with Clean Business Chart. Feel free to change the entries in the title_dict and the values in the dataset.
You can use normal values to visualise, for example '42325873' for a value of approx 42.3 million. If you do this, make the multiplier = "1". You can read more about this in the parameter section below.
Parameter
All possible parameters are described below. Most parameters have default values.