Skip to content

seabornai is a Python library that utilizes the OpenAI ChatGPT API to generate Seaborn graphs based on supplied data and prompts/questions.

License

Notifications You must be signed in to change notification settings

aditya0072001/seabornai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

seabornai

Downloads

seabornai is a Python library that leverages the OpenAI ChatGPT API to generate Seaborn graphs based on supplied data and prompts/questions.

Disclaimer: Usage of this library requires an OpenAI API key and subscription, as well as the Seaborn library installed.

Installation

You can install seabornai using pip:

pip install seabornai

Usage

from seabornai import generate_graph, set_openai_api_key

# Set your OpenAI API key
api_key = input("Please enter your OpenAI API key: ")
set_openai_api_key(api_key)

# Example usage
data = {"x_column": [1, 2, 3], "y_column": [4, 5, 6]}
prompt = "What is the relationship between x_column and y_column?"

# Generate a Seaborn graph
generate_graph(data, prompt)

Features

  • Generate Seaborn graphs based on supplied data and prompts/questions.
  • Customize graph style, size, labels, titles, legends, and colors.
  • Choose from various types of plots, such as bar plots, scatter plots, line plots, or box plots.
  • Perform statistical analysis by adding regression lines, confidence intervals, or hypothesis testing.
  • Save the generated graph to a file in different formats (e.g., PNG, PDF, SVG).

Examples

Here are some examples of using seabornai to generate Seaborn graphs:

Example 1: Scatter Plot

data = {"x_column": [1, 2, 3, 4], "y_column": [2, 4, 6, 8]}
prompt = "What is the relationship between x_column and y_column?"

generate_graph(data, prompt, style="darkgrid", size=(8, 6))

Example 2: Bar Plot

data = {"category": ["A", "B", "C"], "value": [10, 20, 30]}
prompt = "How does the value vary across different categories?"

generate_graph(data, prompt, style="whitegrid", size=(6, 4))

License

This project is licensed under the MIT License.

About

seabornai is a Python library that utilizes the OpenAI ChatGPT API to generate Seaborn graphs based on supplied data and prompts/questions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published