Data Visualization Examples: Create Stunning Floating Bar Charts Easily

Data Visualization Examples: Create Stunning Floating Bar Charts Easily

Data Visualization Examples: Create Stunning Floating Bar Charts Easily

Data Visualization Examples: Create Stunning Floating Bar Charts Easily

Feb 7, 2025

Feb 7, 2025

6 min read

6 min read

Welcome to the AI and Statistics series! Let's dive into how AI can transform tabular data into various types of charts.

Today, we will be converting a 2D data table into a columnar format and generating multiple types of Floating Bar Charts to compare visualizations with grouping variables on the X-axis and Y-axis.

Don't worry about using the AI Agent-driven Bayeslab, all you need is natural language to get the data analysis result.

All content will be explained in the most comprehensible natural language descriptions to help you get started with data analysis from scratch.

We’ll start with a data table featuring California weather data from 2024-01-01 to 2025-01-31. This table includes monthly maximum, minimum, and mean temperature values.

The floating bar charts will illustrate temperature variations with group variables depicted both on the X-axis and Y-axis for comparison.

We’ll delve into how these prompts influence the final charts and uncover techniques for effective data visualization.

In just 2 minutes, you'll learn to transform complex datasets into insightful visualizations. Let's start it right now.

Using different prompt inputs, we'll demonstrate how AI generates multiple floating bar chart results; our steps will include:

· Step 1 - Table Structure Processing

· Step 2 - Beginner Chart on Y-axis (1)

· Step 3 - Beginner Chart on Y-axis (2)

· Step 4 - Beginner Chart on Y-axis (3)

· Step 5 - Advanced Chart on X-axis

· Step 6 - Advanced Chart on Y-axis

Step 1 - Table Structure Processing

Read the temperature data file and convert it into a columnar format. This involves creating columns for each month from January to December and rows representing lower,, and upper temperature values.

Prompt:

Read California 2024-01-01 to 2025-01-31.csv  create a new table in the columnar format.

Columns: The column headers are the months from Jan to Dec.

Rows: The column header for rows is empty, and the titles for the rows are Lower, Mean, and Upper.

This table should present the maximum, minimum, and mean values for each month.

Save the resulting table locally with the name "Temperature". Ensure that all numeric data is saved with 3 decimal places.

Additionally, "columnar format" means that the columns have grouping variables, while the rows do not have grouping variables but have titles (the column header for the row titles is empty).

Step 2 - Beginner Chart on Y-axis (1)

Generate a floating bar chart where the Y-axis represents the months. The bars will display temperature ranges (lower to upper) with a vertical line indicating the mean value in the middle.

Prompt:

Read Temperature.csv  which contains temperature data for each month from January to December. Each month's data includes maximum, minimum, and mean values.

Table structure description:

The table has a column title and columns with grouping.

The table has row titles but no grouping, representing the maximum, minimum, and mean values indicated by the column groups.

Step 1: Iterate through all the column names. If a column header is empty but the rows below have data, name the column as "F". If there are multiple columns with data but no headers, name them sequentially as F1, F2, F3, and so on.

Step 2: Generate a chart with the following requirements:1. The Y-axis represents the months (as granular units, from January to December).2. The X-axis represents temperature.3. Create a floating bar for each month, with bars arranged horizontally on the Y-axis.4. Each bar Range from Lower to Upper has a vertical line (Mean) in the middle, splitting the bar into two segments, each with a different color.5. The position of the vertical line within each bar represents the mean value.7. Adjust the X-axis to include negative values and ensure the bars are displayed in the central area of the chart.8. The legend represents the column titles.

Create the chart following these requirements to visually display the minimum, mean, and maximum temperatures for each month.

Step 3 - Beginner Chart on Y-axis (2)

This step is similar to Step 2 but will include renaming columns correctly if multiple columns have data but no headers.

Prompt:

Read Temperature.csvTemperature.csv which contains temperature data for each month from January to December. Each month's data includes maximum, minimum, and mean values. Table structure description :The table has a column title, and columns are grouped.

There are row titles, but no grouping. They represent the Lower ,Mean, Upper values of the column groups.

Step 1: Iterate through all column names. If a column header is empty but the rows below have data, rename the column as "F". If there are multiple columns with data but no headers, name them sequentially as F1, F2, F3, etc.

Step 2: Generate a chart with the following requirements:

1. The Y-axis represents the months (as granular units, from January to December).

2. The X-axis represents temperature.

3. Create a floating bar for each month, with bars arranged horizontally on the Y-axis.

4. Each bar depicted with two different color bad . which dived by a vertical line (Mean) in the middle, the Mean splitting the bar into two parts, each with a different color.

5. The position of the vertical line within each bar indicates the mean value.

6. Adjust the X-axis to include negative values and ensure bars are displayed in the central area of the chart.

7. The legend represents the column titles.

Create the chart following these requirements to visually display the minimum, mean, and maximum temperatures for each month.

Step 4 - Beginner Chart on Y-axis (3)

Enhance the previous chart by adding different colors for each month to improve visual differentiation.

Prompt: [Additional part in finetuning button]

(…same with Step3 , but add one sentence additionally) Randomly select 10 different colors and use a different color for each month. Ensure the colors have clear differentiation. Do not need legend description

Step 5 - Advanced Chart on X-axis

Generate an advanced floating bar chart with the X-axis representing temperature and the Y-axis representing months. Ensure the position of the mean value is visually prominent.

Prompt: [Additional part in finetuning button]

(…same with Step4 , but add one sentence additionally) Each bar has a vertical line in the middle, dividing the bar into two parts (each using a different color). The position of the vertical line represents the Mean value of each group.

Step 6 - Advanced Chart on Y-axis

Switch the advanced chart to display bars on the Y-axis, making the visualization more intuitive for some types of analysis.

Prompt: [Additional part in finetuning button]

(…same with Step5 , but add one sentence additionally) Generate bar in Y axis

Thank you for reading this installment of the AI and Statistics series!

We demonstrated how to convert a 2D data table into five different types of floating bar charts, using fine-tuning Button to progressively enhance and advance the charts from basic to sophisticated visualizations.

Stay tuned for our upcoming demonstrations to explore more fascinating data visualization.

Using AI Agent and Bayeslab, anyone can organize, analyze, plot data charts, and make business data predictions like a professional data analyst based on previous data.

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!