DEV Community

Cover image for A Quick Guide to AI-Powered Data Visualization: Create a Smart Dashboard with LogicLoop.
Busayo Samuel
Busayo Samuel

Posted on

A Quick Guide to AI-Powered Data Visualization: Create a Smart Dashboard with LogicLoop.

INTRODUCTION

LogicLoop is a cloud-based platform that lets you connect to your data source, supercharge your data to perform automations, and design dashboard layouts with just a few clicks. LogicLoop is essentially a no-code tool, as it doesn't require any technical skills or prior experience. However, users need to possess the ability to ask the right questions in order to obtain their desired results.

AI tools and platforms such as LogicLoop enable data analysts to improve productivity and provide data-driven solutions to stakeholders. LogicLoop helps to simplify the process of analyzing, troubleshooting, and creating visually appealing dashboards. Rather than spending hours on focused work, data analysts can leverage the power of these tools to speed up their tasks.

In this article, you will learn how to build a simple sales dashboard using LogicLoop's sales sample dataset. By the end of this article, you will be able to create impressive projects in just a few minutes. Are you curious and excited? So am I! Let's dive in.

SETTING UP AN ACCOUNT

  • Navigate to the set up page and follow the instructions on the page to create an admin user account.

Image description

  • To activate your account, follow the verification link sent to your email. Then you can sign in. Image description
  • Enter your company name when prompted, and provide all the required details to access the dashboard page as show in the image below.

Image description

CONNECTING TO A DATA SOURCE

Image description

With LogicLoop, users have the ability to connect to more than 40 different data sources. Detailed information regarding the process of connecting to each data source can be found on the documentation page. However, for the purpose of this tutorial, the sales sample dataset will be used, and thus, there will be no need to connect to any external data source. To get started, please follow the steps below:

  • Click on the Rules tab located on the sidebar. You will be redirected to the rules page. The rules feature allows you to create SQL code to extract data from your datasets. Once written, these rules are saved and can be utilized repeatedly.

Image description

  • Click New Rule Query on the right side of the page. You’ll go to the rules page, which shows the following sections:
    • The left sidebar lists the tables in the Sample Postgres DBdataset.
    • The main section has a text editor where you can enter your SQL queries.

Image description
This rules feature lets you create SQL code to extract data from your datasets. You can save these rules and use them repeatedly.

  • Click the AI query helper menu and select the query generator option. This opens the form for generating queries.

Image description
In the text field, type this prompt:

Write a query that selects the top 10 companies with the highest total transaction amount, then selects the product quantity and the total number of orders for each company.
From the dropdown field, choose these tables: Customers, product_orders, and transactions.

Image description

  • Click on the Generate button to submit your prompt. If all goes well, your output should look like the image below.

Image description

  • Copy the output code, paste it in the text editor, and click on the View results button to show your results. If the result obtained is satisfactory
  • Click on the Save Results button to persist your data.
  • Then, click on the Add Visualization tab beside the results table to create a new visualization for your data.

Image description

  • Change the visualization name to Amount spent per company. Choose company_name for the X-column and Total amount for the Y-column.

Image description

  • To make more room for the long label names that are angled diagonally, choose the horizontal bar option. This arranges the bars horizontally.

Image description

  • Navigate to the X-axis tab and deselect the sort values option to arrange the chart in ascending order. To change the color of your chart, follow these steps:
    • Go to the colors tab.
    • Click the icon beside the automatic text.
    • In the HEX code field, type #E1CFEC.
    • Save your visualization.

Image description

Voila! You’ve made and customized your first chart on LogicLoop. Next, you’ll create a dashboard and add your chart to it.

CREATING A DASHBOARD

In this section, you will use LogicLoop Platform's drag-and-drop interface to create a dashboard layout with different components, such as charts, tables, and other widgets. LogicLoop offers a wide range of visualization options, such as bar charts, line charts, pie charts, maps, and more. You can also add text boxes and images to enhance your dashboard. To get started:

  • Click on the Dashboards tab on the left sidebar. You will be redirected to the dashboard page.
  • Click the New Dashboard button at the top of the page and enter the name of your dashboard.

  • Click on the Add Textbox button, a modal will appear.

  • Enter the title of your dashboard. After saving your text, a card will appear on your dashboard.

  • Drag and drop the card to your desired location.

  • Next, click on the Add Widget button, another modal will appear.

  • Select the name of your rule and choose the Chart option. Your chart should appear on the dashboard as shown in the image below.

Image description

  • Add another widget, this time, select the table option and align it next to the bar chart.
  • Navigate to the rules page to create a new rule for a time series area chart.
  • To get the top 10 order quantities by date, type this SQL query in the editor and save your code:
SELECT
  CAST(EXTRACT(YEAR FROM transactions.created_at) AS VARCHAR) || '-' || CAST(EXTRACT(MONTH FROM transactions.created_at) AS VARCHAR) AS Month_Year,
  SUM(transactions.amount_us_dollars) as total_transactions,
  SUM(product_orders.quantity) as order_quantities,
  COUNT(product_orders.order_id) AS total_number_of_orders
FROM
  customers
  LEFT JOIN transactions ON customers.customer_id = transactions.merchant_id
  LEFT JOIN product_orders ON customers.customer_id = product_orders.customer_id
GROUP BY
  Month_Year
ORDER BY total_number_of_orders DESC
LIMIT 100

Enter fullscreen mode Exit fullscreen mode
  • To create an area chart, follow these steps:
    • Click Add Visualization.
    • Choose Area as the chart type.
    • For the X-column, choose month_year.
    • For the Y-column, choose total_number_of_orders. Your chart might look strange, as shown in the image below:

Image description

  • To correct this, go to the X-axis tab and change the scale from Auto-detect to Datetime.

  • To match the dashboard theme, change the chart color to #E1CFEC. Your chart should look like the image below.

Image description

  • After you save the chart, click the three vertical dots next to Edit visualization.

Image description

  • Select the Add to dashboard option to add your new chart to the dashboard.
  • Navigate to the dashboard page and you should see the new chart.
  • To adjust your chart size, drag the bottom right corner of the chart. You can make it bigger or smaller as you like.

Image description
Congratulations! You have successfully created your first AI assisted dashboard on LogicLoop.

CONCLUSION

You have just witnessed the power and simplicity of the LogicLoop platform, a tool that lets you harness the potential of your data with AI assistance. No coding skills are required to create stunning and insightful applications that can boost your productivity and creativity. With the LogicLoop platform, you can explore the infinite possibilities of what you can achieve with data and AI. I hope you continue to explore the use cases for LogicLoop and go on to build amazing things.

Top comments (0)