Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ npm install embedding-atlas
```

```js
import { EmbeddingAtlas, EmbeddingView, Table } from "embedding-atlas";
import { EmbeddingAtlas, EmbeddingView } from "embedding-atlas";

// or with React:
import { EmbeddingAtlas, EmbeddingView, Table } from "embedding-atlas/react";
import { EmbeddingAtlas, EmbeddingView } from "embedding-atlas/react";

// or Svelte:
import { EmbeddingAtlas, EmbeddingView, Table } from "embedding-atlas/svelte";
import { EmbeddingAtlas, EmbeddingView } from "embedding-atlas/svelte";
```

For more information, please visit <https://apple.github.io/embedding-atlas/overview.html>.
Expand Down Expand Up @@ -110,8 +110,6 @@ Frontend:

- `packages/component`: The `EmbeddingView` and `EmbeddingViewMosaic` components.

- `packages/table`: The `Table` component.

- `packages/viewer`: The frontend application for visualizing embedding and other columns. It also provides the `EmbeddingAtlas` component that can be embedded in other applications.

- `packages/density-clustering`: The density clustering algorithm, written in Rust.
Expand Down
47 changes: 33 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"packages/utils",
"packages/component",
"packages/viewer",
"packages/table",
"packages/umap-wasm",
"packages/density-clustering",
"packages/embedding-atlas",
Expand All @@ -16,7 +15,7 @@
"scripts": {
"build": "./scripts/build.sh",
"test": "npm run test -w @embedding-atlas/density-clustering -w @embedding-atlas/umap-wasm -w @embedding-atlas/utils",
"check": "npm run check -w @embedding-atlas/component -w @embedding-atlas/table -w @embedding-atlas/viewer -w @embedding-atlas/embedding-atlas -w @embedding-atlas/examples -w @embedding-atlas/backend",
"check": "npm run check -w @embedding-atlas/component -w @embedding-atlas/viewer -w @embedding-atlas/embedding-atlas -w @embedding-atlas/examples -w @embedding-atlas/backend",
"check-format": "prettier -c . && uvx ruff check && uvx ruff format --check --exclude '*.ipynb'"
},
"devDependencies": {
Expand Down
10 changes: 8 additions & 2 deletions packages/backend/embedding_atlas/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class EmbeddingAtlasOptions(TypedDict, total=False):

show_embedding:
Whether to display the embedding view when the widget opens.

initial_state:
The initial Embedding Atlas state.
"""

table: str | None
Expand All @@ -68,6 +71,8 @@ class EmbeddingAtlasOptions(TypedDict, total=False):
show_charts: bool | None
show_embedding: bool | None

initial_state: dict | None


def make_embedding_atlas_props(**options: Unpack[EmbeddingAtlasOptions]) -> dict:
"""
Expand Down Expand Up @@ -111,13 +116,14 @@ def set_prop(key: str, value):
set_prop("embeddingViewLabels", options.get("labels"))
set_prop("embeddingViewConfig.autoLabelStopWords", options.get("stop_words"))

# Initial state
set_prop("initialState", options.get("initial_state"))

# Layout
set_prop("initialState.layoutStates.list.showTable", options.get("show_table"))
set_prop("initialState.layoutStates.list.showCharts", options.get("show_charts"))
set_prop(
"initialState.layoutStates.list.showEmbedding", options.get("show_embedding")
)

set_prop("initialState.version", "0.0.0")

return props
1 change: 0 additions & 1 deletion packages/docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default defineConfig({
{
text: "Component Library",
items: [
{ text: "Table", link: "/table" },
{ text: "EmbeddingView", link: "/embedding-view" },
{ text: "EmbeddingViewMosaic", link: "/embedding-view-mosaic" },
{ text: "EmbeddingAtlas", link: "/embedding-atlas" },
Expand Down
1 change: 0 additions & 1 deletion packages/docs/.vitepress/theme/ExampleItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const href = computed(

.example-item:hover {
color: var(--vp-c-indigo-1);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
border-color: var(--vp-c-brand-1);
}
Expand Down
2 changes: 0 additions & 2 deletions packages/docs/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Frontend:

- `packages/component`: The `EmbeddingView` and `EmbeddingViewMosaic` components.

- `packages/table`: The `Table` component.

- `packages/viewer`: The frontend application for visualizing embedding and other columns. It also provides the `EmbeddingAtlas` component that can be embedded in other applications.

- `packages/density-clustering`: The density clustering algorithm, written in Rust.
Expand Down
16 changes: 8 additions & 8 deletions packages/docs/examples/examples.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const examples: Record<string, Example[]> = {
{ type: "encoding.normalize", attribute: "y", layer: [0, 1], options: ["x"] },
],
},
5: { type: "table", title: "Table", columns: ["title", "country", "province", "description", "points", "price", "variety", "designation", "projection_x", "projection_y", "neighbors"] },
5: { type: "instances", title: "Table" },
6: { type: "count-plot", title: "country", data: { field: "country" } },
7: { type: "count-plot", title: "province", data: { field: "province" } },
8: {
Expand Down Expand Up @@ -99,7 +99,7 @@ const examples: Record<string, Example[]> = {
charts: {
1: { type: "embedding", title: "Embedding", data: { x: "projection_x", y: "projection_y", text: "Abstract", category: "Conference" } },
2: { type: "predicates", title: "SQL Predicates" },
3: { type: "table", title: "Table", columns: ["Year", "Conference", "Title", "Abstract", "Link", "PaperType", "Award", "AuthorNames_Deduped", "AuthorAffiliation", "AuthorKeywords", "AminerCitationCount", "CitationCount_CrossRef", "PubsCited_CrossRef", "projection_x", "projection_y", "neighbors"] },
3: { type: "instances", title: "Table" },
4: {
title: "Year",
layers: [
Expand Down Expand Up @@ -171,7 +171,7 @@ const examples: Record<string, Example[]> = {
charts: {
1: { type: "embedding", title: "Embedding", data: { x: "projection_x", y: "projection_y", text: "question", category: "subject_name" } },
2: { title: "topic_name", type: "count-plot", data: { field: "topic_name" } },
3: { type: "table", title: "Table", columns: ["id", "question", "opa", "opb", "opc", "opd", "cop", "choice_type", "exp", "subject_name", "topic_name", "projection_x", "projection_y", "neighbors"] },
3: { type: "instances", title: "Table" },
4: { type: "count-plot", title: "subject_name", data: { field: "subject_name" } },
},
layout: "dashboard",
Expand Down Expand Up @@ -204,7 +204,7 @@ const examples: Record<string, Example[]> = {
version: "0.15.0",
charts: {
1: { type: "embedding", title: "Embedding", data: { x: "projection_x", y: "projection_y", text: "question", category: "discipline" } },
2: { type: "table", title: "Table", columns: ["uuid", "question", "options", "answer", "answer_letter", "discipline", "field", "subfield", "difficulty", "is_calculation", "projection_x", "projection_y", "neighbors"] },
2: { type: "instances", title: "Table" },
3: { type: "count-plot", title: "discipline", data: { field: "discipline" } },
4: { type: "count-plot", title: "field", data: { field: "field" } },
5: { type: "count-plot", title: "subfield", data: { field: "subfield" } },
Expand Down Expand Up @@ -256,7 +256,7 @@ const examples: Record<string, Example[]> = {
{ type: "scale.type", channel: "y" },
],
},
2: { type: "table", title: "Table", columns: ["Title", "US Gross", "Worldwide Gross", "US DVD Sales", "Production Budget", "Release Date", "MPAA Rating", "Running Time min", "Distributor", "Source", "Major Genre", "Creative Type", "Director", "Rotten Tomatoes Rating", "IMDB Rating", "IMDB Votes"] },
2: { type: "instances", title: "Table" },
3: {
title: "US Gross",
layers: [
Expand Down Expand Up @@ -368,7 +368,7 @@ const examples: Record<string, Example[]> = {
version: "0.15.0",
charts: {
1: { type: "predicates", title: "SQL Predicates" },
2: { type: "table", title: "Table", columns: ["image", "question", "choices", "answer", "hint", "task", "grade", "subject", "topic", "category", "skill", "lecture", "solution"] },
2: { type: "instances", title: "Table" },
3: {
title: "grade, topic",
plotSize: { height: 350 },
Expand Down Expand Up @@ -415,7 +415,7 @@ const examples: Record<string, Example[]> = {
{ type: "encoding.normalize", attribute: "y", layer: [0, 1], options: ["x"] },
],
},
2: { type: "table", title: "Table", columns: ["age", "workclass", "fnlwgt", "education", "education.num", "marital.status", "occupation", "relationship", "race", "sex", "capital.gain", "capital.loss", "hours.per.week", "native.country", "income"] },
2: { type: "instances", title: "Table" },
3: { title: "Sex", type: "count-plot", data: { field: "sex" } },
4: { type: "count-plot", title: "Workclass", data: { field: "workclass" } },
5: { title: "Age (CDF) by Income", layers: [{ mark: "line", filter: "$filter", encoding: { x: { aggregate: "ecdf-value", field: "age" }, y: { aggregate: "ecdf-rank" }, color: { field: "education" } } }], selection: { brush: { encoding: "x" } }, widgets: [{ type: "scale.type", channel: "x" }] },
Expand Down Expand Up @@ -479,7 +479,7 @@ const examples: Record<string, Example[]> = {
{ type: "encoding.normalize", attribute: "y", layer: [0, 1], options: ["x"] },
],
},
2: { type: "table", title: "Table", columns: ["MedInc", "HouseAge", "AveRooms", "AveBedrms", "Population", "AveOccup", "Latitude", "Longitude", "MedHouseVal"] },
2: { type: "instances", title: "Table" },
3: {
title: "MedInc",
layers: [
Expand Down
1 change: 0 additions & 1 deletion packages/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Embedding Atlas is released as two packages:
- All of these approaches allow you to compute embeddings (with custom models) and projections.

- An npm package `embedding-atlas` that exposes the user interface components as API so you can use them in your own applications. Below are the exposed components:
- [Table](./table.md)
- [EmbeddingView](./embedding-view.md)
- [EmbeddingViewMosaic](./embedding-view-mosaic.md)
- [EmbeddingAtlas](./embedding-atlas.md)
Expand Down
106 changes: 0 additions & 106 deletions packages/docs/table.md

This file was deleted.

Loading