| ragnar_store_atlas | R Documentation |
Visualize a store using Embedding Atlas
ragnar_store_atlas(
store,
...,
host = "localhost",
port = 3030,
launch.browser = interactive()
)
store |
A |
... |
Passed to |
host |
Host to run the Embedding Atlas server on. |
port |
Port to run the Embedding Atlas server on. |
launch.browser |
Whether to launch the browser automatically. |
This function requires the embedding-atlas Python package (>= 0.20.0)
in your reticulate Python environment, the duckdb R package (>= 1.4.0),
and nanoarrow (>= 0.8.0) to transfer data from the DuckDB store to Python.
## Not run:
# Start Ollama, then run this in a terminal:
# ollama pull embeddinggemma:300m-qat-q4_0
# Create an in-memory store using local embeddings
store <- ragnar_store_create(
embed = embed_ollama(model = "embeddinggemma:300m-qat-q4_0")
)
# Read and embed a chapter from R for Data Science
chunks <- "https://r4ds.hadley.nz/data-transform.html" |>
read_as_markdown() |>
markdown_chunk()
ragnar_store_insert(store, chunks)
# Launch the Embedding Atlas app
# Interrupt R (Esc or Ctrl+C) to stop the server
ragnar_store_atlas(store)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.