[Apache Superset] Topic #3, Visualization data from CSV data file

ngtduc693

Duc Nguyen Thanh

Posted on September 29, 2024

[Apache Superset] Topic #3, Visualization data from CSV data file

Hello, it's me again - Duc Nguyen (Duke)

Before starting this tutorial, you should have mastered the previous two tutorials in the Apache Superset tutorial series.

  • Topic #1, What is Apache Superset used for and how to install it on Windows 11 here
  • Topic #2, Superset ARCHITECTURE here

Okay, let's get started with today's topic: How to get data from CSV files and visualization them

First thing, you need to have sample data in CSV format, here I use insurance claim information data here
CSV dataset

Okay, now let's import this CSV file into Superset and then visualize the data through charts.

Click the + button then find and select Upload CSV to database
Upload CSV
and we have many settings here like Delimiter, Decimal Character, If Table Already Exists
Upload options
Next, click the Edit icon button in the DucNguyen dataset and you will see the dialog box shown below
Calculated columns
then click the Add item in the Calculated columns

CASE WHEN CLMSEX = 1 THEN 'Male' ELSE 'Female' END
Enter fullscreen mode Exit fullscreen mode

SQL expression

Next, click the Create chart button in the Chart tab
Create a chart

And here is the result you get a pie chart showing the number of insurance claims by gender, the settings here are very easy to understand, you can refer to my settings in the image below

result result2

Do you have any questions? See you in the next topic!

💖 💪 🙅 🚩
ngtduc693
Duc Nguyen Thanh

Posted on September 29, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related