{"id":28963399,"url":"https://github.com/pnezis/tucan","last_synced_at":"2025-06-24T04:09:46.183Z","repository":{"id":191059618,"uuid":"582603898","full_name":"pnezis/tucan","owner":"pnezis","description":"An Elixir plotting library on top of VegaLite","archived":false,"fork":false,"pushed_at":"2025-06-22T12:31:41.000Z","size":2337,"stargazers_count":219,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-22T13:32:41.883Z","etag":null,"topics":["elixir","hacktoberfest","plotting","vega-lite"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/tucan/Tucan.html","language":"Elixir","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/pnezis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-12-27T10:39:42.000Z","updated_at":"2025-06-22T12:31:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"78fc5fbb-e521-4517-adac-071e09f5c4de","html_url":"https://github.com/pnezis/tucan","commit_stats":null,"previous_names":["pnezis/tucan"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/pnezis/tucan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnezis%2Ftucan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnezis%2Ftucan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnezis%2Ftucan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnezis%2Ftucan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnezis","download_url":"https://codeload.github.com/pnezis/tucan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnezis%2Ftucan/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261601527,"owners_count":23183097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["elixir","hacktoberfest","plotting","vega-lite"],"created_at":"2025-06-24T04:09:45.642Z","updated_at":"2025-06-24T04:09:46.165Z","avatar_url":"https://github.com/pnezis.png","language":"Elixir","funding_links":[],"categories":["Data Visualization"],"sub_categories":[],"readme":"# Tucan\n\n[![Actions Status](https://github.com/pnezis/tucan/actions/workflows/elixir.yml/badge.svg)](https://github.com/pnezis/tucan/actions)\n[![Hex.pm](https://img.shields.io/hexpm/v/tucan.svg)](https://hex.pm/packages/tucan)\n[![hex.pm](https://img.shields.io/hexpm/dt/tucan.svg)](https://hex.pm/packages/tucan)\n[![hex.pm](https://img.shields.io/hexpm/l/tucan.svg)](https://hex.pm/packages/tucan)\n[![Documentation](https://img.shields.io/badge/-Documentation-blueviolet)](https://hexdocs.pm/tucan/Tucan.html)\n[![github.com](https://img.shields.io/github/last-commit/pnezis/tucan.svg)](https://github.com/pnezis/tucan)\n\n`Tucan` is an Elixir plotting library built on top of `VegaLite`, designed to simplify\nthe creation of interactive and visually stunning plots. With `Tucan`, you can effortlessly\ngenerate a wide range of plots, from simple bar charts to complex composite plots,\nall while enjoying the power and flexibility of a clean composable functional API.\n\n`Tucan` offers a simple API for creating most common plot types similarly to `matplotlib`\nand `seaborn` without requiring the end user to be familiar with the Vega Lite grammar.\n\n![Tucan](https://github.com/pnezis/tucan/raw/main/assets/tucan.png)\n\n## Features\n\n- **Versatile Plot Types** - `Tucan` provides an array of plot types, including\n  bar charts, line plots, scatter plots, histograms, and more, allowing you to\n  effectively represent diverse data sets.\n- **Clean and consistent API** - A clean and consistent plotting API similar to `matplotlib`\n  or `seaborn` is provided. You should be able to create most common plots with\n  a single function call and minimal configuration.\n- **Grouping and Faceting** - Enhance your visualizations with grouping and faceting\n  features, enabling you to examine patterns and trends within subgroups of your\n  data.\n- **Customization** - Customize your plots with ease using Tucan's utilities for\n  adjusting\n  plot dimensions, titles, and **themes**.\n- **Thin wrapper on top of VegaLite** - All `VegaLite` functions can be used\n  seamlessly with `Tucan` in order to enhance/customize your plots.\n- **`Nx` support** - You can pass directly `Nx` tensors in all plot functions.\n- **Low level API** - A low level API with helper functions is provided for modifying\n  `VegaLite` specifications.\n\n## Basic usage\n\n```elixir\n# A simple scatter plot\nTucan.scatter(:iris, \"petal_width\", \"petal_length\")\n\n# You can combine it with one or more semantic grouping functions\nTucan.scatter(:iris, \"petal_width\", \"petal_length\")\n|\u003e Tucan.color_by(\"species\")\n|\u003e Tucan.shape_by(\"species\")\n\n# You can pipe it through other Tucan functions to modify the look \u0026 feel\nTucan.bubble(:gapminder, \"income\", \"health\", \"population\",\n  color_by: \"region\",\n  tooltip: true\n)\n|\u003e Tucan.set_width(400)\n|\u003e Tucan.Axes.set_x_title(\"Gdp per Capita\")\n|\u003e Tucan.Axes.set_y_title(\"Life expectancy\")\n|\u003e Tucan.Scale.set_x_scale(:log)\n\n# Some composite plots are also supported\nfields = [\"petal_width\", \"petal_length\", \"sepal_width\", \"sepal_length\"]\n\nTucan.pairplot(:iris, fields, width: 130, height: 130)\n|\u003e Tucan.color_by(\"species\", recursive: true)\n\n# creating facet plots is very easy with the facet_by/4 function\nTucan.scatter(:iris, \"petal_width\", \"petal_length\")\n|\u003e Tucan.facet_by(:column, \"species\")\n|\u003e Tucan.color_by(\"species\")\n```\n\nRead the [docs](https://hexdocs.pm/tucan/Tucan.html) for more examples.\n\n## Installation\n\n### Inside Livebook\n\nYou most likely want to use Tucan in [Livebook](https://github.com/livebook-dev/livebook),\nin which case you can call `Mix.install/2`:\n\n```elixir\nMix.install([\n  {:tucan, \"~\u003e 0.3.0\"},\n  {:kino_vega_lite, \"~\u003e 0.1.8\"}\n])\n```\n\nYou will also want [kino_vega_lite](https://github.com/livebook-dev/kino_vega_lite) to ensure\nLivebook renders the graphics nicely.\n\n### In Mix projects\n\nYou can add the `:tucan` dependency to your `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:tucan, \"~\u003e 0.4.0\"}\n  ]\nend\n```\n\n**NOTE:** While I will try to maintain backwards compatibility as much as possible,\nsince this is still a 0.x.x project the API is not considered stable and thus\nsubject to possible breaking changes up until v1.0.0.\n\n## Acknowledgements\n\n- [vega-lite](https://vega.github.io/vega-lite/) and the awesome docs of it, many\n  examples and most of the datasets used are based on it.\n- The elixir [VegaLite](https://github.com/livebook-dev/vega_lite) bindings\n- [seaborn](https://seaborn.pydata.org/), [matplotlib](https://matplotlib.org/) and\n  [ggplot2](https://ggplot2.tidyverse.org/) upon which the high level API is partially\n  based.\n- [vega-themes](https://github.com/vega/vega-themes) from which the existing themes\n  are ported.\n\n## License\n\nCopyright (c) 2023 Panagiotis Nezis\n\nTucan is released under the MIT License. See the [LICENSE](LICENSE) file for more\ndetails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnezis%2Ftucan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpnezis%2Ftucan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnezis%2Ftucan/lists"}