Spaces:
Build error
Build error
| title: Welcome to Evidence's Hugging Face Demo | |
| The source code for this project can be found in this <a href=https://huggingface.co/spaces/evidence-dev/template-app/tree/main class=markdown target="_blank">Hugging Face Space</a>. | |
| <Details title='How to edit this page'> | |
| This page can be found in your project at `/pages/index.md`. Make a change to the markdown file and save it to see the change take effect in your browser. | |
| </Details> | |
| ```sql categories | |
| select | |
| category | |
| from needful_things.orders | |
| group by category | |
| ``` | |
| <Dropdown data={categories} name=category value=category> | |
| <DropdownOption value="%" valueLabel="All Categories"/> | |
| </Dropdown> | |
| <Dropdown name=year> | |
| <DropdownOption value=% valueLabel="All Years"/> | |
| <DropdownOption value=2019/> | |
| <DropdownOption value=2020/> | |
| <DropdownOption value=2021/> | |
| </Dropdown> | |
| ```sql orders_by_category | |
| select | |
| date_trunc('month', order_datetime) as month, | |
| sum(sales) as sales_usd, | |
| category | |
| from needful_things.orders | |
| where category like '${inputs.category.value}' | |
| and date_part('year', order_datetime) like '${inputs.year.value}' | |
| group by all | |
| order by sales_usd desc | |
| ``` | |
| <BarChart | |
| data={orders_by_category} | |
| title="Sales by Month, {inputs.category.label}" | |
| x=month | |
| y=sales_usd | |
| series=category | |
| /> | |
| ## Learn More | |
| - Read the [Docs](https://docs.evidence.dev/) | |
| - Get support on <a href=https://slack.evidence.dev/ class=markdown target="_blank">Slack</a> | |
| - Open issues on <a href=https://github.com/evidence-dev/evidence class=markdown target="_blank">GitHub</a> | |