Pharmacy Sales Analysis

Pharmacy Sales Analysis

Pharmacy Sales Analysis

Pharmacy Sales Analysis

Dec 5, 2024

Dec 5, 2024

3 min read

3 min read

Click the link to use the template.

Through the analysis of sales data, we can understand the sales trends of medicines, improve inventory management efficiency, and optimize purchasing strategies.

This case will introduce how to use Bayeslab for data analysis, including data cleaning, visualization, and interpretation steps. We hope that through this case, you can master the key skills of using Bayeslab for data analysis.

Data Processing

First, we use Bayeslab to clean the dataset. For easy comparison, we write the cleaned data into a new data table.

Clear null values

The data without time and social security card number is invalid for this analysis, we will delete it.

prompt:

Delete the null values (including blanks) in the columns of Date and Social Security Number in  Sales data of a pharmacy S , and write the result to  Pharmacy sales data

Clear outliers

From the basic situation of the data, it can be seen that it contains negative outlier values that need to be deleted.

prompt:

Delete rows less than or equal to 0 in the quantity sold column of the  Pharmacy sales data and write the result back to the table.

Modify the date format

prompt:

[Pharmacy sales data] Delete week X from the Date column and write the result back to the table.

Data Analysis

Consumption Trend

First, let's look at the trend of daily spending changes.

prompt:

Charting the change in total daily consumption based on Amount Received.

AI Chart Interpretation

The chart shows the total daily consumption based on the "Amount Received" from January 2018 to July 2018. There is a noticeable fluctuation in the amount received each day, with several prominent peaks throughout the period. January and May seem to have the highest spikes, indicating specific days with significantly higher consumption. There's a general pattern of continuous ups and downs, with no extended periods of stability.

Foot traffic

Next, let's look at whether there is a big difference in sales figures each month.

prompt:
Draw a combination chart showing the monthly changes in customer traffic and the total monthly consumption amount based on Date, Social Security Number, and Amount Received; one Social Security Number represents one customer. Include a secondary y-axis for clearer differentiation between customer traffic and consumption amounts.

AI Chart Interpretation

The chart shows a combination of customer traffic (in bars) and total consumption amount (in a line) over several months in 2018. Notably, both customer traffic and total consumption peak in April. Customer traffic experiences a sharp decline in July, and consumption also drops significantly at this time. Generally, there is some alignment between trends in traffic and consumption, suggesting they might be correlated.

Top ten selling products

prompt:

Based on the Product and sales volume, draw a bar chart of the top ten selling products, with different products shown in different colors.

AI Chart Interpretation

From the sales ranking, it can be seen that medicines related to cardiovascular diseases occupy multiple positions on the list, showing the high demand for drugs in this field.

Bayeslab makes data analysis as easy as note-taking!

Bayeslab makes data analysis as easy
as note-taking!

Start Free

Bayeslab makes data analysis as easy as note-taking!

Bayeslab makes data analysis as easy as note-taking!