Member-only story

How to Easily Create Cool Charts and Graphics with LIDA

Javier Calderon Jr
5 min readAug 19, 2023

Introduction

In today’s data-driven world, the ability to quickly and effectively visualize information is more crucial than ever. Whether you’re a data scientist, a business analyst, or a developer, you’ve likely faced the challenge of turning raw data into meaningful insights. This is where LIDA comes into play. Developed by Microsoft, LIDA is a powerful tool that leverages large language models to automatically generate visualizations and infographics. In this comprehensive guide, we’ll delve into how to use LIDA effectively, covering best practices, code snippets, and the latest programmatic implementations. By the end of this article, you’ll be well-equipped to harness the full potential of LIDA for your data visualization needs.

https://github.com/microsoft/lida

Prerequisites

Before diving in, make sure you have the following:

  1. Python 3.x installed
  2. Git installed
  3. Basic understanding of Python programming and data visualization

Setting Up LIDA

First things first, clone the LIDA repository from GitHub.

git clone https://github.com/microsoft/lida.git

Navigate to the cloned directory and install the required packages.

cd lida
pip install -r requirements.txt

Why Setup is Important

Setting up your environment correctly is the first step towards a smooth experience with LIDA. Incorrect installations or missing dependencies can lead to runtime errors and headaches.

Basic Usage

To generate a simple visualization, you can use the following code snippet.

from lida.visualize import generate_visualization

data = {
"title": "Sales Data",
"data": [100, 200, 150, 300]
}

generate_visualization(data)

Why Basic Usage Matters

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Javier Calderon Jr
Javier Calderon Jr

Written by Javier Calderon Jr

CTO, Tech Entrepreneur, Mad Scientist, that has a passion to Innovate Solutions that specializes in Web3, Artificial Intelligence, and Cyber Security

Write a response

Can you share the code used along with data to generate visual graphs ?

Not sure lidar created the type of charts you are showing though? The data does not indicate it. If so, an example for that would be great.