pjgerrits commited on
Commit
5a68147
·
1 Parent(s): 3cea76a

update button and age selection

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -94,17 +94,17 @@ st.sidebar.title("Step 1 - Add Markers")
94
  col1, col2, col3 = st.sidebar.columns(3)
95
 
96
  with col1:
97
- if st.button(":red[Start]", key="start-button", use_container_width=True):
98
  st.session_state['point_type'] = 'start'
99
  st.sidebar.markdown('<div class="start-button">Start</div>', unsafe_allow_html=True)
100
 
101
  with col2:
102
- if st.button(":orange[Lost]", key="lost-button", use_container_width=True):
103
  st.session_state['point_type'] = 'lost'
104
  st.sidebar.markdown('<div class="lost-button">Lost</div>', unsafe_allow_html=True)
105
 
106
  with col3:
107
- if st.button(":blue[End]", key="end-button", use_container_width=True):
108
  st.session_state['point_type'] = 'end'
109
  st.sidebar.markdown('<div class="end-button">End</div>', unsafe_allow_html=True)
110
 
@@ -136,14 +136,16 @@ if new_coords:
136
  st_folium(folium_map, width="100%", height=800)
137
 
138
  if all(st.session_state['points'].values()) and not st.session_state['survey']:
139
- if st.sidebar.button("Proceed to Survey :question:"):
140
  st.session_state['survey'] = True
141
  else:
 
142
  st.sidebar.warning("Please add start, lost, and end points before proceeding to the survey questions.")
143
- st.sidebar.title("Step 2 - Survey Questions")
144
 
145
  if st.session_state['survey']:
146
- age = st.sidebar.selectbox("Age", list(range(10, 101, 10)))
 
147
  gender = st.sidebar.radio("Gender", ["Male", "Female", "Other", "Prefer not to say"])
148
  transport = st.sidebar.radio("Mode of Transport", ["Walk", "Car", "Bike", "Train", "Other", "Multi"])
149
  multi_transport = st.sidebar.multiselect("If Multi, select modes used", ["Walk", "Car", "Bike", "Train", "Other"]) if transport == "Multi" else []
 
94
  col1, col2, col3 = st.sidebar.columns(3)
95
 
96
  with col1:
97
+ if st.button(":red[Start]", key="start-button", help="Place a marker on the corresponding map location", use_container_width=True):
98
  st.session_state['point_type'] = 'start'
99
  st.sidebar.markdown('<div class="start-button">Start</div>', unsafe_allow_html=True)
100
 
101
  with col2:
102
+ if st.button(":orange[Lost]", key="lost-button", help="Place a marker on the corresponding map location", use_container_width=True):
103
  st.session_state['point_type'] = 'lost'
104
  st.sidebar.markdown('<div class="lost-button">Lost</div>', unsafe_allow_html=True)
105
 
106
  with col3:
107
+ if st.button(":blue[End]", key="end-button", help="Place a marker on the corresponding map location", use_container_width=True):
108
  st.session_state['point_type'] = 'end'
109
  st.sidebar.markdown('<div class="end-button">End</div>', unsafe_allow_html=True)
110
 
 
136
  st_folium(folium_map, width="100%", height=800)
137
 
138
  if all(st.session_state['points'].values()) and not st.session_state['survey']:
139
+ if st.sidebar.button("**Proceed to Survey** :question:", use_container_width=True):
140
  st.session_state['survey'] = True
141
  else:
142
+ st.sidebar.title("Step 2 - Survey Questions")
143
  st.sidebar.warning("Please add start, lost, and end points before proceeding to the survey questions.")
144
+
145
 
146
  if st.session_state['survey']:
147
+ st.sidebar.title("Step 2 - Survey Questions")
148
+ age = st.sidebar.selectbox("Age", ["18-25","25-35","35-45","45-55","55-65","65+"])
149
  gender = st.sidebar.radio("Gender", ["Male", "Female", "Other", "Prefer not to say"])
150
  transport = st.sidebar.radio("Mode of Transport", ["Walk", "Car", "Bike", "Train", "Other", "Multi"])
151
  multi_transport = st.sidebar.multiselect("If Multi, select modes used", ["Walk", "Car", "Bike", "Train", "Other"]) if transport == "Multi" else []