embedumap
embedumap builds a standalone index.html scatterplot from a CSV using Gemini embeddings, UMAP, and clustering.
Install / run
uvx --from "git+https://github.com/sanand0/embedumap.git@main" embedumap ...
Examples
Dry run:
uv run embedumap samples/blog-text.csv \
--embedding-columns text \
--color-columns primary_category,year \
--filter-columns primary_category,year \
--timeline-column year \
--dry-run
Build a text map:
uv run embedumap samples/blog-text.csv \
--embedding-columns text \
--color-columns primary_category,year \
--filter-columns primary_category,year \
--timeline-column year
Build a text map with short LLM cluster names:
uv run embedumap samples/blog-text.csv \
--embedding-columns text \
--color-columns primary_category,year \
--filter-columns primary_category,year \
--timeline-column year \
--branding "My map" \
--opacity 0.7 \
--bar-chart-corner bottom-left \
--cluster-names
Build a text map without LLM-interpreted axis labels:
uv run embedumap samples/blog-text.csv \
--embedding-columns text \
--color-columns primary_category,year \
--filter-columns primary_category,year \
--timeline-column year \
--no-axis-labels
Build an image-first map:
uv run embedumap samples/calvin-images.csv \
--image-columns file \
--max-image-size 768 \
--timeline-column date \
--popup-style grid
Build trails from time-bucket centroids:
uv run embedumap samples/blog-text.csv \
--embedding-columns text \
--color-columns primary_category \
--filter-columns primary_category,year \
--timeline-column year \
--trails
Build trails for selected grouping columns with a custom bucket size:
uv run embedumap samples/blog-text.csv \
--embedding-columns text \
--color-columns primary_category \
--filter-columns primary_category,year \
--timeline-column year \
--trails primary_category \
--trail-period yearly
Build an audio-first map:
uv run embedumap /path/to/audio.csv \
--audio-columns clip \
--audio-metadata-columns title,speaker \
--filter-columns speaker \
--popup-style list
No-clone public smoke test:
uvx --from "git+https://github.com/sanand0/embedumap.git@main" embedumap https://raw.githubusercontent.com/sanand0/embedumap/main/samples/blog-text-300.csv --embedding-columns text --color-columns primary_category,year --filter-columns primary_category,year --timeline-column year
Notes
- Put
GEMINI_API_KEYin.envor the environment. - The generated HTML embeds data inline and uses direct image/audio references when media columns are provided.
--brandingcontrols the top-left page label,--opacitysets active point opacity,--inactive-opacitysets point opacity outside filters or timeline range, and--trail-opacitysets trail opacity.--bar-chart-cornermoves the overlay bar chart betweentop-left,top-right,bottom-left, andbottom-right.- Axis labels are interpreted by Gemini by default using
--cluster-naming-model; use--no-axis-labelsto keepUMAP 1andUMAP 2. --max-image-size Nresizes embedded image payloads to fit inside anNbyNtile without changing aspect ratio. There is no default resize; use768to match the Gemini embedding models' tile size.- Embeddings are cached by default in
embedumap.duckdbnext to the output HTML. --batch-size Ncontrols how many rows are sent per embedding request. Increase it to speed up builds when your Gemini quota allows larger batches.--cluster-namesadds a lightweight Gemini naming pass after deterministic clustering.--trailsdraws paths through time-bucket centroids. With no value it draws cluster trails; with values like--trails primary_category,cluster, it also draws those group trails.--trail-periodoverrides the automatic bucket size. Examples:1min,1h,2h 15min,daily,weekly,2Q,yearly.- Trail playback uses a play button, cumulative toggle, logarithmic speed slider, and inactive opacity slider for dimmed nodes and trails. Trails start off in the UI; timeline range, trail visibility, playback mode, speed, and inactive opacity are shareable in the URL.
- The pipeline still stays intentionally small: no thumbnails, no sidecar JSON, no transcription pipeline.
Embedding cache
Embeddings are cached by default in embedumap.duckdb next to the generated HTML output. Each row cache key is a SHA-256 hash of stable JSON containing:
- the cache version,
- the source label,
- the row index,
- a content hash of the normalized text payload, audio metadata text, image signatures, and audio signatures,
- the embedding model,
- the embedding dimensions,
- and
--max-image-sizewhen the row includes images.
To regenerate an HTML file using existing embeddings, rerun with the same embedding inputs, model, dimensions, and image resize setting. For text/audio-only rows, existing cache entries are also reused by content across source paths or row positions; image rows retain exact cache-key matching because resize settings affect their embeddings. Visualization-only changes such as colors, filters, timeline controls, trails, opacity, branding, and popup options reuse cached embeddings. If you write the HTML to a different directory, move or copy the existing embedumap.duckdb beside the new output file before rerunning.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file embedumap-0.1.1.tar.gz.
File metadata
- Download URL: embedumap-0.1.1.tar.gz
- Upload date:
- Size: 139.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72a7bbf44ed48aeb25b98dd2082f1f42e6fb42c3ec6cc52dab5aba5c95458b63
|
|
| MD5 |
0cff2866464b129b647a085df059e965
|
|
| BLAKE2b-256 |
d9f665bbe135a7e943f70de37f9624611e25ede2e451b1f5a93cf5271ed6407e
|
File details
Details for the file embedumap-0.1.1-py3-none-any.whl.
File metadata
- Download URL: embedumap-0.1.1-py3-none-any.whl
- Upload date:
- Size: 39.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bc64c9bd9f7b2e9d244b6d162c1899718fb9260fc4fbd2824e33014457eab8b
|
|
| MD5 |
657afa20720a94eb4a49c1ff844d9924
|
|
| BLAKE2b-256 |
14f382eeb6d692f26aaee79a63b988f2146e83c98f33fcc9d7fbec3f2173bebf
|