Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brucala/deneb.jl

Julia API for creating Vega-Lite visualizations
https://github.com/brucala/deneb.jl

altair charts interactive-visualizations julia-language plots plotting vega-lite visual-analysis visualization visualization-grammar

Last synced: 6 days ago
JSON representation

Julia API for creating Vega-Lite visualizations

Awesome Lists containing this project

README

        

# Deneb.jl

Deneb.jl logo

[![Tests](https://github.com/brucala/Deneb.jl/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/brucala/Deneb.jl/actions/workflows/test.yml?branch=main)
[![Docs](https://img.shields.io/badge/docs-dev-blue.svg)](https://brucala.github.io/Deneb.jl/dev/)
[![Coverage](https://codecov.io/gh/brucala/Deneb.jl/branch/main/graph/badge.svg)](https://app.codecov.io/gh/brucala/Deneb.jl/tree/main)

**Deneb** is the brightest star in the constellation of the *Cygnus*, and together with **Vega** and **Altair** they form the *Summer Triangle* asterism.

**Deneb.jl** is a convenient Julia API for creating [Vega-Lite](https://vega.github.io/vega-lite/) visualizations, with high inspiration from Python's [Vega-Altair](https://altair-viz.github.io/).

## Quickstart

```julia
using Deneb
cars = "https://vega.github.io/vega-datasets/data/cars.json"
Data(url=cars) * Mark(:point) * Encoding(
"Horsepower:q",
"Miles_per_Gallon:q",
color=:Origin
)
```
![](images/scatter_plot.png)

See the [Gallery](https://brucala.github.io/Deneb.jl/dev/examples/) for more examples.

## Why Deneb.jl?

The excellent [VegaLite.jl](https://github.com/queryverse/VegaLite.jl/tree/master) package, with Julia bindings to Vega-Lite, already exists in the Julia ecosystem. So, why create yet another package to accomplish the same thing?

VegaLite.jl allows for the creation of virtually any possible Vega-Lite specification in an elegant manner. However, its strategy for composing plots can be somewhat confusing and obscure (refer to this VegaLite.jl [issue](https://github.com/queryverse/VegaLite.jl/issues/230) for more details). In response to this, I proposed an alternative composition strategy in [this PR](https://github.com/queryverse/VegaLite.jl/pull/411). This, along with an excuse to start a personal project to further explore the Julia language, served as the main motivation to start creating Deneb.jl.

**Deneb.jl is not intended as a replacement for VegaLite.jl**. VegaLite.jl benefits from the attention of numerous contributors with vast experience in creating and maintaining Julia packages. In contrast, I am simply a Julia and Vega-Lite enthusiast with limited time to explore Julia's capabilities in my free time. However, if Deneb.jl attracts some interest, I'm willing to continue improving its documentation and other aspects of the package. Of course, contributions from others are always welcome.

Below a list of good and not-so-good things about Deneb.jl:
- It provides a coherent API that allows for a convenient and intuitive construction of any Vega-Lite visualization.
- Layering and composing single and multi-view charts is intuitive using the operators `+` (familiar to [Altair](https://altair-viz.github.io/) users) and `*` (familiar to [AlgebraOfGraphics.jl](https://github.com/MakieOrg/AlgebraOfGraphics.jl) users).
- While the documentation may currently lack completeness and coherence, there is a comprehensive set of examples available in the [Gallery](https://brucala.github.io/Deneb.jl/dev/examples/) section. These examples should serve as a valuable resource to enable any user already familiar with Vega-Lite and/or Altair.
- I initially started this project as an exercise to learn more about Julia. Therefore, the internal design of Deneb.jl was primarily driven by my personal learning appetite at the time and might not represent the optimal or most idiomatic design choices. However, things just work.
- There are numerous tests in place, although the test coverage is not yet close to 100% in any way.