srowley

srowley

GGity - another plotting library

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.

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

Most Liked

srowley

srowley

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 #3
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

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

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).

srowley

srowley

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).

Where Next?

Popular in Libraries Top

kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
574 16576 179
New
tmbb
I’ve been working on two packages (not on hex.pm yet) to build admin interfaces for phoenix apps: bureaucrat - which contains a bunch ...
New
Crowdhailer
The latest release of Ace (0.10.0) includes serving content over HTTP/2. I have started writing a webserver to teach my self more about...
New
mbuhot
Leverage Open Api 3.0 (Swagger) to document, test, validate and explore your Plug and Phoenix APIs. Generate and serve a JSON Open API ...
New
michalmuskala
Another small library today. PersistentEts Hex: persistent_ets | Hex GitHub: GitHub - michalmuskala/persistent_ets Ets table backed by...
New
New
Crowdhailer
I have been updating a library that allows you to pipe between functions that use the erlang result tuple convention. Assuming you have...
New
engineeringdept
I’ve just released the first version of Snap, an Elasticsearch client. It borrows ideas about application structure and process managemen...
New
anshuman23
Hello all, I have been working on my proposed project called Tensorflex as part of Google Summer of Code 2018.. Tensorflex can be used f...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Sub Categories:

We're in Beta

About us Mission Statement