-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for columnar datasets: arquero and quarto
- Loading branch information
Showing
7 changed files
with
9,440 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
import * as Plot from "@observablehq/plot"; | ||
import * as d3 from "d3"; | ||
import * as aq from "arquero"; | ||
|
||
export default async function () { | ||
export async function diamondsBoxplot() { | ||
const diamonds = await d3.csv("data/diamonds.csv", d3.autoType); | ||
return Plot.plot({ | ||
marks: [Plot.boxX(diamonds, {x: "price", y: "clarity", sort: {y: "x"}})] | ||
}); | ||
} | ||
|
||
export async function diamondsBoxplotArquero() { | ||
const diamonds = aq.from(await d3.csv("data/diamonds.csv", d3.autoType)); | ||
return Plot.plot({ | ||
marks: [Plot.boxX(diamonds, {x: "price", y: "clarity", sort: {y: "x"}})] | ||
}); | ||
} | ||
|
||
export async function diamondsBoxplotColumnar() { | ||
const raw = await d3.csv("data/diamonds.csv", d3.autoType); | ||
const diamonds = {price: Plot.valueof(raw, "price"), clarity: Plot.valueof(raw, "clarity")}; | ||
return Plot.plot({ | ||
marks: [Plot.boxX(diamonds, {x: "price", y: "clarity", sort: {y: "x"}})] | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters