| ▲ | getnormality 10 hours ago | ||||||||||||||||||||||||||||
I skimmed the article for an explanation of why this is needed, what problem it solves, and didn't find one I could follow. Is the point that we want to be able to ask for visualizations directly against tables in remote SQL databases, instead of having to first pull the data into R data frames so we can run ggplot on it? But why create a new SQL-like language? We already have a package, dbplyr, that translates between R and SQL. Wouldn't it be more direct to extend ggplot to support dbplyr tbl objects, and have ggplot generate the SQL? Or is the idea that SQL is such a great language to write in that a lot of people will be thrilled to do their ggplots in this SQL-like language? EDIT: OK, after looking at almost all of the documentation, I think I've finally figured it out. It's a standalone visualization app with a SQL-like API that currently has backends for DuckDB and SQLite and renders plots with Vegalite. They plan to support more backends and renderers in the future. As a commenter below said, it's supposed to help SQL specialists who don't know Python or R make visualizations. | |||||||||||||||||||||||||||||
| ▲ | nchagnet 9 hours ago | parent | next [-] | ||||||||||||||||||||||||||||
I was quite psyched when I read this so maybe I can tell you why it's interesting to me, although I agree the announcement could have done a better job at it. In my experience, the only thing data fields share is SQL (analysts, scientists and engineers). As you said, you could do the same in R, but your project may not be written in R, or Python, but it likely uses an SQL database and some engine to access the data. Also I've been using marimo notebooks a lot of analysis where it's so easy to write SQL cells using the background duckdb that plotting directly from SQL would be great. And finally, I have found python APIs for plotting to be really difficult to remember/get used to. The amount of boilerplate for a simple scatterplot in matplotlib is ridiculous, even with a LLM. So a unified grammar within the unified query language would be pretty cool. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ▲ | epgui 6 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
This isn't about ggplot (or any particular library) per se, it's about using a flavour of SQL with a grammar of graphics: https://en.wikipedia.org/wiki/Wilkinson%27s_Grammar_of_Graph... What makes it interesting is the interface (SQL) coupled with the formalism (GoG). The actual visualization or runtime is an implementation detail (albeit an important one). | |||||||||||||||||||||||||||||
| ▲ | oofbey 5 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
There’s certainly some benefit in a declarative language for creating charts from SQL. Obviously this doesn’t do anything that you can’t also do easily in R or Python / matplotlib using about the same number of lines of code. But safely sandboxing those against malicious input is difficult. Whereas with a declarative language like this you could host something where an untrusted user enters the ggsql and you give them the chart. So it’s something. But for most uses just prompting your favorite LLM to generate the matplotlib code is much easier. | |||||||||||||||||||||||||||||
| ▲ | nojito 10 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||
It seems to be for sql users who don’t know python or r. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||