# Create a Filtered Chart

In this section, we will see how you can add a filtered chart to your Pollination app. We will filter the dry bulb temperature data coming out of an EPW file and will visualize it as a Plotly chart in a Pollination app.

Install the following libraries first

```
pip install ladybug-charts streamlit
```

Start by importing the libraries

```python
import streamlit as st
from ladybug.epw import EPW
```

Set the title of the page and layout

```python
st.set_page_config(
    page_title='Dry bulb temperature', layout='wide'
)
```

Create an EPW object from an epw file and get the dry bulb temperature.

```python
epw = EPW("file path to epw file")
dbt = epw.dry_bulb_temperature
```

Apply some filters to the dry bulb temperature. for example, let's visualize the dry bulb temperature between 18 and 24 degrees Celsius during 9am to 5pm all year.

```python
dbt_work_hours = dbt.filter_by_analysis_period(
    AnalysisPeriod(1, 1, 9, 12, 31, 17)).filter_by_conditional_statement('a>=18 and a<=24')
```

Create a Plotly figure from the filtered chart

```python
figure = dbt_work_hours.heat_map()
```

Visualize the filtered dry bulb temperature chart

```python
st.title("Dry bulb temperature")
st.plotly_chart(figure, use_container_width=True)
```

You should see a filtered annual heatmap appear in the Streamlit app.

![](/files/wqPtgiFACJSeCoM1Bu5F)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pollination.solutions/user-manual/developers/apps/filtered-chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
