File size: 1,297 Bytes
1e4511f
e78b157
 
1e4511f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import streamlit as st
x = st.slider('Select a value')
st.write(x, 'squared is', x * x)
import pandas as pd

# Load the data
@st.cache
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())