Arrow Date format #1601
-
I'm using fenced sql to query a local parquet file of generated credit card transaction data. There are columns
yields
but viewing the actual records of the dataset in a table gives values like I'm trying to generate a bar chart with sum of
I tried treating creating Date objects out of trans_date values, but that results in a single bar with the sum of all the values
any ideas how to get x values in yyyy-mm-dd format? Sorry if the answer is obvious, I'm a JS and observable novice. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What version of Framework, Inputs, and Plot are you using? We recently made improvements to our Apache Arrow support to accommodate Arrow’s use of BigInt to represent dates. You might try upgrading your dependencies, and see the latest release notes for these libraries. |
Beta Was this translation helpful? Give feedback.
Looking at the live example you shared (thank you for that) it appears you are using the latest versions of Framework (1.10.1), Plot (0.6.16), and Inputs (0.11.0). So you should be all good there.
For bar vs. rect marks, you can use either depending on whether you want to treat dates as ordinal or quantitative. In either case, you typically want to specify the interval option to tell Plot what the frequency of the samples are, such as
interval: "day"
for daily data. And you generally use the barY mark with the groupX transform, and the rectY mark with the binX transform. Using barY with binX is generally a no-no.If you have additional questions about Plot, please ask over on the Plot dis…