Send data from Jupyter notebooks to the grafiki web dashboard.
Project description
Grafiki Bridge
A Python package that creates shareable, interactive data visualizations from pandas DataFrames through compressed URL links.
Overview
This package allows you to convert pandas DataFrames into compressed, browser-compatible links that open in the grafiki web application for interactive data exploration and visualization. For more information, please visit our wiki.
Features
- 📊 Convert pandas DataFrames to interactive visualizations
- 🔗 Generate shareable web links with data compression
- 🌐 Cross-browser compatibility checking
- 📈 Memory-efficient data encoding
- ⚡ Quick data exploration and sharing
Installation
Install from PyPI:
pip install grafiki-bridge
Or install the latest development version:
pip install git+https://github.com/leberkaassemmel/grafiki-bridge.git
Usage
Basic Examples
To share a DataFrame in a jupyter notebook, use the show_bridge_link function:
import pandas as pd
import grafiki
# Create sample data
sample_data = {
'year': [1949, 1949, 1949, 1950, 1950, 1950],
'month': ['January', 'February', 'March', 'January', 'February', 'March'],
'passengers': [112, 118, 132, 115, 126, 141]
}
df = pd.DataFrame(sample_data)
# Generate shareable visualization link
grafiki.show_bridge_link(df, 'My First Dataset')
For quick DataFrame sharing, use the bridge_df function:
import pandas as pd
from grafiki import bridge_df
# Load your data
df = pd.read_csv('your_data.csv')
# Quick link generation
link = bridge_df(df, name="Sales Data Q1", tags=["sales", "quarterly"])
print(f"Share your data: {link}")
# With custom base URL
link = bridge_df(df,
name="Custom Dataset",
tags=["analysis", "2024"],
base_url="https://custom.grafiki.app")
What You Get
When you run show_bridge_link(), you'll see:
- Dataset Overview: Rows, columns, and memory usage
- Compression Stats: Data compression ratio and space saved
- Browser Compatibility: Automatic detection and compatibility checking
- Shareable Link: Direct URL to open your data in the Grafiki web app
Key Benefits
- Browser Optimized: Checks URL length limits for different browsers
- Instant Sharing: No need to upload files - data is encoded in the URL
- Privacy Friendly: Data stays in your control through URL encoding
Browser Compatibility
The tool automatically detects your browser and shows compatibility:
- Chrome/Edge: Up to ~2MB of data
- Firefox: Up to ~64KB of data
- Safari: Up to ~80KB of data
Requirements (automatically installed with the package)
- Python 3.6+
- pandas
Getting Started
- Install the package:
pip install grafiki-bridge - Import and use in your Python environment:
import pandas as pd
import grafiki
# Your DataFrame
df = pd.read_csv('your_data.csv')
# Generate shareable link
grafiki.show_bridge_link(df, 'Your Dataset Name')
Use Cases
Perfect for:
- Quick data sharing with colleagues
- Creating portable data visualizations
- Prototyping data analysis workflows
- Educational demonstrations
- Lightweight data distribution
Contributing
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Development Setup
git clone https://github.com/yourusername/grafiki-bridge.git
cd grafiki-bridge
pip install -e ".[dev]"
License
This project is open source and available under the MIT License.
AI Assistance Disclosure
This project uses AI tools to assist with development, including:
- Code generation and optimization
- Documentation writing
- Test case generation
- Code review assistance
All AI-generated content is reviewed and validated by human maintainers before inclusion.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grafiki_bridge-0.1.0.tar.gz.
File metadata
- Download URL: grafiki_bridge-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48375c27ae1b6fec88c98dfaf90992d1f56a47ca10ea9606ecf1f352a098aeed
|
|
| MD5 |
c7e7d0b49e211bffeaa22e4684f81dc7
|
|
| BLAKE2b-256 |
c7d683960b5cbb8852c177feaf55b2842e8a7149e94739a8847d9a66fa33e1a8
|
Provenance
The following attestation bundles were made for grafiki_bridge-0.1.0.tar.gz:
Publisher:
python-publish.yml on leberkaassemmel/grafiki-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grafiki_bridge-0.1.0.tar.gz -
Subject digest:
48375c27ae1b6fec88c98dfaf90992d1f56a47ca10ea9606ecf1f352a098aeed - Sigstore transparency entry: 238637902
- Sigstore integration time:
-
Permalink:
leberkaassemmel/grafiki-bridge@e3f7faeee971339f6cc957a8af8b213b1501bd6f -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/leberkaassemmel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e3f7faeee971339f6cc957a8af8b213b1501bd6f -
Trigger Event:
release
-
Statement type:
File details
Details for the file grafiki_bridge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: grafiki_bridge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0ccaf29abc39efe661d368efaca2dd331ae0c89bf6be379d10732c548d9ddb1
|
|
| MD5 |
78f754a026ea326c057630af11e89b40
|
|
| BLAKE2b-256 |
a829401d4ac5dfe1ab025e057e44fcd29860e2f0fb101525544068a46315a1ad
|
Provenance
The following attestation bundles were made for grafiki_bridge-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on leberkaassemmel/grafiki-bridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grafiki_bridge-0.1.0-py3-none-any.whl -
Subject digest:
e0ccaf29abc39efe661d368efaca2dd331ae0c89bf6be379d10732c548d9ddb1 - Sigstore transparency entry: 238637903
- Sigstore integration time:
-
Permalink:
leberkaassemmel/grafiki-bridge@e3f7faeee971339f6cc957a8af8b213b1501bd6f -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/leberkaassemmel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e3f7faeee971339f6cc957a8af8b213b1501bd6f -
Trigger Event:
release
-
Statement type: