--- title: 🌸 MONET UMAP emoji: πŸ—ΊοΈ colorFrom: pink colorTo: green sdk: static pinned: false license: apache-2.0 short_description: Interactive UMAP of the MONET dataset --- # MONET UMAP Static HF Space: interactive UMAP scatterplot of the [`jasperai/monet`](https://huggingface.co/datasets/jasperai/monet) dataset (~112M points), built with [Vite](https://vitejs.dev/) + [TypeScript](https://www.typescriptlang.org/) and rendered with [`deck.gl`](https://deck.gl/) (`OrthographicView` + WebGL `ScatterplotLayer`). - `points.parquet` and the spatially-sharded thumbnail shards live in [`jasperai/monet-umap-data`](https://huggingface.co/datasets/jasperai/monet-umap-data) and are read directly in the browser via [`hyparquet`](https://github.com/hyparam/hyparquet) + [`hyparquet-compressors`](https://github.com/hyparam/hyparquet-compressors) β€” full-file read for the points, HTTP byte-range reads for hover thumbnails. - Hover previews paint instantly from pre-baked low-res WebP atlas pages, then upgrade to full-res thumbs once the parquet range read resolves. - No backend: pure `static` HF Space SDK. ## Local dev ```bash npm install npm run dev # http://localhost:5173 ``` ## Build & deploy Deploys to [`jasperai/monet-umap`](https://huggingface.co/spaces/jasperai/monet-umap) (`static` SDK). The Space ships only `index.html` + the JS/CSS bundle (~775 kB); all data artifacts (`points.parquet`, `tiles/`, `atlases/`, `preview/`, `idx/`) are fetched at runtime from the HF bucket that `pipeline.py upload_dataset` syncs to. The bucket base URL is baked in at build time from `.env.production` (overridable by the gitignored `.env.production.local`). Run from the repo root (needs `HF_TOKEN` with write access to the Space): ```bash cd space # 1. Strip the dev-only symlink (space/public/data β†’ ./work). If left in place, # `vite build` deep-copies the whole work dir into dist/. rm -f public/data # 2. Build the static bundle and ship the HF Space frontmatter (this README). npm run build # tsc -b && vite build β†’ space/dist/ cp README.md dist/README.md # 3. Push dist/ to the Space (creates it on first run; static SDK). cd .. python -m data_prep.upload_to_hub --space --folder space/dist --repo-id jasperai/monet-umap ``` One-liner equivalent: ```bash (cd space && rm -f public/data && npm run build && cp README.md dist/README.md) \ && python -m data_prep.upload_to_hub --space --folder space/dist --repo-id jasperai/monet-umap ``` Notes: - The `upload_to_hub --space` command `upload_folder`s `dist/` with `delete_patterns=["*"]`, so the Space always mirrors the local build. Pass `--private` (honored only at create time) or `--squash-history` if needed. - To retarget the live Space at a different bucket prefix (e.g. `umap-1m`) without rebuilding, upload a `runtime-config.json` override β€” see the root `README.md` ("Retarget the deployed Space") for the full env/runtime resolution order.