Skip to content

Commit cbf5d27

Browse files
committed
fix text linking
1 parent 2de981e commit cbf5d27

8 files changed

Lines changed: 333 additions & 187 deletions

File tree

doc/_quarto.yml

Lines changed: 51 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -65,50 +65,57 @@ website:
6565
- text: Report a Bug
6666
href: https://github.com/ggsql-dev/ggsql/issues
6767
sidebar:
68-
id: syntax
69-
title: Syntax
70-
style: "floating"
71-
search: true
72-
logo: false
73-
contents:
74-
- text: Overview
75-
href: syntax/index.qmd
76-
- section: "Main clauses"
77-
contents:
78-
- text: "`VISUALISE`"
79-
href: syntax/clause/visualise.qmd
80-
- text: "`DRAW`"
81-
href: syntax/clause/draw.qmd
82-
- text: "`PLACE`"
83-
href: syntax/clause/place.qmd
84-
- text: "`SCALE`"
85-
href: syntax/clause/scale.qmd
86-
- text: "`FACET`"
87-
href: syntax/clause/facet.qmd
88-
- text: "`PROJECT`"
89-
href: syntax/clause/project.qmd
90-
- text: "`LABEL`"
91-
href: syntax/clause/label.qmd
92-
- section: Layers
93-
contents:
94-
- section: Types
95-
contents:
96-
- auto: syntax/layer/type/*
97-
- section: Position adjustment
98-
contents:
99-
- auto: syntax/layer/position/*
100-
- section: Scales
101-
contents:
102-
- section: Types
103-
contents:
104-
- auto: syntax/scale/type/*
105-
- section: Aesthetics
106-
contents:
107-
- auto: syntax/scale/aesthetic/*
108-
- section: Coordinate systems
109-
contents:
110-
- auto: syntax/coord/*
111-
68+
- id: syntax
69+
title: Syntax
70+
style: "floating"
71+
search: true
72+
logo: false
73+
contents:
74+
- text: Overview
75+
href: syntax/index.qmd
76+
- section: "Main clauses"
77+
contents:
78+
- text: "`VISUALISE`"
79+
href: syntax/clause/visualise.qmd
80+
- text: "`DRAW`"
81+
href: syntax/clause/draw.qmd
82+
- text: "`PLACE`"
83+
href: syntax/clause/place.qmd
84+
- text: "`SCALE`"
85+
href: syntax/clause/scale.qmd
86+
- text: "`FACET`"
87+
href: syntax/clause/facet.qmd
88+
- text: "`PROJECT`"
89+
href: syntax/clause/project.qmd
90+
- text: "`LABEL`"
91+
href: syntax/clause/label.qmd
92+
- section: Layers
93+
contents:
94+
- section: Types
95+
contents:
96+
- auto: syntax/layer/type/*
97+
- section: Position adjustment
98+
contents:
99+
- auto: syntax/layer/position/*
100+
- section: Scales
101+
contents:
102+
- section: Types
103+
contents:
104+
- auto: syntax/scale/type/*
105+
- section: Aesthetics
106+
contents:
107+
- auto: syntax/scale/aesthetic/*
108+
- section: Coordinate systems
109+
contents:
110+
- auto: syntax/coord/*
111+
- id: get_started
112+
title: Get started
113+
style: "floating"
114+
search: false
115+
logo: false
116+
contents:
117+
- text: Installation
118+
href: get_started/installation.qmd
112119

113120
format:
114121
html:

doc/get_started.qmd

Lines changed: 0 additions & 140 deletions
This file was deleted.

doc/get_started/_metadata.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sidebar: get_started
2+
page-navigation: false
3+
toc: false

doc/get_started/first_plot.qmd

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "Your first plot"
3+
---
4+
5+
Before you spend time on the minutia of installing ggsql — not that it is particularly daunting — why not try it out right now, right here, in your browser?
6+
7+
The code below shows a simple ggsql example. But it is not just a static piece of text and an image. It is ggsql running right in your browser, using one of the built-in datasets. Try to change e.g. the title and see the plot update as you type. Even though this may be your first encounter with the ggsql syntax you might already get a sense of how some of the things fit together. See if you can change the code to instead show the different species as different shapes
8+
9+
```{ggsql}
10+
VISUALISE bill_len AS x, bill_dep AS y, species AS fill FROM ggsql:penguins
11+
DRAW point
12+
SCALE x RENAMING * => '{} mm'
13+
LABEL
14+
title => 'Relationship between bill dimensions in 3 species of penguins',
15+
x => 'Bill length',
16+
y => 'Bill depth'
17+
```
18+
19+
Congratulations! You have started your journey with ggsql! All examples you see on this site will be interactive. Please experiment to your heart's content. If you want a more dedicated exploration experience head to [our playground](wasm/) which provides a simple IDE with a number of examples to try out.
20+
21+
Now that you have gotten a feel for ggsql you may want to try running locally with your own data. Read on to learn how.

doc/get_started/grammar.qmd

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: The grammar of graphics
3+
---
4+
5+
ggsql is a tool for visualising data, combining our 20 years of experience developing [ggplot2](https://ggplot2.tidyverse.org/) with a SQL-native syntax.
6+
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.
7+
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.
8+
ggsql instead gives you a number of independent components that you can combine to solve a very wide set of problems.
9+
10+
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.
11+
But we believe the payoff is worth it.
12+
The grammar gives you new vocabulary and new ways to think about visualizations.
13+
This allows you to create not only familiar graphics but also newer, better graphics.
14+
You'll gain the ability to look at a visualization that someone else has made, analyse the key components, then recreate it yourself.
15+
The hardest part of learning ggsql is likely to be unlearning the preconceptions that you bring over from previous visualization tools.
16+
17+
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.
18+
You'll start with a classic `SELECT` statement to get the data that you want.
19+
Then you'll use `VISUALIZE` (or `VISUALISE` 🇬🇧) to switch from creating a table of data to creating a plot of that data.
20+
Then you'll `DRAW` a layer that maps columns in your data to aesthetics (visual properties), like position, colour, and shape.
21+
Then you tweak the `SCALE`s, the mappings between the data and the visual properties, to make the plot easier to read.
22+
Then you `FACET` the plot to show how the relationships differ across subsets of the data.
23+
Finally you finish up by adding `LABEL`s to explain your plot to others.
24+
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)