diff --git a/docs/lib/arrow.md b/docs/lib/arrow.md index 312ad0adc..ef7a31fee 100644 --- a/docs/lib/arrow.md +++ b/docs/lib/arrow.md @@ -60,6 +60,7 @@ Visualized with [Plot’s difference mark](https://observablehq.com/plot/marks/d ```js echo Plot.plot({ + x: {type: "utc"}, marks: [ Plot.ruleY([0]), Plot.differenceY(table, {x: "date", y: "value"}) @@ -67,6 +68,12 @@ Plot.plot({ }) ``` +
+ +The chart above specifies _x_ as a UTC scale because Apache Arrow represents dates as numbers (milliseconds since [Unix epoch]()) rather than Date objects; without this hint, Plot would assume that _date_ column is quantitative rather than temporal and produce a less legible axis. + +
+ ## Apache Parquet The [Apache Parquet](https://parquet.apache.org/) format is optimized for storage and transfer. To load a Parquet file — such as this sample of 250,000 stars from the [Gaia Star Catalog](https://observablehq.com/@cmudig/peeking-into-the-gaia-star-catalog) — use [`FileAttachment`](../files). This is implemented using Kyle Barron’s [parquet-wasm](https://kylebarron.dev/parquet-wasm/) library.