AI Chart Generation will Change BI Forever
I don’t need to convince you that data analysis is critical to making good decisions. However, I will argue that how we create data visualizations is unnecessarily tedious, and using generative AI will allow us to create better results in less time.
What’s the Problem with My Current Tools?
Currently, if I want to understand how many users visited my website by day, I have a few choices:
- Write a short Python script to ingest the data
- Write a SQL query, download the results into Excel, and make a chart
- Hope that a dashboard exists somewhere / make a dashboard
All of these are fairly easy to do. But let’s make it slightly more complicated.
What if I wanted to understand how many users logged in by day, grouped by the number of transactions they had in the 30 days prior to login?
- In Excel, this is exceedingly complicated.
- First, I prepare the count of transactions for every customer on every date in the analysis, since the set of which 30 days are prior increments every single day.
- Then I join that back up
- Finally, I configure a Pivot Table
- And then configure a Chart on top of that
- In many product analytics tools or dashboarding tools, I am unable to trivially do this. Instead, assuming the functionality exists, I need to know how to use window functions to create new fields that I use to breakout.
- It’s less futzing in Python, but you have to know Python and it’s still not trivial.
# Define function to calculate transactions in prior 30 days
return ((df['date'] >= login_date - pd.DateOffset(days=30)) & (df['date'] < login_date)).sum()
# Apply function to data
df['transactions_in_prior_30_days'] = df[df['event'] == 'login']['date'].apply(calculate_transactions_in_prior_30_days)
# Group by date and transactions_in_prior_30_days, count 'login' events
grouped = df[df['event'] == 'login'].groupby(['date', 'transactions_in_prior_30_days']).size().reset_index(name='login_count')
# Create a pivot table for visualization
pivot_table = grouped.pivot(index='date', columns='transactions_in_prior_30_days', values='login_count').fillna(0)
# Plot using Matplotlib
plt.imshow(pivot_table.values, cmap='YlGnBu', aspect='auto', origin='upper')
plt.title('Number of Logins by Day and Transactions in Prior 30 Days')
plt.xlabel('Transactions in Prior 30 Days')
plt.colorbar(label='Number of Logins')
In today’s tools, there’s no free lunch. Instead of requiring coding, business intelligence tools pack the infinite flexibility of code into a near-infinite number of buttons, options, and toggles. This alleviates the need to code narrowly, but does not actually simplify building helpful outputs. Instead, it necessitates an entirely different grammar and syntax, this time with pointing and clicking instead of code.
This also translates into over-reliance on dashboards. If it takes a long time to make a few visuals, it is natural to prioritize durable visuals that will be repeatedly viewed and used. But at the same time, it means that data consumers might give up on questions like “logins by transactions in last 30 days” because it’s simply a bit too complicated to justify creating.
So What Does Generative AI Give Us?
Natural Language Interaction
Traditional Tools: Current BI tools require users to manually configure settings and filters to get specific insights, which can be less user-friendly and may require technical expertise. Generating a simple bar chart might be easy in Tableau, but complex plots require training and documentation reading.
AI Charting: Generative AI lets us translate normal language descriptions of the outputs we would like to see. In just one sentence, we can build exactly the output we would like, and so we can essentially achieve all our goals simply by writing what used to be the specs document for a dashboard.
Rapid Prototyping and Experimentation
Traditional Tools: Dashboarding tools are oriented around building towards deployable, reusable objects rather than a quick, agile exploration of the data. Especially when building over large datasets, it can take a long time to compute each chart or each change to a chart. BI tools are not a replacement for data science workflows, which often require false starts and iteratively building out workflows.
AI Charting: Users can quickly prototype different chart designs and styles by describing their requirements to the AI, which can then generate corresponding visualizations without a lot of effort. Edits to existing charts are also made using requests to the AI language model. Therefore, the maximum pain of exploration is only ever typing out one’s own thoughts.
Contextual Chart Recommendations
Traditional Tools: Existing tools may offer limited chart recommendations based on preset rules, but they might not adapt well to specific data characteristics. For instance, Excel has the “Recommended Charts” option, but that largely is just determined by coarse rules about how many columns and what type of data you have.
AI Charting: From the context of data samples, combined with user preferences, AI tools can help provide recommendations. At other times, AI can respond to requests for suggestions on the most appropriate chart types. AI can also assist in altering any existing charts much faster. For example if you want to switch out the columns referenced or the chart type.
Traditional Tools: Complex data relationships may require manual preprocessing or scripting to generate meaningful charts, which can be challenging for non-technical users and require documentation reading even for experts.
AI Charting: By translating English requests into code before surfacing them, generative AI results can easily bake complex pre-processing steps (like the 30-days transactions breakout) into the visualization pipeline.
In comparison to traditional BI tools, AI-powered charting offers more intuitive and user-friendly experiences through natural language interaction, allowing users to swiftly prototype and experiment with different chart designs without technical barriers. Contextual chart recommendations, driven by data context and user preferences, provide more tailored insights compared to rule-based suggestions in traditional tools. Moreover, AI charting streamlines data preprocessing by seamlessly integrating complex operations into the visualization pipeline, eliminating the need for manual scripting and enhancing accessibility for both novice and expert users.
BONUS: AI Charts in Einblick
Prompt is built for the data domain--as if ChatGPT was built for making barplots, histograms, and scatterplots.
Once in Einblick, you can save variables, define functions, create visualizations, and build models all in the same canvas. The 2-D space allows you to drag-and-drop and compare visualizations side-by-side very easily, as well as iterate on different versions of code snippets quickly. Share any results with collaborators and teammates.
Einblick is an AI-native data science platform that provides data teams with an agile workflow to swiftly explore data, build predictive models, and deploy data apps. Founded in 2020, Einblick was developed based on six years of research at MIT and Brown University. Einblick is funded by Amplify Partners, Flybridge, Samsung Next, Dell Technologies Capital, and Intel Capital. For more information, please visit www.einblick.ai and follow us on LinkedIn and Twitter.