diff --git a/examples/data-literate/pages/demo_new.mdx b/examples/data-literate/pages/demo_new.mdx new file mode 100644 index 00000000..c3984a4b --- /dev/null +++ b/examples/data-literate/pages/demo_new.mdx @@ -0,0 +1,268 @@ +--- +title: Demo +--- + +This demos and documents Data Literate features live. + +You can see the raw source of this page here: https://raw.githubusercontent.com/datopian/data-literate/main/content/demo.mdx + +## Table of Contents + +## GFM + +We can have github-flavored markdown including markdown tables, auto-linked links and checklists: + +``` +https://github.com/datopian/portal.js + +| a | b | +|---|---| +| 1 | 2 | + +* [x] one thing to do +* [ ] a second thing to do +``` + +https://github.com/datopian/portal.js + +| a | b | +|---|---| +| 1 | 2 | + +* [x] one thing to do +* [ ] a second thing to do + +## Footnotes + +``` +here is a footnote reference[^1] + +[^1]: a very interesting footnote. +``` + +here is a footnote reference[^1] + +[^1]: a very interesting footnote. + + +## Frontmatter + +Posts can have frontmatter like: + +``` +--- +title: Hello World +author: Rufus Pollock +--- +``` + +The title and description are pulled from the MDX file and processed using `gray-matter`. Additionally, links are rendered using a custom component passed to `next-mdx-remote`. + +## A Table of Contents + +You can create a table of contents by having a markdown heading named `Table of Contents`. You can see an example at the start of this post. + + +## A Table + +You can create tables ... + +``` + +``` + +
+ +### Table from Raw CSV + +You can also pass raw CSV as the content ... + +``` +
+``` + +
+ +### Table from a URL + +
+ +``` +
+``` + +## Charts + +You can create charts using a simple syntax. + +### Line Chart + + + +``` + +``` + +NB: we have quoted years as otherwise not interpreted as dates but as integers ... + + +### Vega and Vega Lite + +You can using vega or vega-lite. Here's an example using vega-lite: + + + + +```jsx + + +``` + +#### Line Chart from URL with Tooltip + +https://vega.github.io/vega-lite/examples/interactive_multi_line_pivot_tooltip.html + + + +## Display Excel Files + +Local file ... + +``` + +``` + + + +Remote files work too (even without CORS) thanks to proxying: + +``` + +``` + +