gigiliu12 commited on
Commit
bcb0eb7
·
verified ·
1 Parent(s): ee57380

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -9
app.py CHANGED
@@ -2,9 +2,31 @@
2
  import streamlit as st
3
  import pandas as pd
4
 
5
- df = pd.read_csv("dummy_data.csv")
6
- # UI layout
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()))
@@ -22,9 +44,3 @@ st.dataframe(filtered[["Variable", "Question", "Responses"]])
22
 
23
  if filtered.empty:
24
  st.info("No matching questions found.")
25
-
26
- # this is jut me testing if streamlit works
27
- import streamlit as st
28
- st.title("✅ Hello from Streamlit!")
29
- st.write("This is a test to confirm the app runs.")
30
-
 
2
  import streamlit as st
3
  import pandas as pd
4
 
5
+ # Sample dummy data
6
+ data = {
7
+ "Country": ["Mexico", "Mexico", "Peru", "Peru", "Guatemala"],
8
+ "Year": [2020, 2021, 2020, 2021, 2021],
9
+ "Variable": ["Q1", "Q2", "Q3", "Q4", "Q5"],
10
+ "Question": [
11
+ "How often do you visit a doctor?",
12
+ "Do you trust the healthcare system?",
13
+ "Have you received the COVID-19 vaccine?",
14
+ "What is your primary source of news?",
15
+ "Do you think education is affordable?"
16
+ ],
17
+ "Responses": [
18
+ "Never, Rarely, Sometimes, Often",
19
+ "Yes, No",
20
+ "Yes, No",
21
+ "TV, Internet, Radio",
22
+ "Yes, No"
23
+ ]
24
+ }
25
+
26
+ df = pd.DataFrame(data)
27
+
28
+ # Streamlit UI layout
29
+ st.title("🌍 CGD Survey Explorer (PoC)")
30
 
31
  st.sidebar.header("🔎 Filter Questions")
32
  selected_country = st.sidebar.selectbox("Select Country", sorted(df["Country"].unique()))
 
44
 
45
  if filtered.empty:
46
  st.info("No matching questions found.")