figpack 0.2.4__py3-none-any.whl → 0.2.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of figpack might be problematic. Click here for more details.
- figpack/__init__.py +5 -1
- figpack/cli.py +2 -118
- figpack/core/_bundle_utils.py +3 -4
- figpack/core/_save_figure.py +31 -0
- figpack/core/_server_manager.py +0 -2
- figpack/core/_show_view.py +17 -21
- figpack/core/_upload_bundle.py +44 -21
- figpack/core/_view_figure.py +138 -0
- figpack/core/figpack_view.py +73 -24
- figpack/figpack-gui-dist/assets/{index-CuFseOGX.js → index-CrYQmIda.js} +57 -57
- figpack/figpack-gui-dist/index.html +1 -1
- figpack/views/Gallery.py +88 -0
- figpack/views/GalleryItem.py +47 -0
- figpack/views/Image.py +37 -0
- figpack/views/__init__.py +2 -0
- figpack-0.2.5.dist-info/METADATA +96 -0
- {figpack-0.2.4.dist-info → figpack-0.2.5.dist-info}/RECORD +21 -17
- figpack-0.2.4.dist-info/METADATA +0 -168
- {figpack-0.2.4.dist-info → figpack-0.2.5.dist-info}/WHEEL +0 -0
- {figpack-0.2.4.dist-info → figpack-0.2.5.dist-info}/entry_points.txt +0 -0
- {figpack-0.2.4.dist-info → figpack-0.2.5.dist-info}/licenses/LICENSE +0 -0
- {figpack-0.2.4.dist-info → figpack-0.2.5.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="./assets/neurosift-logo-CLsuwLMO.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>figpack figure</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-CrYQmIda.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="./assets/index-Cmae55E4.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
figpack/views/Gallery.py
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Gallery view for figpack - a gallery layout container that handles other views with separate timeseries contexts
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Any, Dict, List, Optional
|
|
6
|
+
|
|
7
|
+
import zarr
|
|
8
|
+
|
|
9
|
+
from ..core.figpack_view import FigpackView
|
|
10
|
+
from .GalleryItem import GalleryItem
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Gallery(FigpackView):
|
|
14
|
+
"""
|
|
15
|
+
A gallery layout container view that arranges other views in a gallery format.
|
|
16
|
+
|
|
17
|
+
The Gallery view is functionally similar to TabLayout, but with a key difference:
|
|
18
|
+
each gallery item maintains its own independent timeseries selection context.
|
|
19
|
+
This means that time range selections, current time, and visible time ranges
|
|
20
|
+
are isolated between different gallery items, allowing for independent navigation
|
|
21
|
+
and analysis of timeseries data in each item.
|
|
22
|
+
|
|
23
|
+
This is particularly useful when comparing different datasets or views that
|
|
24
|
+
should not share the same time selection state.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
def __init__(
|
|
28
|
+
self,
|
|
29
|
+
*,
|
|
30
|
+
items: List[GalleryItem],
|
|
31
|
+
initial_item_index: int = 0,
|
|
32
|
+
):
|
|
33
|
+
"""
|
|
34
|
+
Initialize a Gallery view
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
items: List of GalleryItem objects containing the child views.
|
|
38
|
+
Each item will have its own independent timeseries selection context.
|
|
39
|
+
initial_item_index: Index of the initially selected gallery item (default: 0).
|
|
40
|
+
Will be clamped to valid range if out of bounds.
|
|
41
|
+
"""
|
|
42
|
+
self.items = items
|
|
43
|
+
# Ensure initial_item_index is within valid bounds
|
|
44
|
+
self.initial_item_index = (
|
|
45
|
+
max(0, min(initial_item_index, len(items) - 1)) if items else 0
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
def _write_to_zarr_group(self, group: zarr.Group) -> None:
|
|
49
|
+
"""
|
|
50
|
+
Write the Gallery data to a Zarr group
|
|
51
|
+
|
|
52
|
+
This method serializes the gallery structure and all its child views
|
|
53
|
+
into a Zarr group format that can be read by the frontend components.
|
|
54
|
+
Each gallery item's view is written to its own subgroup within the
|
|
55
|
+
main gallery group.
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
group: Zarr group to write data into
|
|
59
|
+
"""
|
|
60
|
+
# Set the view type identifier for the frontend
|
|
61
|
+
group.attrs["view_type"] = "Gallery"
|
|
62
|
+
|
|
63
|
+
# Store gallery-specific properties
|
|
64
|
+
group.attrs["initial_item_index"] = self.initial_item_index
|
|
65
|
+
|
|
66
|
+
# Create a list to store metadata for all gallery items
|
|
67
|
+
items_metadata = []
|
|
68
|
+
|
|
69
|
+
# Process each gallery item
|
|
70
|
+
for i, item in enumerate(self.items):
|
|
71
|
+
# Generate a unique name for this item's subgroup
|
|
72
|
+
item_name = f"gallery_item_{i}"
|
|
73
|
+
|
|
74
|
+
# Store item metadata (label, etc.) for the frontend
|
|
75
|
+
item_metadata = item.to_dict()
|
|
76
|
+
item_metadata["name"] = item_name
|
|
77
|
+
items_metadata.append(item_metadata)
|
|
78
|
+
|
|
79
|
+
# Create a subgroup for this gallery item's view
|
|
80
|
+
item_group = group.create_group(item_name)
|
|
81
|
+
|
|
82
|
+
# Recursively write the child view to the subgroup
|
|
83
|
+
# This allows any figpack view to be contained within a gallery item
|
|
84
|
+
item.view._write_to_zarr_group(item_group)
|
|
85
|
+
|
|
86
|
+
# Store the complete items metadata in the group attributes
|
|
87
|
+
# This will be used by the frontend to render the gallery structure
|
|
88
|
+
group.attrs["items"] = items_metadata
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""
|
|
2
|
+
GalleryItem class for figpack Gallery view - represents an item in a gallery layout container
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
from ..core.figpack_view import FigpackView
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GalleryItem:
|
|
11
|
+
"""
|
|
12
|
+
Represents an item in a Gallery with a label and view.
|
|
13
|
+
|
|
14
|
+
Similar to TabLayoutItem, but designed for gallery layouts where each item
|
|
15
|
+
maintains its own independent timeseries selection context.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def __init__(
|
|
19
|
+
self,
|
|
20
|
+
view: FigpackView,
|
|
21
|
+
*,
|
|
22
|
+
label: str,
|
|
23
|
+
):
|
|
24
|
+
"""
|
|
25
|
+
Initialize a GalleryItem
|
|
26
|
+
|
|
27
|
+
Args:
|
|
28
|
+
view: The figpack view to be contained in this gallery item
|
|
29
|
+
label: The label text to display for this gallery item
|
|
30
|
+
"""
|
|
31
|
+
self.view = view
|
|
32
|
+
self.label = label
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict:
|
|
35
|
+
"""
|
|
36
|
+
Convert the GalleryItem to a dictionary for serialization
|
|
37
|
+
|
|
38
|
+
This method is used when writing the gallery data to Zarr format.
|
|
39
|
+
The dictionary contains metadata about the item that will be stored
|
|
40
|
+
in the Zarr group attributes.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
Dictionary representation of the GalleryItem containing the label
|
|
44
|
+
"""
|
|
45
|
+
return {
|
|
46
|
+
"label": self.label,
|
|
47
|
+
}
|
figpack/views/Image.py
CHANGED
|
@@ -32,6 +32,43 @@ class Image(FigpackView):
|
|
|
32
32
|
|
|
33
33
|
self.image_path_or_data = image_path_or_data
|
|
34
34
|
|
|
35
|
+
@staticmethod
|
|
36
|
+
def from_image_file(image_path: str) -> "Image":
|
|
37
|
+
"""
|
|
38
|
+
Create an Image view from a file path
|
|
39
|
+
|
|
40
|
+
Args:
|
|
41
|
+
image_path: Path to the image file
|
|
42
|
+
|
|
43
|
+
Returns:
|
|
44
|
+
An Image view instance
|
|
45
|
+
"""
|
|
46
|
+
return Image(image_path)
|
|
47
|
+
|
|
48
|
+
@staticmethod
|
|
49
|
+
def from_image_url(image_url: str) -> "Image":
|
|
50
|
+
"""
|
|
51
|
+
Create an Image view from an image URL by downloading the image
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
image_url: URL of the image to download
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
An Image view instance
|
|
58
|
+
|
|
59
|
+
Raises:
|
|
60
|
+
ValueError: If the image cannot be downloaded
|
|
61
|
+
"""
|
|
62
|
+
import requests
|
|
63
|
+
|
|
64
|
+
try:
|
|
65
|
+
response = requests.get(image_url)
|
|
66
|
+
response.raise_for_status()
|
|
67
|
+
image_data = response.content
|
|
68
|
+
return Image(image_data)
|
|
69
|
+
except Exception as e:
|
|
70
|
+
raise ValueError(f"Failed to download image from URL: {str(e)}")
|
|
71
|
+
|
|
35
72
|
def _write_to_zarr_group(self, group: zarr.Group) -> None:
|
|
36
73
|
"""
|
|
37
74
|
Write the image data to a Zarr group
|
figpack/views/__init__.py
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: figpack
|
|
3
|
+
Version: 0.2.5
|
|
4
|
+
Summary: A Python package for creating shareable, interactive visualizations in the browser
|
|
5
|
+
Author-email: Jeremy Magland <jmagland@flatironinstitute.org>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/flatironinstitute/figpack
|
|
8
|
+
Project-URL: Repository, https://github.com/flatironinstitute/figpack
|
|
9
|
+
Project-URL: Documentation, https://flatironinstitute.github.io/figpack
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/flatironinstitute/figpack/issues
|
|
11
|
+
Keywords: visualization,plotting,timeseries,interactive
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: numpy
|
|
28
|
+
Requires-Dist: zarr<3
|
|
29
|
+
Requires-Dist: requests
|
|
30
|
+
Requires-Dist: psutil
|
|
31
|
+
Provides-Extra: test
|
|
32
|
+
Requires-Dist: pytest>=7.0; extra == "test"
|
|
33
|
+
Requires-Dist: pytest-cov>=4.0; extra == "test"
|
|
34
|
+
Requires-Dist: pytest-mock>=3.10; extra == "test"
|
|
35
|
+
Requires-Dist: spikeinterface; extra == "test"
|
|
36
|
+
Requires-Dist: matplotlib; extra == "test"
|
|
37
|
+
Requires-Dist: plotly; extra == "test"
|
|
38
|
+
Requires-Dist: Pillow; extra == "test"
|
|
39
|
+
Provides-Extra: dev
|
|
40
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
41
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest-mock>=3.10; extra == "dev"
|
|
43
|
+
Requires-Dist: black>=24.0; extra == "dev"
|
|
44
|
+
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
45
|
+
Provides-Extra: docs
|
|
46
|
+
Requires-Dist: sphinx>=7.0; extra == "docs"
|
|
47
|
+
Requires-Dist: myst-parser>=2.0; extra == "docs"
|
|
48
|
+
Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
|
|
49
|
+
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
|
|
50
|
+
Requires-Dist: linkify-it-py>=2.0; extra == "docs"
|
|
51
|
+
Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
|
|
52
|
+
Dynamic: license-file
|
|
53
|
+
|
|
54
|
+
# figpack
|
|
55
|
+
|
|
56
|
+
[](https://github.com/flatironinstitute/figpack/actions/workflows/test.yml)
|
|
57
|
+
[](https://codecov.io/gh/flatironinstitute/figpack)
|
|
58
|
+
[](https://badge.fury.io/py/figpack)
|
|
59
|
+
|
|
60
|
+
A Python package for creating shareable, interactive visualizations in the browser.
|
|
61
|
+
|
|
62
|
+
## Documentation
|
|
63
|
+
|
|
64
|
+
For detailed guidance, tutorials, and API reference, visit our **[documentation](https://flatironinstitute.github.io/figpack)**.
|
|
65
|
+
|
|
66
|
+
## Quick Start
|
|
67
|
+
|
|
68
|
+
Want to jump right in? Here's how to get started:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install figpack
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import numpy as np
|
|
76
|
+
import figpack.views as vv
|
|
77
|
+
|
|
78
|
+
# Create a timeseries graph
|
|
79
|
+
graph = vv.TimeseriesGraph(y_label="Signal")
|
|
80
|
+
|
|
81
|
+
# Add some data
|
|
82
|
+
t = np.linspace(0, 10, 1000)
|
|
83
|
+
y = np.sin(2 * np.pi * t)
|
|
84
|
+
graph.add_line_series(name="sine wave", t=t, y=y, color="blue")
|
|
85
|
+
|
|
86
|
+
# Display the visualization in your browser
|
|
87
|
+
graph.show(open_in_browser=True, title="Quick Start Example")
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
Apache-2.0
|
|
93
|
+
|
|
94
|
+
## Contributing
|
|
95
|
+
|
|
96
|
+
Visit the [GitHub repository](https://github.com/flatironinstitute/figpack) for issues, contributions, and the latest updates.
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
figpack/__init__.py,sha256=
|
|
2
|
-
figpack/cli.py,sha256=
|
|
1
|
+
figpack/__init__.py,sha256=MgpfFlGDmvR6fsmnN1k1RyoeOxl6pBtfaXgvZj1RStY,181
|
|
2
|
+
figpack/cli.py,sha256=xWF7J2BxUqOLvPu-Kje7Q6oGukTroXsLq8WN8vJgyw0,8321
|
|
3
3
|
figpack/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
figpack/core/_bundle_utils.py,sha256=
|
|
5
|
-
figpack/core/
|
|
6
|
-
figpack/core/
|
|
7
|
-
figpack/core/
|
|
4
|
+
figpack/core/_bundle_utils.py,sha256=PIBVce4SXZyNTKpXsoEKlHbY7QUFRMBLwSECmJn0INE,1878
|
|
5
|
+
figpack/core/_save_figure.py,sha256=9fn37xxZgSBQVOHaKuzsPRMgD2pcibuJ1jkjhTVv4ks,1002
|
|
6
|
+
figpack/core/_server_manager.py,sha256=BTLeZtSbaJtAmtslAfgvp9C-SV0aJnn4WCpUJzd1Mlg,10997
|
|
7
|
+
figpack/core/_show_view.py,sha256=fwd6o6K0IHnlLDRMvo-dwQ_zrHs9bkAFqZJpID22Tso,5044
|
|
8
|
+
figpack/core/_upload_bundle.py,sha256=hseJDKe2s7fO8siWpAGuwGDniOlOvPJ5Jksql6SVMug,14192
|
|
9
|
+
figpack/core/_view_figure.py,sha256=o1x1I2VKFrp2W_TStUS3fQblRW8AvGbu7Uy7MgVjofA,4186
|
|
8
10
|
figpack/core/config.py,sha256=oOR7SlP192vuFhYlS-h14HnG-kd_3gaz0vshXch2RNc,173
|
|
9
|
-
figpack/core/figpack_view.py,sha256=
|
|
10
|
-
figpack/figpack-gui-dist/index.html,sha256=
|
|
11
|
+
figpack/core/figpack_view.py,sha256=NMinVYTByDG_JrplxyGNvPalN-XLnQNNhnwIsT4km1Q,6099
|
|
12
|
+
figpack/figpack-gui-dist/index.html,sha256=Iir-EDyhLfsZDZ3m0oGeB-N1AjXtIAC68lu3rOx2WKo,486
|
|
11
13
|
figpack/figpack-gui-dist/assets/index-Cmae55E4.css,sha256=Yg0apcYehJwQvSQIUH13S7tsfqWQDevpJsAho0dDf0g,5499
|
|
12
|
-
figpack/figpack-gui-dist/assets/index-
|
|
14
|
+
figpack/figpack-gui-dist/assets/index-CrYQmIda.js,sha256=3wyvEZye-j_IBlv5lBP4qCBY9-a6-sJ6inh0ZeTHDjA,1594728
|
|
13
15
|
figpack/figpack-gui-dist/assets/neurosift-logo-CLsuwLMO.png,sha256=g5m-TwrGh5f6-9rXtWV-znH4B0nHgc__0GWclRDLUHs,9307
|
|
14
16
|
figpack/franklab/__init__.py,sha256=HkehqGImJE_sE2vbPDo-HbgtEYaMICb9-230xTYvRTU,56
|
|
15
17
|
figpack/franklab/views/TrackAnimation.py,sha256=3Jv1Ri4FIwTyqNahinqhHsBH1Bv_iZrEGx12w6diJ2M,5636
|
|
@@ -30,7 +32,9 @@ figpack/spike_sorting/views/UnitsTableColumn.py,sha256=zBnuoeILTuiVLDvtcOxqa37E5
|
|
|
30
32
|
figpack/spike_sorting/views/UnitsTableRow.py,sha256=rEb2hMTA_pl2fTW1nOvnGir0ysfNx4uww3aekZzfWjk,720
|
|
31
33
|
figpack/spike_sorting/views/__init__.py,sha256=iRq7xPmyhnQ3GffnPC0GxKGEWnlqXY_8IOxsMqYZ1IM,967
|
|
32
34
|
figpack/views/Box.py,sha256=TfhPFNtVEq71LCucmWk3XX2WxQLdaeRiWGm5BM0k2l4,2236
|
|
33
|
-
figpack/views/
|
|
35
|
+
figpack/views/Gallery.py,sha256=sHlZbaqxcktasmNsJnuxe8WmgUQ6iurG50JiChKSMbQ,3314
|
|
36
|
+
figpack/views/GalleryItem.py,sha256=b_upJno5P3ANSulbG-h3t6Xj56tPGJ7iVxqyiZu3zaQ,1244
|
|
37
|
+
figpack/views/Image.py,sha256=hmyAHlRwj0l6fC7aNmHYJFaj-qCqyH67soERm78V5dk,3953
|
|
34
38
|
figpack/views/LayoutItem.py,sha256=wy8DggkIzZpU0F1zFIBceS7HpBb6lu-A3hpYINQzedk,1595
|
|
35
39
|
figpack/views/Markdown.py,sha256=KEqEAz5VXErLXr8dYJrWY1I8_VdRazDIcjCNcHfUGPA,769
|
|
36
40
|
figpack/views/MatplotlibFigure.py,sha256=LQSvPY3_iSHO-ZfWjRO6iOVUp5W-mmlt3mj8GBoK18w,1939
|
|
@@ -40,10 +44,10 @@ figpack/views/Splitter.py,sha256=x9jLCTlIvDy5p9ymVd0X48KDccyD6bJANhXyFgKEmtE,200
|
|
|
40
44
|
figpack/views/TabLayout.py,sha256=5g3nmL95PfqgI0naqZXHMwLVo2ebDlGX01Hy9044bUw,1898
|
|
41
45
|
figpack/views/TabLayoutItem.py,sha256=xmHA0JsW_6naJze4_mQuP_Fy0Nm17p2N7w_AsmVRp8k,880
|
|
42
46
|
figpack/views/TimeseriesGraph.py,sha256=OAaCjO8fo86u_gO_frNfRGxng3tczxGDGKcJEvZo3rE,7469
|
|
43
|
-
figpack/views/__init__.py,sha256=
|
|
44
|
-
figpack-0.2.
|
|
45
|
-
figpack-0.2.
|
|
46
|
-
figpack-0.2.
|
|
47
|
-
figpack-0.2.
|
|
48
|
-
figpack-0.2.
|
|
49
|
-
figpack-0.2.
|
|
47
|
+
figpack/views/__init__.py,sha256=npSsSmbxN7_tZcjCK76L2l9dRVqubVXIgBnxj1uhjf4,473
|
|
48
|
+
figpack-0.2.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
49
|
+
figpack-0.2.5.dist-info/METADATA,sha256=R5iFyGtb_oUZo9Txa1670Ax4pPZyIS5OULXaKbtcfEo,3577
|
|
50
|
+
figpack-0.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
51
|
+
figpack-0.2.5.dist-info/entry_points.txt,sha256=l6d3siH2LxXa8qJGbjAqpIZtI5AkMSyDeoRDCzdrUto,45
|
|
52
|
+
figpack-0.2.5.dist-info/top_level.txt,sha256=lMKGaC5xWmAYBx9Ac1iMokm42KFnJFjmkP2ldyvOo-c,8
|
|
53
|
+
figpack-0.2.5.dist-info/RECORD,,
|
figpack-0.2.4.dist-info/METADATA
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: figpack
|
|
3
|
-
Version: 0.2.4
|
|
4
|
-
Summary: A Python package for creating shareable, interactive visualizations in the browser
|
|
5
|
-
Author-email: Jeremy Magland <jmagland@flatironinstitute.org>
|
|
6
|
-
License: Apache-2.0
|
|
7
|
-
Project-URL: Homepage, https://github.com/magland/figpack
|
|
8
|
-
Project-URL: Repository, https://github.com/magland/figpack
|
|
9
|
-
Project-URL: Documentation, https://github.com/magland/figpack#readme
|
|
10
|
-
Project-URL: Bug Tracker, https://github.com/magland/figpack/issues
|
|
11
|
-
Keywords: visualization,plotting,timeseries,interactive
|
|
12
|
-
Classifier: Development Status :: 3 - Alpha
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: Intended Audience :: Science/Research
|
|
15
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
-
Classifier: Operating System :: OS Independent
|
|
17
|
-
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
-
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
24
|
-
Requires-Python: >=3.8
|
|
25
|
-
Description-Content-Type: text/markdown
|
|
26
|
-
License-File: LICENSE
|
|
27
|
-
Requires-Dist: numpy
|
|
28
|
-
Requires-Dist: zarr<3
|
|
29
|
-
Requires-Dist: requests
|
|
30
|
-
Requires-Dist: psutil
|
|
31
|
-
Provides-Extra: test
|
|
32
|
-
Requires-Dist: pytest>=7.0; extra == "test"
|
|
33
|
-
Requires-Dist: pytest-cov>=4.0; extra == "test"
|
|
34
|
-
Requires-Dist: pytest-mock>=3.10; extra == "test"
|
|
35
|
-
Requires-Dist: spikeinterface; extra == "test"
|
|
36
|
-
Requires-Dist: matplotlib; extra == "test"
|
|
37
|
-
Requires-Dist: plotly; extra == "test"
|
|
38
|
-
Provides-Extra: dev
|
|
39
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
40
|
-
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
41
|
-
Requires-Dist: pytest-mock>=3.10; extra == "dev"
|
|
42
|
-
Requires-Dist: black>=24.0; extra == "dev"
|
|
43
|
-
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
44
|
-
Dynamic: license-file
|
|
45
|
-
|
|
46
|
-
# figpack
|
|
47
|
-
|
|
48
|
-
A Python package for creating shareable, interactive visualizations in the browser.
|
|
49
|
-
|
|
50
|
-
## Overview
|
|
51
|
-
|
|
52
|
-
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.
|
|
53
|
-
|
|
54
|
-
### Key Features
|
|
55
|
-
|
|
56
|
-
- **Interactive timeseries graphs** with line series, markers, and interval plots
|
|
57
|
-
- **Flexible layout system** with boxes, splitters, and tab layouts
|
|
58
|
-
- **Web-based rendering** that works in any modern browser
|
|
59
|
-
- **Shareable visualizations** that can be uploaded and shared via URLs
|
|
60
|
-
- **Zarr-based data storage** for efficient handling of large datasets
|
|
61
|
-
|
|
62
|
-
## Installation
|
|
63
|
-
|
|
64
|
-
Install figpack using pip:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
pip install figpack
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Quick Start
|
|
71
|
-
|
|
72
|
-
```python
|
|
73
|
-
import numpy as np
|
|
74
|
-
import figpack.views as vv
|
|
75
|
-
|
|
76
|
-
# Create a timeseries graph
|
|
77
|
-
graph = vv.TimeseriesGraph(y_label="Signal")
|
|
78
|
-
|
|
79
|
-
# Add some data
|
|
80
|
-
t = np.linspace(0, 10, 1000)
|
|
81
|
-
y = np.sin(2 * np.pi * t)
|
|
82
|
-
graph.add_line_series(name="sine wave", t=t, y=y, color="blue")
|
|
83
|
-
|
|
84
|
-
# Display the visualization
|
|
85
|
-
graph.show(open_in_browser=True, title="Quick Start Example")
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Available Views
|
|
89
|
-
|
|
90
|
-
figpack provides a comprehensive set of view components for creating interactive visualizations:
|
|
91
|
-
|
|
92
|
-
### Core Views
|
|
93
|
-
|
|
94
|
-
- **[TimeseriesGraph](docs/timeseries-graph.md)** - Interactive line plots, markers, and intervals ([example](examples/example_timeseries_graph.py))
|
|
95
|
-
- **[MultiChannelTimeseries](docs/multichannel-timeseries.md)** - Multi-channel timeseries visualization ([example](examples/example_multichannel_timeseries.py))
|
|
96
|
-
- **[Image](docs/image.md)** - Display images with optional annotations ([example](examples/example_image.py))
|
|
97
|
-
- **[Markdown](docs/markdown.md)** - Render markdown content ([example](examples/example_markdown.py))
|
|
98
|
-
|
|
99
|
-
### Layout Views
|
|
100
|
-
|
|
101
|
-
- **[Box](docs/box.md)** - Flexible container with horizontal/vertical layouts ([example](examples/example_box.py))
|
|
102
|
-
- **[Splitter](docs/splitter.md)** - Resizable split panes ([example](examples/example_splitter.py))
|
|
103
|
-
- **[TabLayout](docs/tab-layout.md)** - Tabbed interface for multiple views ([example](examples/example_tablayout.py))
|
|
104
|
-
|
|
105
|
-
### External Figure Support
|
|
106
|
-
|
|
107
|
-
- **[MatplotlibFigure](docs/matplotlib-figure.md)** - Embed matplotlib plots ([example](examples/example_matplotlib.py))
|
|
108
|
-
- **[PlotlyFigure](docs/plotly-figure.md)** - Embed plotly visualizations ([example](examples/example_plotly.py))
|
|
109
|
-
|
|
110
|
-
### Spike Sorting Views
|
|
111
|
-
|
|
112
|
-
- **[Autocorrelograms](docs/autocorrelograms.md)** - Auto-correlation analysis ([example](examples/example_autocorrelograms.py))
|
|
113
|
-
- **[CrossCorrelograms](docs/cross-correlograms.md)** - Cross-correlation analysis ([example](examples/example_cross_correlograms.py))
|
|
114
|
-
- **[UnitsTable](docs/units-table.md)** - Sortable table for spike sorting units ([example](examples/example_units_table.py))
|
|
115
|
-
|
|
116
|
-
## Examples
|
|
117
|
-
|
|
118
|
-
See the `examples/` directory for working examples of each view type.
|
|
119
|
-
|
|
120
|
-
## Usage Modes
|
|
121
|
-
|
|
122
|
-
### Local-only Mode
|
|
123
|
-
|
|
124
|
-
```python
|
|
125
|
-
view.show(open_in_browser=True, title="Local Visualization")
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Sharing Online
|
|
129
|
-
|
|
130
|
-
Set the `FIGPACK_API_KEY` environment variable and use:
|
|
131
|
-
|
|
132
|
-
```python
|
|
133
|
-
view.show(upload=True, open_in_browser=True, title="Shared Visualization")
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Development Mode
|
|
137
|
-
|
|
138
|
-
Set `_dev=True` in the call to show() to enable development mode, which allows for live updates and development of figpack-gui.
|
|
139
|
-
|
|
140
|
-
## Command Line Interface
|
|
141
|
-
|
|
142
|
-
figpack includes a command-line interface for working with figures:
|
|
143
|
-
|
|
144
|
-
### Download a Figure
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
figpack download <figure-url> <dest.tar.gz>
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Download a figure from any figpack URL and save it as a local archive.
|
|
151
|
-
|
|
152
|
-
### View a Figure Archive
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
figpack view <figure.tar.gz>
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
Extract and view a figure archive in your browser. The server will run locally until you press Enter.
|
|
159
|
-
|
|
160
|
-
Use `--port <number>` to specify a custom port.
|
|
161
|
-
|
|
162
|
-
## License
|
|
163
|
-
|
|
164
|
-
Apache-2.0
|
|
165
|
-
|
|
166
|
-
## Contributing
|
|
167
|
-
|
|
168
|
-
Visit the [GitHub repository](https://github.com/magland/figpack) for issues, contributions, and the latest updates.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|