> COMPASSQL is a visualization recommendation engine. Given user query, it suggests visualizations, ranked by both data properties and perceptual principles
Altair is one implementation of Vega-lite in Python; for rendering charts with JS.
Again, just a trivial wrapper over open ai, which already does this very well. But seems to not have any real benefits other than not needing to move mouse. You don't need to send data to OpenAI, and in a business you wouldn't want to do that. LLMs already generate synthetic data for graphing that you just copy/paste in and use. It should instead be passing in types and header maybe.
The big thing for graphs is formatting, the ideal solution IMO is one that can JIT code gen parts that generate real code for formatting so you can reuse and tweak, I don't need to pay to send request to increase the marker size by one pixel. Even if running locally that's waste of compute
This is great! If I could suggest changes that would make this especially useful for me and likely others it would be
1) The ability to substitute in your own LLM, specifically I'd like to be able to use Code Llama which was released a few days ago.
2) The ability to automatically determine an appropriate plot type based on natural langugae metadata. This would allow me to bulk process labelled timeseries data. For example if I set the X label as date, it should know to make a line chart. If I present data labelled with a description involving as "percent of" or something the LLM should know to use a pie or bar chart. If I give a description involving quarterly revenue, it should know it's a time series, but with discrete values, so a bar chart with negative and positive values, etc.
The easiest way to create plots in Python and Matplotlib. The plotai is using LLM to generate code and plots.
The idea:
1. User provides input DataFrame and prompt.
2. The PlotAI constructs a prompt for LLM, which contains the first 5 rows of DataFrame and the user's prompt and asks for Python code as output.
3. Returned Python code is executed, and the plot is displayed.
The simplest possible API for plotting:
# import packages
import pandas as pd
from plotai import PlotAI
# create some data
df = pd.DataFrame({"x":[1,2,3], "y": [4,5,6]})
# do a plot
plot = PlotAI(df)
plot.make("scatter plot")
The PlotAI class has only one method, make().
It works in Python scripts and in notebooks (Jupyter, Colab, VS Code).
The LLM has access to user prompt, 5 first rows of DataFrame and template prompt (for example with sentence 'Output only Python code in response').
I was very surprised with Australia example! The LLM has access to only first 5 rows of the DataFrame and Australia is not there. The LLM was able to produce the correct code, that genralizes well on full DataFrame.
I met you a long time ago when you came to Colorado from Europe to demo mljar to a potential acquisition.
My employer at the time was potentially interested in buying mljar, but I was overruled and they passed on you. It was a bad decision and I'm glad to see you're doing cool things now.
Hey! Thank you. I appreciate you response! That was wild run. Emotional roller coaster. Anyway, I made mljar AutoML open source, it is available in our github https://github.com/mljar
FWIU Vega/voyager suggests similar charts with CompassQL: https://github.com/vega/voyager
From http://vega.github.io/ re: CompassQL:
> COMPASSQL is a visualization recommendation engine. Given user query, it suggests visualizations, ranked by both data properties and perceptual principles
Altair is one implementation of Vega-lite in Python; for rendering charts with JS.
mpld3 does matplotlib with d3.js: https://github.com/mpld3/mpld3