Explore¶
tangram_explore
¶
LayerConfig
module-attribute
¶
Serialised layer configuration without data or label.
plugin
module-attribute
¶
plugin = Plugin(
frontend_path="dist-frontend",
routers=[router],
config_class=ExploreConfig,
frontend_config_class=ExploreFrontendConfig,
into_frontend_config_function=into_frontend,
lifespan=lifespan,
)
ExploreState
dataclass
¶
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
44 45 46 47 48 | |
ArrowStreamExportable
¶
Bases: Protocol
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
79 80 81 | |
ExploreLayer
¶
Bases: Protocol
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
84 85 86 87 88 89 90 91 92 | |
data
instance-attribute
¶
data: ArrowStreamExportable
Any data structure that implements the Arrow C data interface, such as polars DataFrames or pyarrow Tables.
ScatterLayer
dataclass
¶
Bases: ExploreLayer
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
kind
class-attribute
instance-attribute
¶
__init__
¶
__init__(
data: ArrowStreamExportable,
*,
radius_scale: float = 50.0,
radius_min_pixels: float = 2.0,
radius_max_pixels: float = 5.0,
line_width_min_pixels: float = 1.0,
fill_color: str | list[int] = "#027ec7",
line_color: str | list[int] = "#000000",
opacity: float = 0.8,
stroked: bool = False,
filled: bool = True,
pickable: bool = True,
label: str | None = None,
) -> None
Layer
dataclass
¶
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
126 127 128 129 130 131 132 | |
Session
dataclass
¶
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
__post_init__
¶
__post_init__() -> None
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
139 140 141 142 143 144 | |
push
async
¶
push(layer: ExploreLayer) -> Layer
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
remove
async
¶
remove(data_id: str) -> None
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
183 184 185 186 187 188 189 190 191 | |
clear
async
¶
clear() -> None
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
193 194 195 196 197 198 | |
ExploreConfig
dataclass
¶
ExploreFrontendConfig
dataclass
¶
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
206 207 208 209 | |
enable_3d
instance-attribute
¶
enable_3d: Annotated[bool, FrontendMutable()]
Whether to render scatter points in 3D
lifespan
async
¶
lifespan(state: BackendState) -> AsyncGenerator[None, None]
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
51 52 53 54 55 | |
get_explore_state
¶
get_explore_state(
state: InjectBackendState,
) -> ExploreState
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
58 59 | |
get_explore_data
async
¶
get_explore_data(
data_id: str, state: InjectBackendState
) -> Response
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
62 63 64 65 66 67 68 69 70 | |
get_layers
async
¶
get_layers(
state: InjectBackendState,
) -> list[dict[str, Any]]
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
73 74 75 76 | |
into_frontend
¶
into_frontend(
config: ExploreConfig,
) -> ExploreFrontendConfig
Source code in packages/tangram_explore/src/tangram_explore/__init__.py
212 213 | |