@dataelvisliang/embedding-atlas 0.15.0-highlight.1 → 0.15.0-highlight.2

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.
package/README.md CHANGED
@@ -1,16 +1,83 @@
1
- # Embedding Atlas Library
1
+ # @dataelvisliang/embedding-atlas
2
2
 
3
- - Documentation: https://apple.github.io/embedding-atlas
4
- - GitHub: https://github.com/apple/embedding-atlas
3
+ Fork of [embedding-atlas](https://github.com/apple/embedding-atlas) with **highlight prop support** for programmatic point highlighting.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @dataelvisliang/embedding-atlas
9
+ ```
10
+
11
+ ## What's Different
12
+
13
+ This fork adds a `highlight` prop that allows you to programmatically highlight specific points on the embedding visualization with orange circles (same visual treatment as the built-in search).
14
+
15
+ ### New Feature: `highlight` prop
16
+
17
+ ```tsx
18
+ import { EmbeddingAtlas } from '@dataelvisliang/embedding-atlas/react';
19
+
20
+ // Highlight specific points by their row IDs
21
+ <EmbeddingAtlas
22
+ highlight={[1, 2, 3, 4, 5]} // Array of row IDs to highlight
23
+ // ... other props
24
+ />
25
+
26
+ // Clear highlight
27
+ <EmbeddingAtlas
28
+ highlight={null}
29
+ // ... other props
30
+ />
31
+ ```
32
+
33
+ ### Use Cases
5
34
 
6
- ```js
7
- // Embedding View component (just the embedding view)
8
- import { EmbeddingView } from "embedding-atlas";
9
- import { EmbeddingViewMosaic } from "embedding-atlas";
35
+ - **AI/LLM Integration**: Highlight points returned by an AI agent's search queries
36
+ - **External Filters**: Show results from custom search or filter logic
37
+ - **Coordinated Views**: Link selections from other visualizations to the embedding map
38
+ - **Automated Workflows**: Programmatically direct user attention to specific data points
10
39
 
11
- // Embedding Atlas component
12
- import { EmbeddingAtlas } from "embedding-atlas";
40
+ ## Usage
13
41
 
14
- // UMAP and KNN algorithms
15
- import { createUMAP, createKNN } from "embedding-atlas";
42
+ ```tsx
43
+ import { EmbeddingAtlas } from '@dataelvisliang/embedding-atlas/react';
44
+ import { coordinator, wasmConnector } from '@uwdata/mosaic-core';
45
+
46
+ // Initialize coordinator
47
+ const c = coordinator();
48
+ await c.databaseConnector(await wasmConnector());
49
+ await c.exec(`CREATE TABLE data AS SELECT * FROM 'data.parquet'`);
50
+
51
+ // Use the component
52
+ <EmbeddingAtlas
53
+ coordinator={c}
54
+ data={{
55
+ table: "data",
56
+ id: "__row_index__",
57
+ text: "description",
58
+ projection: { x: "x", y: "y" },
59
+ neighbors: "neighbors"
60
+ }}
61
+ highlight={highlightedIds} // NEW: programmatic highlighting
62
+ />
63
+ ```
64
+
65
+ ## Upstream Compatibility
66
+
67
+ This fork tracks the official [apple/embedding-atlas](https://github.com/apple/embedding-atlas) repository. The highlight feature is proposed in [PR #143](https://github.com/apple/embedding-atlas/pull/143).
68
+
69
+ Once the PR is merged upstream, you can switch back to the official package:
70
+
71
+ ```bash
72
+ npm uninstall @dataelvisliang/embedding-atlas
73
+ npm install embedding-atlas
16
74
  ```
75
+
76
+ ## Original Documentation
77
+
78
+ - Documentation: https://apple.github.io/embedding-atlas
79
+ - GitHub: https://github.com/apple/embedding-atlas
80
+
81
+ ## License
82
+
83
+ MIT (same as upstream)