Spaces:
No application file
No application file
Create App.py
Browse files
App.py
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import pandas as pd
|
3 |
+
|
4 |
+
# Load the data
|
5 |
+
@st.cache
|
6 |
+
def load_data():
|
7 |
+
# Update this path to point to your local file if you're running it outside Kaggle
|
8 |
+
data = pd.read_csv('/kaggle/input/web-crawler-for-real-estate-market/Output.csv')
|
9 |
+
return data
|
10 |
+
|
11 |
+
# Display the title and description of the app
|
12 |
+
st.title("Real Estate Market Analysis")
|
13 |
+
st.write("""
|
14 |
+
This Streamlit app displays and analyzes real estate data.
|
15 |
+
""")
|
16 |
+
|
17 |
+
# Load the data
|
18 |
+
data = load_data()
|
19 |
+
|
20 |
+
# Show the first few rows of the dataframe
|
21 |
+
st.write("### Data Preview")
|
22 |
+
st.dataframe(data.head())
|
23 |
+
|
24 |
+
# Allow the user to filter the data
|
25 |
+
st.sidebar.header("Filter Data")
|
26 |
+
selected_columns = st.sidebar.multiselect("Select columns to display", data.columns.tolist(), default=data.columns.tolist())
|
27 |
+
filtered_data = data[selected_columns]
|
28 |
+
st.write("### Filtered Data")
|
29 |
+
st.dataframe(filtered_data)
|
30 |
+
|
31 |
+
# Add any other analysis or features you want to include
|
32 |
+
st.sidebar.header("Statistics")
|
33 |
+
st.write("### Summary Statistics")
|
34 |
+
st.write(data.describe())
|
35 |
+
|
36 |
+
# Display a histogram of a selected column
|
37 |
+
column = st.sidebar.selectbox("Select column for histogram", data.columns.tolist())
|
38 |
+
st.write(f"### Histogram of {column}")
|
39 |
+
st.bar_chart(data[column].value_counts())
|