File size: 874 Bytes
d3a33c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

import streamlit as st
import pandas as pd

df = pd.read_csv("dummy_data.csv")

st.title("๐ŸŒ CGD Survey Explorer (PoC)")

st.sidebar.header("๐Ÿ”Ž Filter Questions")
selected_country = st.sidebar.selectbox("Select Country", sorted(df["Country"].unique()))
selected_year = st.sidebar.selectbox("Select Year", sorted(df["Year"].unique()))
keyword = st.sidebar.text_input("Keyword Search", "")

filtered = df[
    (df["Country"] == selected_country) &
    (df["Year"] == selected_year) &
    (df["Question"].str.contains(keyword, case=False, na=False))
]

st.markdown(f"### Results for **{selected_country}** in **{selected_year}**")
st.dataframe(filtered[["Variable", "Question", "Responses"]])

if filtered.empty:
    st.info("No matching questions found.")

import streamlit as st
st.title("โœ… Hello from Streamlit!")
st.write("This is a test to confirm the app runs.")