seabornai
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.
Release files for seabornai 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| seabornai-0.0.2.tar.gz | 3.5 kB | Details |
Release files / seabornai-0.0.2.tar.gz
| Download URL | seabornai-0.0.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6eb233cfc275411f74ab61b735ac091438f0dc88c861c482a97662c450c0668
|
|
BLAKE2b-256 checksum How to use checksums |
cef5d3649cd5fd9a6fa2f65bb399a3460029b381921c4c9923fb628f5fd07d93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|