Spaces:
Runtime error
Runtime error
title: Welcome to Evidence's Hugging Face Demo | |
The source code for this project can be found in this [Hugging Face Space](https://huggingface.co./spaces/evidence-dev/template/tree/main). | |
<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 [Slack](https://slack.evidence.dev/) | |
- Open issues on [Github](https://github.com/evidence-dev/evidence) | |