viz-gpt.mp4
Use GPT to generate visualization from datasets with natural language. You can edit the visualization in the context step by step to make it more precise without retyping the complex query. VizGPT turns your text queries and chat into data visualization or charts.
You can try it at Playground or vizGPT on Kanaries kanaries-vizgpt
There exist lots of great visualization products in the world, such as Tableau, pygwalker. The traditional drag-and-drop visualization tool is hard to use for people unfamiliar with configs and viz/data transformations. For example, making a tableau heatmap requires bin transformations to both axes and then dragging the measure to color. It is hard for people unfamiliar with data visualization to make a heatmap.
Some text2viz tools accept natural language to generate the visualization. However, they are not flexible enough to allow users to edit the visualization. For example, if the user wants to change the color of the heatmap, they have to retype the whole sentence.
With VizGPT, you can build visualizations step by step with a chat interface. You can edit/adjust visualizations in the context. It allows you to explore the data first without figuring out how to build complex visualization initially, especially when unfamiliar with the data.
Besides, VizGPT focus on text based visual exploration. It allows users to discover new insights from visualization and ask new questions based on the insights they just find.
- Natural language to data visualization vega-lite
- Use chat context to edit your visualization. Allow users to change the chart if it is not what they expected
- Explore the data step by step by chatting with visualizations.
- Upload your own dataset (CSV) to make visulizations.
- Save the visualizations and chat history.
- Allow user to use visualization editor (like graphic-walker or vega-editor) to edit the visualization and show the edit to GPT to make better visualization as the user prefers.
vizGPT is now good at drawing data visualizations, not data transformations/preparation/computation. You can use other tools like Kanaries/RATH to prepare the data first and then use vizGPT to draw the visualization.
I also build a RAG version of vizGPT, which can be accessed at vizgpt.ai, it contains RAG special for vega/vega-lite and SQL.
![vizapt-1](https://private-user-images.githubusercontent.com/22167673/237136043-3788bb64-9441-4c1a-b709-307f9bc47e3d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3ODEzMDksIm5iZiI6MTcyMzc4MTAwOSwicGF0aCI6Ii8yMjE2NzY3My8yMzcxMzYwNDMtMzc4OGJiNjQtOTQ0MS00YzFhLWI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jFmZTkxNTgxOGRmYjNmZmQ1NjE3NzkwNzUwNjFhYjMzY2Q2YTgwZDljNzE2ZWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Rk9evwObdwNm93NH6okZYAZuUxF4Uqz2-GgXuKEYTxI)
![vizapt-3](https://private-user-images.githubusercontent.com/22167673/237136130-5506e5f5-f209-4721-a2ee-61e59180f08f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3ODEzMDksIm5iZiI6MTcyMzc4MTAwOSwicGF0aCI6Ii8yMjE2NzY3My8yMzcxMzYxMzAtNTUwNmU1ZjUtZjIwOS00NzIxLWEyZWUtNjFlNTkxODBmMDhmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE2VDA0MDMyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEwZThkMzk3MGU0NTUyNDBiZjE3OWVjNjljMTFlYzgyZDZmNmZhNTI5NmZjNTQ5YWRiNmVmMTA0MzkwN2ZkMjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.c-iVLGNgR0jaOWDZ8e3bv22i24oqVN2YxJuwGIVO1yI)
Click `upload CSV button to add your own data. You can view or edit your data's metas at data view. The metas are inferred automatically by default. You can edit it anytime you want to make the visualization more precise.
Create a .env
file at the root of the project with the following contents:
BASE_URL=<Azure OpenAI BaseURL>
DEPLOYMENT_NAME=<Deployment Name>
AZURE_OPENAI_KEY=<Your key>
Install dependencies:
yarn install
Then run vercel dev
or npm run dev
to start the server at port 3000.