Skip to content

Commit 2de981e

Browse files
committed
Fix #236
1 parent b62e21a commit 2de981e

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

doc/get_started.qmd

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,24 @@ If you prefer to build from source or need the latest development version:
117117
ggsql-jupyter --install
118118
```
119119

120+
## The grammar of graphics
121+
ggsql is a tool for visualising data, combining our 20 years of experience developing [ggplot2](https://ggplot2.tidyverse.org/) with a SQL-native syntax.
122+
Unlike most visualisation systems, ggsql has an underlying grammar, based on the [Grammar of Graphics](https://en.wikipedia.org/wiki/Wilkinson%27s_Grammar_of_Graphics) by Leland Wilkinson.
123+
This is a different approach than the one taken by most tools, which give you a set of pre-defined graphics, like scatterplots, bar charts, and pie charts.
124+
ggsql instead gives you a number of independent components that you can combine to solve a very wide set of problems.
125+
126+
This means there's a learning curve to ggsql: you have to learn a few big ideas about the grammar before you can be productive.
127+
But we believe the payoff is worth it.
128+
The grammar gives you new vocabulary and new ways to think about visualizations.
129+
This allows you to create not only familiar graphics but also newer, better graphics.
130+
You'll gain the ability to look at a visualization that someone else has made, analyse the key components, then recreate it yourself.
131+
The hardest part of learning ggsql is likely to be unlearning the preconceptions that you bring over from previous visualization tools.
132+
133+
We've tried to make the learning curve as easy as possible by keeping the grammar close to the SQL syntax that you're already familiar with.
134+
You'll start with a classic `SELECT` statement to get the data that you want.
135+
Then you'll use `VISUALIZE` (or `VISUALISE` 🇬🇧) to switch from creating a table of data to creating a plot of that data.
136+
Then you'll `DRAW` a layer that maps columns in your data to aesthetics (visual properties), like position, colour, and shape.
137+
Then you tweak the `SCALE`s, the mappings between the data and the visual properties, to make the plot easier to read.
138+
Then you `FACET` the plot to show how the relationships differ across subsets of the data.
139+
Finally you finish up by adding `LABEL`s to explain your plot to others.
140+
This allows you to produce graphics using the same structured thinking that you already use to design a SQL query.

0 commit comments

Comments
 (0)