Skip to content

Commit ecd5e7e

Browse files
authored
Merge pull request #1533 from mcanouil/fix/ojs-missing-code
2 parents 14e67c0 + eb203c9 commit ecd5e7e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/computations/ojs.qmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ OJS works in any Quarto document (plain markdown as well as Jupyter and Knitr do
1717

1818
We'll start with a simple example based on Allison Horst's [Palmer Penguins](https://allisonhorst.github.io/palmerpenguins/) dataset. Here we look at how penguin body mass varies across both sex and species (use the provided inputs to filter the dataset by bill length and island):
1919

20+
```{ojs}
21+
data = FileAttachment("palmer-penguins.csv").csv({ typed: true })
22+
```
23+
2024
```{ojs}
2125
filtered = data.filter(function(penguin) {
2226
return bill_length_min < penguin.bill_length_mm &&
@@ -57,9 +61,9 @@ Plot.rectY(filtered,
5761
)
5862
```
5963

60-
Let's take a look at the source code for this example. First we create an `{ojs}` cell that reads in some data from a CSV file using a [FileAttachment](https://observablehq.com/@observablehq/file-attachments):
64+
Let's take a look at the source code for this example. First we create an `{ojs}` cell that reads in some data from a CSV file (*e.g.*, [`palmer-penguins.csv`](palmer-penguins.csv){target="_blank" download="palmer-penguins.csv"}) using a [FileAttachment](https://observablehq.com/@observablehq/file-attachments):
6165

62-
```{ojs}
66+
```{{ojs}}
6367
data = FileAttachment("palmer-penguins.csv").csv({ typed: true })
6468
```
6569

0 commit comments

Comments
 (0)