# figpack
A Python package for creating shareable, interactive visualizations in the browser.
## Overview
figpack enables you to create interactive data visualizations that can be displayed in a web browser and optionally shared online. The package focuses on timeseries data visualization with support for complex, nested layouts.
### Key Features
- **Interactive timeseries graphs** with line series, markers, and interval plots
- **Flexible layout system** with boxes, splitters, and tab layouts
- **Web-based rendering** that works in any modern browser
- **Shareable visualizations** that can be uploaded and shared via URLs
- **Zarr-based data storage** for efficient handling of large datasets
## Installation
Install figpack using pip:
```bash
pip install figpack
```
## Quick Start
```python
import numpy as np
import figpack.views as vv
# Create a timeseries graph
graph = vv.TimeseriesGraph(y_label="Signal")
# Add some data
t = np.linspace(0, 10, 1000)
y = np.sin(2 * np.pi * t)
graph.add_line_series(name="sine wave", t=t, y=y, color="blue")
# Display the visualization
graph.show(open_in_browser=True)
```
## Examples
See the `examples/` directory.
## Usage Modes
### Local Development
```python
view.show(open_in_browser=True)
```
### Sharing Online
Set the `FIGPACK_UPLOAD_PASSCODE` environment variable and use:
```python
view.show(upload=True, open_in_browser=True)
```
### Development Mode
Set `_dev=True` in the call to show() to enable development mode, which allows for live updates and debugging with figpack-gui.
## Command Line Interface
figpack includes a command-line interface for working with figures:
### Download a Figure
```bash
figpack download <figure-url> <dest.tar.gz>
```
Download a figure from any figpack URL and save it as a local archive.
### View a Figure Archive
```bash
figpack view <figure.tar.gz>
```
Extract and view a figure archive in your browser. The server will run locally until you press Enter.
Use `--port <number>` to specify a custom port.
## License
Apache-2.0
## Contributing
Visit the [GitHub repository](https://github.com/magland/figpack) for issues, contributions, and the latest updates.
Raw data
{
"_id": null,
"home_page": null,
"name": "figpack",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "visualization, plotting, timeseries, interactive",
"author": null,
"author_email": "Jeremy Magland <jmagland@flatironinstitute.org>",
"download_url": "https://files.pythonhosted.org/packages/5e/0b/e616b67377d7cc786cb1cd20a60fa28219b9a8090b9df186c5bb59ed6595/figpack-0.1.4.tar.gz",
"platform": null,
"description": "# figpack\n\nA Python package for creating shareable, interactive visualizations in the browser.\n\n## Overview\n\nfigpack enables you to create interactive data visualizations that can be displayed in a web browser and optionally shared online. The package focuses on timeseries data visualization with support for complex, nested layouts.\n\n### Key Features\n\n- **Interactive timeseries graphs** with line series, markers, and interval plots\n- **Flexible layout system** with boxes, splitters, and tab layouts\n- **Web-based rendering** that works in any modern browser\n- **Shareable visualizations** that can be uploaded and shared via URLs\n- **Zarr-based data storage** for efficient handling of large datasets\n\n## Installation\n\nInstall figpack using pip:\n\n```bash\npip install figpack\n```\n\n## Quick Start\n\n```python\nimport numpy as np\nimport figpack.views as vv\n\n# Create a timeseries graph\ngraph = vv.TimeseriesGraph(y_label=\"Signal\")\n\n# Add some data\nt = np.linspace(0, 10, 1000)\ny = np.sin(2 * np.pi * t)\ngraph.add_line_series(name=\"sine wave\", t=t, y=y, color=\"blue\")\n\n# Display the visualization\ngraph.show(open_in_browser=True)\n```\n\n## Examples\n\nSee the `examples/` directory.\n\n## Usage Modes\n\n### Local Development\n\n```python\nview.show(open_in_browser=True)\n```\n\n### Sharing Online\n\nSet the `FIGPACK_UPLOAD_PASSCODE` environment variable and use:\n\n```python\nview.show(upload=True, open_in_browser=True)\n```\n\n### Development Mode\n\nSet `_dev=True` in the call to show() to enable development mode, which allows for live updates and debugging with figpack-gui.\n\n## Command Line Interface\n\nfigpack includes a command-line interface for working with figures:\n\n### Download a Figure\n\n```bash\nfigpack download <figure-url> <dest.tar.gz>\n```\n\nDownload a figure from any figpack URL and save it as a local archive.\n\n### View a Figure Archive\n\n```bash\nfigpack view <figure.tar.gz>\n```\n\nExtract and view a figure archive in your browser. The server will run locally until you press Enter.\n\nUse `--port <number>` to specify a custom port.\n\n## License\n\nApache-2.0\n\n## Contributing\n\nVisit the [GitHub repository](https://github.com/magland/figpack) for issues, contributions, and the latest updates.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A Python package for creating shareable, interactive visualizations in the browser",
"version": "0.1.4",
"project_urls": {
"Bug Tracker": "https://github.com/magland/figpack/issues",
"Documentation": "https://github.com/magland/figpack#readme",
"Homepage": "https://github.com/magland/figpack",
"Repository": "https://github.com/magland/figpack"
},
"split_keywords": [
"visualization",
" plotting",
" timeseries",
" interactive"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "bcf7874af33cdf7df0214366d336a364018a25eefb45613ef024b3d116d4028b",
"md5": "2b6ad57cb0e0f2690f41e5007aace9c3",
"sha256": "846ae5a5929cf6bd47863ac6dc51ef0c60bb341d40c6b3e3131012c0e483781f"
},
"downloads": -1,
"filename": "figpack-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2b6ad57cb0e0f2690f41e5007aace9c3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 522871,
"upload_time": "2025-08-15T21:08:04",
"upload_time_iso_8601": "2025-08-15T21:08:04.058238Z",
"url": "https://files.pythonhosted.org/packages/bc/f7/874af33cdf7df0214366d336a364018a25eefb45613ef024b3d116d4028b/figpack-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5e0be616b67377d7cc786cb1cd20a60fa28219b9a8090b9df186c5bb59ed6595",
"md5": "f30be7016d3a07869ee20a3be46aeb28",
"sha256": "feb8c97fa7411b038e5ebfe65921f233b1ab739cbea57222506d0e8cf6124540"
},
"downloads": -1,
"filename": "figpack-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "f30be7016d3a07869ee20a3be46aeb28",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 514655,
"upload_time": "2025-08-15T21:08:06",
"upload_time_iso_8601": "2025-08-15T21:08:06.066772Z",
"url": "https://files.pythonhosted.org/packages/5e/0b/e616b67377d7cc786cb1cd20a60fa28219b9a8090b9df186c5bb59ed6595/figpack-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-15 21:08:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "magland",
"github_project": "figpack",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "figpack"
}