Streamlit is a Python library for turning exploratory data analysis into interactive, web-based proof-of-concept applications with minimal application code. It suits stakeholder questions that need filters, charts, metrics, and underlying data in one accessible interface. section 10.2.4 section 11.2.2
A results-driven Streamlit workflow typically:
- Loads and optionally caches data with st.cache_data so user actions do not reload unchanged datasets. section 11.2.2
- Defines page elements in display order, including titles, explanations, charts, dropdowns, metrics, and tables. section 11.2.2
- Connects dependent dropdowns to filtering logic, such as county, town, and street selections. section 11.2.1 section 11.2.2
- Displays existing matplotlib and Plotly outputs alongside summary metrics and the raw records behind the analysis. section 11.2.2
House price explorer
A Wales house-price application loads property data, offers county, town, and street dropdowns, reports record counts and median sale prices, and renders transaction, property-type, and raw-data views. Run it with `streamlit run house_price_app.py` after activating the Poetry environment. section 11.2.2
if county_select:
st.header(filter_message)
metric_col1, metric_col2 = st.columns(2)
metric_col1.metric("Number of records", f"{len(selected_data):,.0f}")
metric_col2.metric("Median sale price", f"£{median_price:,.0f}")
chart_col1, chart_col2, chart_col3 = st.columns(3)
with chart_col1:
st.subheader("Transactions over time")
st.pyplot(helpers.transactions_per_year(selected_data))
with chart_col2:
st.subheader("Distribution of property type")
st.pyplot(helpers.distribution_of_property_type(selected_data))
with chart_col3:
st.subheader("Median sale price by property type")
st.pyplot(helpers.median_price_by_property_type(selected_data))
st.header("Raw data")
st.write(selected_data)
Inspect the finished layout combining filtered metrics, three charts, and the underlying data table. section 11.2.2








