AI-generated data visualization examples with Patterns + Vega-Lite

March 29, 2024

Every company figured out how to gather their important, relevant data in the past decade. Mature data lakes and big data practices are commonplace in most technology-first corporations.

There’s a catch, though. Interpreting and learning from that data is harder than just assembling it. Skilled data science and analytics teams take time to build out. Once that’s done, they spend time on the big problems; smaller questions (like trends from last week's sales data) still need answers.

Every business partner and executive wants to understand the story and insights. Few have the technical ability to parse through and understand the narrative. Line charts and bar graphs tell some of the story, but many insights need more nuance.

Today, we’ll show you an easy way to generate data visualizations using AI. To generate these visuals (and interpret our data), we’ll use Patterns. Patterns is an AI-powered data analytics coworker that understands our data. It will allow us to ask for our visuals in simple, natural language. Its AI can generate more than just simple graphs and lines thanks to GPT-4 and Vega-Lite. This powerful combo makes it a perfect coworker for generating the right visualization.

Our dataset: Crunchbase

For our dataset, we’ll be working with a bot that has access to Crunchbase’s data. Crunchbase is the best repository for startup funding information on the internet. We’ll be able to ask Patterns anything about the fundraising environment - information about companies, founders, investors, and trends.

We’ll generate seven different data visualizations to understand the fundraising environment in three key areas; Miami, Austin, and the Bay Area.

Generating AI data visualizations within Patterns

(skip this part if you don’t care about setup)

It’s easy to generate visualizations with Vega-Lite, but adjusting JSON and loading data over and over can be a pain.

We’ll set up our data examples using Patterns. Once our data is loaded into their platform, we can talk to their AI data scientist and ask it questions about our data. It can give us insights and information, but the real power will be in visualizations.

Connect data

You’ll need to have a database to connect to Patterns. They support a few, but we’ll use MySQL for this demo.

We’ll give a bot R/W access to our database at this step.

Select tables

Give the bot access to the relevant tables. You can select all, but it’s best for performance to just choose the ones you need.

Once that’s set up, we can easily upload CSVs.

Generate charts

That’s it. Patterns’ AI analyst will crawl through the database, learning from its structure.

We’re ready to start talking to the bot, and generating analyses and charts.

Seven AI data visualization examples

  1. Bar and line chart tracking total dollars funded

  2. Scatter plot / bubble plot showing the top 50 exits for each region

  3. 3 donut charts showing the funding round distribution for each region

  4. Line chart tracking the change in number of startups funded

  5. Heatmap with the amount of startups funded from example sectors

  6. Map showing the magnitude of dollars raised in IPO for each region

Track total funding across regions with a bar chart

Sometimes, it helps to keep things simple. Patterns has no problem with my query.

But this is a little busy, right? I originally wanted to compare three regions, not ten cities.

Let’s ask Patterns to group by region instead.

Much better.

Track the top 50 startup exits for each region with a bubble chart

Sometimes, there are more than two variables. I’d like to see the magnitude of startup exit over time compared to the amount raised, but that involves a few factors; time, exit amount, amount raised.

Fortunately, I just have to ask for that.

See where money goes in each region with a donut chart

Which city is better for founders raising a Series A vs a seed?

I didn’t know which visualization would work best for answering this question. After some back and forth, Patterns helped me find a good one. At any time, you can just ask “what’s a good way to show x”?

Show investing trends with a line chart

By now, it’s clear that the Bay area commands most of the investing market for startups. What’s more interesting is how those trends have changed for each region, not just how much.

You can ask Patterns for a visualization, and if you’re not satisfied, it has the context to change it.

In this case, we want to see the percentage change of the number of startups funded, year over year.

A more interesting story than raw numbers.

See where industry funding concentrates with a heatmap

Heatmaps tell us instantly and visually where there’s activity.

Let’s see how many companies got funded in each sector.

Take Away

We’re just scratching the surface of what Patterns allows you to do. If you’re interested in inspiration, head to Vega-Lite’s examples page - there’s literally dozens to choose from, for whatever data visualization you might need.

What if you don’t know the best way to display your data? Patterns can help. Just upload your data and ask their AI, in natural language, to generate a visualization that makes sense. You spend more time presenting, and less time adjusting data and JSON.

If you’re interested in trying out Patterns, you can request access

here.

Analytics in natural language