srowley

srowley

Hello all,

I have been working on a charting library designed to support drawing SVG plots in Elixir using an API that is as close to ggplot2 as practical (you could call it a clone, but that would be an insult to the advanced stage of the science of cloning).

It currently supports point and line plots, but with a decent amount of options (bar charts are next). There are some examples in the README, and the project includes some mix tasks that generate several other examples. The README also explains in more detail my design goals and how GGity compares to the alternatives.

https://github.com/srowley/ggity

This is a personal project, but if anyone is interested in taking a look and offering feedback I would love to hear it.

Showing Posts 1 to 6

srowley

srowley OP

I have made enough progress to publish the latest version of GGity to Hex. This version implements ggplot’s layered approach to building up graphics; it also now supports bar charts, area/ribbon charts, data labels and custom themes.

I put together a demo here: GGity By Example. Thank you in advance for politely ignoring the Heroku free tier lag on first load.

Appreciate any feedback, and thanks to those whose forum responses have helped along the way!

srowley

srowley OP

Hi everyone - I just published version 0.4.

New features include:

  • LiveView support, via custom attributes - generate custom attributes for each shape on a plot. Those could be Phoenix event handlers, data bindings, Tailwind utility classes - it’s up to you. Attributes are created by passing a function that takes the plot and a row of data and returns a list of attributes to be attached to the shape representing that row on the plot
  • Boxplots - underappreciated in my view
  • Annotations - shortcut for adding a single text/line/rectangle element for including annotations on a plot
  • All of the ggplot2 point shapes (fillable and non-fillable) are available

The demo site has been updated with a simple LiveView example.

As always appreciate any feedback!

15
Post #2
josevalim

josevalim

Creator of Elixir

Hi @srowley, this looks great! As someone who has been looking into the R ecosystem lately, having something that is inspired by ggplot2 can be really helpful to welcome data science and ml folks that have familiarity with said tooling.

srowley

srowley OP

Version 0.5.0 published yesterday; only took two years! :grinning:

After letting it languish for some time, a few months ago I became interested in having GGity accept Explorer dataframes and also using Explorer under the hood for at least some transformations. The latest release of Explorer supported all the features needed to make that happen. That has been a fun library to work with; congrats and thanks to that team.

Edit: And of course, it also now includes a Livebook with examples (which is good because the demo site perished alongside the Heroku free tier).

bellerosejoey

bellerosejoey

As a former R user, I love what you’re doing here. What are your plans for gritty? Do you have a roadmap? Are you working to give it all the same features as ggplot2?

Keep up the great work! :+1:

srowley

srowley OP

Thanks for the kind words. I am a hobbyist and this is very much a hobby project, so I just kind of work on it when I have time, which has not been that often. Frankly I also recognize that the approach the community has taken with VegaLite is by far the more pragmatic and dependable, so I don’t feel like there is a desperate need for this. It’s just something I’m interested in and if others benefit from being aware of it that’s great.

I do have a roadmap but I don’t feel a huge obligation to follow it. Right now I think histograms should be next. Then I would like to do faceting but to do that right I will have to rework the general internal plot construction pipeline to more closely resemble what ggplot2 does, which could take awhile as I have only found bits and pieces explaining that (I can use R to do analysis but hardcore R programming is not strength I have, so reverse engineering is a challenge).

— All posts loaded —

Where Next? Top

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 15136 120
New
wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New

Other Trending Topics Top

mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
lawik
I was thinking since Goatmire Elixir turned out pretty good I should maybe do another one. 30th of Sep - 2nd of Oct this year./ The firs...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews