Visualization
Visualization
VISUALIZATION
BY
Mbogo Alex
Business Questions:
I will use visualization effects which are dashboards, heat maps, fever charts and dial gauges to answer
the following question:
Selected Dataset:
Sample Sales Data is the name of the dataset that includes different types of information about orders,
sales, customers, shipping, and more. Its primary aim was to facilitate segmentation, customer
analytics, clustering, and retail analytics. Initially, Pentaho Data Integration (DI) Kettle, a popular data
integration and ETL (Extract, Transform, Load) tool, was used to process the dataset. María Carina
Roldán recognized the potential for Sales Simulation training and modified it accordingly, however, as
the creator.
Pandas – Allows us to provide DataFrame data structures used to handle and manipulate a dataset.
Matplotlib – A visualization library for creating chrarts.
Seaborn – Python library for creating visually appealing statistical graphics.
Dashboard:
1. Business question: To analyze and visualize the overall sales trends over time.
2. Visualization process: The data is grouped by the ‘ORDERDATE’ column and the sum of
sales for each date is calculated. The resulting data is plotted using the matplotlib library.
3. Results: The result is a line chart that depicts the sales trend over time. Stakeholders can
observe the upward or downward trends, identify peak periods and also they can assess the
overall sales trajectory.
Heat Maps:
Question: How does the average quantity ordered vary across different product lines and months?
• I first created a pivot table, the pivot table calculates the average quantity ordered
(`QUANTITYORDERED`) by (`PRODUCTLINE`) and (`MONTH_ID`).
• The resulting pivot table, `heatmap_data` is the data source for the heatmap.
• The heatmap is created by passing the following parameters:
◦ z=heatmap_data.values
◦ x=heatmap_data.columns
◦ y=heatmap_data.index
◦ colorscale=‘Viridis’
Answer to the business question: The average of the quatity ordered varies across different product
lines and months as shown in the heatmap. Darker colors indicate higher average quantities ordered and
lighter colors indicate lower average quantities ordered.
Dial Gauge:
1. The business question being addressed: To visualize the average sales value using a dial
gauge.
2. ETL tool description and application: I used Python’s ‘plotly.graph_objects’ to do the
visualization.
3. Visualization process: The ‘go.Figure’ and ‘go.Indicator’ classes from ‘plotly.graph_objects’
were first initialized. Then the gauge was constructed:
4. Results: The average sales value indicated by the dial gauge was 3.55K.