gander

High performance, low friction LLM chat for data scientists

https://github.com/simonpcouch/gander

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

High performance, low friction LLM chat for data scientists

Basic Info
Statistics
  • Stars: 99
  • Watchers: 2
  • Forks: 8
  • Open Issues: 6
  • Releases: 1
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct Support

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# gander gander website


[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/gander)](https://CRAN.R-project.org/package=gander)
[![R-CMD-check](https://github.com/simonpcouch/gander/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/simonpcouch/gander/actions/workflows/R-CMD-check.yaml)


gander is a higher-performance and lower-friction chat experience for data scientists in RStudio and Positron--sort of like completions with Copilot, but it knows how to talk to the objects in your R environment. The package brings [ellmer](https://ellmer.tidyverse.org) chats into your project sessions, automatically incorporating relevant context and streaming their responses directly into your documents.

**Why not just chat?** In many ways, working with gander is just like using a chat interface online or via [shinychat](https://github.com/jcheng5/shinychat). The gander assistant will  automatically find the context it needs, though: 

* **Code context**: File contents from elsewhere in the project you're working on (e.g. the lines in your source file).
* **Environment context**: Variables, allowing the assistant to locate the column names and types in data frames you're working with, images linked to in your documents, and function definitions. This is what differentiates gander from many other assistants out there; gander can interface with your R session to describe your computational environment.

> **Important**
> 
> For now, gander is particularly effective in `.R` files but struggles to provide appropriately formatted responses in `.Qmd` and related file formats.

## Installation

You can install gander like so:

``` r
install.packages("gander")
```

To install the developmental version:

``` r
pak::pak("simonpcouch/gander")
```

Then, you'll need to hook gander up with an [ellmer chat](https://ellmer.tidyverse.org/). gander uses the `.gander_chat` option to configure which model powers the addin; just set the option to whatever your usual ellmer setup is. For example, we recommend Anthropic's Claude Sonnet 3.7, which you can use via `options(.gander_chat = ellmer::chat_anthropic())` once you've configured an `ANTHROPIC_API_KEY`. Paste that code in your `.Rprofile` via `usethis::edit_r_profile()` to always use the same model every time you start an R session. gander supports any model supported by ellmer, so you can use Anthropic's Claude, OpenAI's GPT-4o, local ollama models, etc. See "Choosing a model" in `vignette("gander", package = "gander")` to learn more.

The gander assistant is interfaced with the via the gander addin. For easiest access, we recommend registering the gander addin to a keyboard shortcut.

**In RStudio**, navigate to `Tools > Modify Keyboard Shortcuts > Search "gander"`—we suggest `Ctrl+Alt+G` (or `Ctrl+Cmd+G` on macOS).

**In Positron**, you'll need to open the command palette, run "Open Keyboard Shortcuts (JSON)", and paste the following into your `keybindings.json`:

```json
    {
        "key": "Ctrl+Cmd+G",
        "command": "workbench.action.executeCode.console",
        "when": "editorTextFocus",
        "args": {
            "langId": "r",
            "code": "gander::gander_addin()",
            "focus": true
        }
    }
```

The analogous keybinding on non-macOS is `Ctrl+Alt+G`. That said, change the `"key"` entry to any keybinding you wish!

Once those steps are completed, you're ready to use the gander assistant with a keyboard shortcut.

## Example

This screencast demonstrates using the gander addin to iterate on a plot:

```{r}
#| echo: false
#| fig-alt: "A screencast of an RStudio session. A script called example.R is open in the editor with lines library(ggplot2), data(stackoverflow), and stackoverflow. After highlighting, I trigger the addin and ask to plot the data in plain language, at which code to plot the data using ggplot2 is streamed from an LLM into the source file that uses the correct column names and a minimal style. From there, I iteratively call the addin to refine the output."
knitr::include_graphics("https://github.com/user-attachments/assets/4aead453-c2f2-446b-8e81-9154fd3baab0")
```

After loading the stackoverflow data into my environment, I highlight `stackoverflow` and type a plain language request to plot the data. The LLM's response—which provides a minimal solution and refers to correct column names—is streamed directly into my document and selected in whole. After visually inspecting, I run the code, and then retrigger the addin and type a followup request to refine the plot, doing so iteratively until I'm satisfied with my results.

To read more about using the addin, check out the Getting Started vignette with `vignette("gander", package = "gander")`.

Owner

  • Name: Simon P. Couch
  • Login: simonpcouch
  • Kind: user
  • Location: Baltimore, MD, USA
  • Company: Posit PBC (formerly RStudio)

he/him - statistical software @posit-pbc

GitHub Events

Total
  • Issues event: 101
  • Watch event: 75
  • Delete event: 3
  • Issue comment event: 67
  • Push event: 156
  • Pull request review event: 1
  • Pull request event: 9
  • Fork event: 9
  • Create event: 4
Last Year
  • Issues event: 101
  • Watch event: 75
  • Delete event: 3
  • Issue comment event: 67
  • Push event: 156
  • Pull request review event: 1
  • Pull request event: 9
  • Fork event: 9
  • Create event: 4

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 76
  • Total Committers: 2
  • Avg Commits per committer: 38.0
  • Development Distribution Score (DDS): 0.013
Past Year
  • Commits: 76
  • Committers: 2
  • Avg Commits per committer: 38.0
  • Development Distribution Score (DDS): 0.013
Top Committers
Name Email Commits
simonpcouch s****h@g****m 75
Garrick Aden-Buie g****k@a****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 57
  • Total pull requests: 11
  • Average time to close issues: 8 days
  • Average time to close pull requests: 3 days
  • Total issue authors: 16
  • Total pull request authors: 4
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 57
  • Pull requests: 11
  • Average time to close issues: 8 days
  • Average time to close pull requests: 3 days
  • Issue authors: 16
  • Pull request authors: 4
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • simonpcouch (39)
  • bshor (2)
  • kevinmcdermott062 (2)
  • CorneeldH (2)
  • alan-y (1)
  • sheitin (1)
  • CodingAndSharing (1)
  • jarbet (1)
  • sebdalgarno (1)
  • graysonwhite (1)
  • lgnbhl (1)
  • stevegbrooks (1)
  • teecrow (1)
  • shaunporwal (1)
  • foma4tune (1)
Pull Request Authors
  • simonpcouch (6)
  • gadenbuie (2)
  • CorneeldH (2)
  • EvaMaeRey (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 480 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: gander

High Performance, Low Friction Large Language Model Chat

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 480 Last month
Rankings
Dependent packages count: 27.2%
Dependent repos count: 33.5%
Average: 49.2%
Downloads: 87.0%
Maintainers (1)
Last synced: 11 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/live-api.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/pr-fetch v2 composite
  • r-lib/actions/pr-push v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • cli >= 3.6.3 imports
  • coro >= 1.1.0 imports
  • elmer * imports
  • glue >= 1.8.0 imports
  • miniUI >= 0.1.1.1 imports
  • rlang >= 1.1.4 imports
  • rstudioapi >= 0.17.1 imports
  • shiny >= 1.9.1 imports
  • gt * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
  • tibble * suggests
  • withr * suggests