Skip to main content

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

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seabornai-0.0.2.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file seabornai-0.0.2.tar.gz.

File metadata

  • Download URL: seabornai-0.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for seabornai-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a6eb233cfc275411f74ab61b735ac091438f0dc88c861c482a97662c450c0668
MD5 f3c2bead9a67a096ea19951c9f5abd86
BLAKE2b-256 cef5d3649cd5fd9a6fa2f65bb399a3460029b381921c4c9923fb628f5fd07d93

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page