Spaces:
Sleeping
Sleeping
Delete app.py
Browse files
app.py
DELETED
|
@@ -1,24 +0,0 @@
|
|
| 1 |
-
|
| 2 |
-
import streamlit as st
|
| 3 |
-
import pandas as pd
|
| 4 |
-
|
| 5 |
-
df = pd.read_csv("dummy_data.csv")
|
| 6 |
-
|
| 7 |
-
st.title("🌍 CGD Survey Explorer (PoC)")
|
| 8 |
-
|
| 9 |
-
st.sidebar.header("🔎 Filter Questions")
|
| 10 |
-
selected_country = st.sidebar.selectbox("Select Country", sorted(df["Country"].unique()))
|
| 11 |
-
selected_year = st.sidebar.selectbox("Select Year", sorted(df["Year"].unique()))
|
| 12 |
-
keyword = st.sidebar.text_input("Keyword Search", "")
|
| 13 |
-
|
| 14 |
-
filtered = df[
|
| 15 |
-
(df["Country"] == selected_country) &
|
| 16 |
-
(df["Year"] == selected_year) &
|
| 17 |
-
(df["Question"].str.contains(keyword, case=False, na=False))
|
| 18 |
-
]
|
| 19 |
-
|
| 20 |
-
st.markdown(f"### Results for **{selected_country}** in **{selected_year}**")
|
| 21 |
-
st.dataframe(filtered[["Variable", "Question", "Responses"]])
|
| 22 |
-
|
| 23 |
-
if filtered.empty:
|
| 24 |
-
st.info("No matching questions found.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|