{"id":51515089,"url":"https://github.com/jedick/plotmydata","last_synced_at":"2026-07-08T10:31:11.320Z","repository":{"id":308819431,"uuid":"1034212975","full_name":"jedick/plotmydata","owner":"jedick","description":"Use AI agents to access, transform, and plot your data. With a live demo and growing evaluation set.","archived":false,"fork":false,"pushed_at":"2026-01-26T10:48:38.000Z","size":264,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-27T00:36:31.097Z","etag":null,"topics":["adk","agents","data","evals","graphics","huggingface","plotting","r"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jedick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-08T03:20:47.000Z","updated_at":"2026-01-26T10:48:43.000Z","dependencies_parsed_at":"2025-10-16T10:11:49.767Z","dependency_job_id":"9664cb61-bf5f-423d-89b4-1bb67bf84c0f","html_url":"https://github.com/jedick/plotmydata","commit_stats":null,"previous_names":["jedick/invent-agents-and-r","jedick/plotmydata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jedick/plotmydata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedick%2Fplotmydata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedick%2Fplotmydata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedick%2Fplotmydata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedick%2Fplotmydata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedick","download_url":"https://codeload.github.com/jedick/plotmydata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedick%2Fplotmydata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35262336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adk","agents","data","evals","graphics","huggingface","plotting","r"],"created_at":"2026-07-08T10:31:11.227Z","updated_at":"2026-07-08T10:31:11.311Z","avatar_url":"https://github.com/jedick.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PlotMyData\n\n[![Open in HF Spaces](https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-lg-dark.svg)](https://huggingface.co/spaces/jedick/plotmydata)\n\nPlotMyData is an agentic data analysis and visualization system.\nIt follows your prompts to drive an [R] session.\n\nYou can start with example datasets, upload your own data, or download data from a URL.\nIf you want to ask about the data or transform it before plotting, just say what you want to do.\n\n![Animation of using PlotMyData to plot, download, upload, and explore data](https://chnosz.net/guest/plotmydata/animation-2.gif)\n\n## Features\n\n- Multiple data sources: Use built-in [R datasets] or user-provided data (currently CSV files are supported)\n- Interactive analysis: The system uses an R session so variables persist across invocations\n- Instant visualization: Plots are shown in the chat interface and are downloadable as PNG files\n\n### Agents and tools refined through many usage trials\n\n- *Help tools*\n  - Provide access to help pages for packages and topics\n- *Data agent*\n  - Knows about R datasets and can access uploaded files or URLs\n  - Data files are automatically summarized for the LLM\n  - *This lets you describe a plot without knowing the exact variable names*\n- *Run agent*\n  - Runs R code generated by the LLM\n  - If you want to run specific code, just send it in a message\n  - LLM chooses invisible or visible results depending on requirements\n- *Plot agent*\n  - Tools are provided for making plots with base [R graphics] (default) and [ggplot2]\n  - *To use ggplot2, just mention \"ggplot\" or \"ggplot2\" in your message*\n- *Install agent*\n  - Installs CRAN packages to add capabilities to the running application\n  - Can be called by other agents or requested by the user\n  - User confirmation is required for installing any packages\n\n## Running the application\n\nThe application can be run with or without a container.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContainerless\u003c/strong\u003e\u003c/summary\u003e\n\n- Install R and run `install.packages(c(\"ellmer\", \"mcptools\", \"readr\", \"ggplot2\", \"tidyverse\"))`\n- Install Python with packages listed in `requirements.txt`\n- Put your OpenAI API key in a file named `secret.openai-api-key`\n- Execute `run_web.sh` to start an R session and launch the ADK web UI\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContainerized\u003c/strong\u003e\u003c/summary\u003e\n\nFirst, build the project.\nThis creates a `plotmydata` Docker Compose project and a `plotmydata-app` image.\n\n```sh\ndocker compose build\n```\n\nNow run the project.\nThis uses your OpenAI API key (`sk-proj-...`) from `secret.openai-api-key`.\n\n```sh\ndocker compose up\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eChanging the model\u003c/strong\u003e\u003c/summary\u003e\n\nIf you want to change the remote LLM from the default (gpt-4o), change it in the startup script (`run_web.sh` or `entrypoint.sh`).\n\nTo use a local LLM, install [Docker Model Runner] then run this command.\n\n```sh\ndocker compose -f compose.yaml -f model-runner.yaml up\n```\n\nSee `model-runner.yaml` to change the local LLM used.\n\u003c/details\u003e\n\n## Examples\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePlot data\u003c/strong\u003e\u003c/summary\u003e\n\n- *Plot radius_worst (y) vs radius_mean (x) from https://github.com/jedick/plotmydata/raw/refs/heads/main/evals/data/breast-cancer.csv. Add a blue 1:1 line and title \"Breast Cancer Wisconsin (Diagnostic)\".*\n\n![Plot of breast cancer data](https://chnosz.net/guest/plotmydata/breast-cancer.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ePlot functions\u003c/strong\u003e\u003c/summary\u003e\n\n- *Plot a Sierpiński Triangle*\n\n\u003cimg width=\"50%\" alt=\"Chat session with AI agent to plot a Sierpiński Triangle\" src=\"https://chnosz.net/guest/plotmydata/sierpinski-triangle.png\" /\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eInteractive analysis\u003c/strong\u003e\u003c/summary\u003e\n\n- *Save 100 random numbers from a normal distribution in x*\n- *Run y = x^2*\n- *Plot a histogram of y*\n\n![Histogram of squared normal random numbers](https://chnosz.net/guest/plotmydata/use-session.png)\n\u003c/details\u003e\n\n## Evaluations\n\nMost recent eval run: **74% accuracy** on 50 cases with GPT-4o.\n\n\u003cdetails\u003e\n\u003csummary\u003eEvals history\u003c/summary\u003e\n\nAccuracy = fraction of correct plots.\nPlot correctness is judged by a human.\n\n| Eval set | Size | Agent version | Accuracy | Notes |\n|-|-|-|-|-|\n| 04 | 50 | [1c3f5bd] | 0.74 | More base graphics and add Install agent: corrr, scatterplot3d, nlme, parcoord, kde, and custom plots\n| 03 | 40 | [24fb91f] | 0.75 | **Model: gpt-4o**\n| 03 | 40 | [b8e5f8c] | 0.38 | Add agent for loading and summarizing data\n| 03 | 40 | [30c22a1] | 0.50 | Handle uploaded CSV files\n| 02 | 37 | [e9180aa] | 0.49 | More base graphics: hist, image, lines, matplot, mosaicplot, pairs, rug, spineplot, plot.window\n| 01 | 27 | [e9180aa] | 0.52 | Add help tools to get R documentation\n| 01 | 27 | [bb4eead] | 0.41 | Mainly base graphics: barplot, boxplot, cdplot, coplot, contour, dotchart, filled.contour, grid (**Model: gpt-4o-mini**)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eEvals info\u003c/summary\u003e\n\nThe repo tracks both evaluation sets and prompt sets.\nFor example, the `evals/01` directory contains all results for the first evaluation set using different prompt sets.\nThe file name uses the short commit hash for the prompt set used for evaluation.\n\nEach eval consists of a query and reference code and image.\nBecause of their size, reference and generated images are not stored in this repo.\n\nTo run evals, copy the latest eval CSV file to `evals/evals.csv`.\nThen use e.g. `run_eval.sh 1` to run the first eval.\nThis script: 1) saves the tool calls, generated code, and current date to the CSV file and 2) saves the generated image to the `evals/generated` directory.\n\nAfter running evals, change to the `evals` directory and run `streamlit run view.py` to edit the eval CSV file.\nThis app allows:\n- Choosing an eval to edit\n- Viewing the reference and generated images side-by-side\n- Indicating whether the generated plot is correct (True or False)\n- Editing other eval data (e.g. query, file name for data upload, reference code, notes)\n- Adding new evals\n\n\u003c/details\u003e\n\n## Architecture\n\n- An [Agent Development Kit] client is connected to an MCP server from the [mcptools] R package\n- The startup scripts launch a persistent R session with some preloaded packages and helper functions\n- Data files are saved in a temporary directory using ADK's artifacts and callbacks\n  - This is how the R session can access the files\n\nContainer notes:\n\n- The Docker image is based on [rocker/r-ver] and adds R packages and a Python installation\n- [Docker Compose] is used for port mapping, secrets, and watching file changes with [Docker Watch]\n\n## Licenses\n\n- This code in repo is licensed under MIT\n- Some examples used in evals are taken from R and are licensed under GPL-2|GPL-3\n- `breast-cancer.csv` (from [UCI Machine Learning Repository] via [Kaggle]) is licensed under CC BY 4.0\n\n[R]: https://www.r-project.org/\n[R datasets]: https://stat.ethz.ch/R-manual/R-devel/library/datasets/html/00Index.html\n[R graphics]: https://stat.ethz.ch/R-manual/R-devel/library/graphics/html/00Index.html\n[ggplot2]: https://ggplot2.tidyverse.org/\n[Agent Development Kit]: https://google.github.io/adk-docs/\n[mcptools]: https://github.com/posit-dev/mcptools\n[Docker Model Runner]: https://docs.docker.com/ai/model-runner/\n[docker/compose-for-agents]: https://github.com/docker/compose-for-agents\n[rocker/r-ver]: https://rocker-project.org/images/versioned/r-ver\n[Docker Compose]: https://docs.docker.com/compose/\n[Docker Watch]: https://docs.docker.com/compose/how-tos/file-watch/\n[UCI Machine Learning Repository]: https://doi.org/10.24432/C5DW2B\n[Kaggle]: https://www.kaggle.com/datasets/yasserh/breast-cancer-dataset\n\n[1c3f5bd]: https://github.com/jedick/plotmydata/commit/1c3f5bd6c72c01ecddf2984c0bd1424144e6d82d\n[24fb91f]: https://github.com/jedick/plotmydata/commit/24fb91f7d810da7f0078c1b9cb13bf82dde61445\n[b8e5f8c]: https://github.com/jedick/plotmydata/commit/b8e5f8ce5e03360b9bde26ff32acb7180d969694\n[30c22a1]: https://github.com/jedick/plotmydata/commit/30c22a166a237bfe26413b6c28278a6c467a65a7\n[e9180aa]: https://github.com/jedick/plotmydata/commit/e9180aa363195fd2cc011e11e4febc0f544f7878\n[bb4eead]: https://github.com/jedick/plotmydata/commit/bb4eead2346d936f9c83108b16f20faf3e3c522c\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedick%2Fplotmydata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedick%2Fplotmydata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedick%2Fplotmydata/lists"}