Spaces:
No application file
No application file
import streamlit as st | |
x = st.slider('Select a value') | |
st.write(x, 'squared is', x * x) | |
import pandas as pd | |
# Load the data | |
def load_data(): | |
# Update this path to point to your local file if you're running it outside Kaggle | |
data = pd.read_csv('/kaggle/input/web-crawler-for-real-estate-market/Output.csv') | |
return data | |
# Display the title and description of the app | |
st.title("Real Estate Market Analysis") | |
st.write(""" | |
This Streamlit app displays and analyzes real estate data. | |
""") | |
# Load the data | |
data = load_data() | |
# Show the first few rows of the dataframe | |
st.write("### Data Preview") | |
st.dataframe(data.head()) | |
# Allow the user to filter the data | |
st.sidebar.header("Filter Data") | |
selected_columns = st.sidebar.multiselect("Select columns to display", data.columns.tolist(), default=data.columns.tolist()) | |
filtered_data = data[selected_columns] | |
st.write("### Filtered Data") | |
st.dataframe(filtered_data) | |
# Add any other analysis or features you want to include | |
st.sidebar.header("Statistics") | |
st.write("### Summary Statistics") | |
st.write(data.describe()) | |
# Display a histogram of a selected column | |
column = st.sidebar.selectbox("Select column for histogram", data.columns.tolist()) | |
st.write(f"### Histogram of {column}") | |
st.bar_chart(data[column].value_counts()) | |