Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table support #58

Open
dav-garcia opened this issue Aug 27, 2023 · 2 comments
Open

Table support #58

dav-garcia opened this issue Aug 27, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@dav-garcia
Copy link

Hi,

This is a very high level feature recommendation, to be refined if found interesting.

The idea is to support tables both as data input for formulas and as output (formatted as Markdown tables).
I understand that, in order to support Markdown tables, they should be defined out of the scope of the "math" block.
And therefore, this would require a way to reference them, which might be very hard or even not possible.

Please comment if you think this feature could be useful.
Thanks!

@gtg922r
Copy link
Owner

gtg922r commented Aug 27, 2023

I don't think I quite follow this request. Could you describe an example use case?

@dav-garcia
Copy link
Author

Here's a very simplistic use case of using a Markdown table as input data:

| Fruit  | Price |
| ------ | ----- |
| Apple  | $3    |
| Orange | $2    |
| Banana | $2.5  | 
[tableid: FRUITS]

```math
fruit_prices = [[FRUITS@I$2..@>$2]]
=> average_price = mean(fruit_prices)
```

Each table should have a unique id that can be referenced from within the math block.

I'm not recommending to use a specific format for both the table id and the reference.
Just used Dataview's [key: value] format to illustrate the need for a way to identify the table.
And the same goes for the table reference: a combination of a link and a table range as defined in the Advanced Tables plugin.

I don't know whether this feature is feasible, but I think it would be very useful to have computable data as Markdown tables.

@gtg922r gtg922r added the enhancement New feature or request label Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants