Skip to content

Commit

Permalink
fix OJS cells
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Feb 14, 2024
1 parent 40a0714 commit d479613
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/computations/ojs.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OJS works in any Quarto document (plain markdown as well as Jupyter and Knitr do
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):

```{ojs}
filtered = transpose(data).filter(function(penguin) {
filtered = data.filter(function(penguin) {
return bill_length_min < penguin.bill_length_mm &&
islands.includes(penguin.island);
})
Expand Down Expand Up @@ -59,7 +59,7 @@ Plot.rectY(filtered,

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):

```{{ojs}}
```{ojs}
data = FileAttachment("palmer-penguins.csv").csv({ typed: true })
```

Expand Down

0 comments on commit d479613

Please sign in to comment.