Update appStore/tapp_display.py
Browse files- appStore/tapp_display.py +6 -3
appStore/tapp_display.py
CHANGED
@@ -125,6 +125,7 @@ def action_display():
|
|
125 |
sector_cols = list(set(cols) - {'ActionLabel','MitigationLabel','AdaptationLabel','GHGLabel','NetzeroLabel','NonGHGLabel','text','keep','page'})
|
126 |
sector_cols.sort()
|
127 |
hits['Sector'] = hits.apply(lambda x: [col for col in sector_cols if x[col] == True],axis=1)
|
|
|
128 |
#hits['Sub-Target'] = hits.apply(lambda x: [col for col in ['GHGLabel','NetzeroLabel','NonGHGLabel'] if x[col] == True ],axis=1)
|
129 |
placeholder= []
|
130 |
for col in sector_cols:
|
@@ -135,7 +136,7 @@ def action_display():
|
|
135 |
st.write('------------------------')
|
136 |
st.write('Explore the data')
|
137 |
|
138 |
-
st.dataframe(hits[['text','page','keep','MitigationLabel','AdaptationLabel','Sector']])
|
139 |
else:
|
140 |
st.info("🤔 No Actions Found")
|
141 |
|
@@ -176,6 +177,7 @@ def policy_display():
|
|
176 |
sector_cols = list(set(cols) - {'PolicyLabel','MitigationLabel','AdaptationLabel','GHGLabel','NetzeroLabel','NonGHGLabel','text','keep','page'})
|
177 |
sector_cols.sort()
|
178 |
hits['Sector'] = hits.apply(lambda x: [col for col in sector_cols if x[col] == True],axis=1)
|
|
|
179 |
placeholder= []
|
180 |
for col in sector_cols:
|
181 |
placeholder.append({'Sector':col,'Count':sum(hits[col] == True)})
|
@@ -184,7 +186,7 @@ def policy_display():
|
|
184 |
st.plotly_chart(fig,use_container_width= True)
|
185 |
st.write('-------------------')
|
186 |
st.write('Explore the data')
|
187 |
-
st.dataframe(hits[['text','page','keep','MitigationLabel','AdaptationLabel','Sector']])
|
188 |
else:
|
189 |
st.info("🤔 No Policy Found")
|
190 |
|
@@ -223,6 +225,7 @@ def plans_display():
|
|
223 |
sector_cols = list(set(cols) - {'PlansLabel','MitigationLabel','AdaptationLabel','GHGLabel','NetzeroLabel','NonGHGLabel','text','keep','page'})
|
224 |
sector_cols.sort()
|
225 |
hits['Sector'] = hits.apply(lambda x: [col for col in sector_cols if x[col] == True],axis=1)
|
|
|
226 |
placeholder= []
|
227 |
for col in sector_cols:
|
228 |
placeholder.append({'Sector':col,'Count':sum(hits[col] == True)})
|
@@ -232,7 +235,7 @@ def plans_display():
|
|
232 |
st.write('---------------')
|
233 |
st.write('Explore the data')
|
234 |
|
235 |
-
st.dataframe(hits[['text','page','keep','MitigationLabel','AdaptationLabel','Sector']])
|
236 |
else:
|
237 |
st.info("🤔 No Plans Found")
|
238 |
|
|
|
125 |
sector_cols = list(set(cols) - {'ActionLabel','MitigationLabel','AdaptationLabel','GHGLabel','NetzeroLabel','NonGHGLabel','text','keep','page'})
|
126 |
sector_cols.sort()
|
127 |
hits['Sector'] = hits.apply(lambda x: [col for col in sector_cols if x[col] == True],axis=1)
|
128 |
+
st.session_state['action_hits'] = hits[['text','page','keep','Sector','MitigationLabel','AdaptationLabel',]]
|
129 |
#hits['Sub-Target'] = hits.apply(lambda x: [col for col in ['GHGLabel','NetzeroLabel','NonGHGLabel'] if x[col] == True ],axis=1)
|
130 |
placeholder= []
|
131 |
for col in sector_cols:
|
|
|
136 |
st.write('------------------------')
|
137 |
st.write('Explore the data')
|
138 |
|
139 |
+
#st.dataframe(hits[['text','page','keep','MitigationLabel','AdaptationLabel','Sector']])
|
140 |
else:
|
141 |
st.info("🤔 No Actions Found")
|
142 |
|
|
|
177 |
sector_cols = list(set(cols) - {'PolicyLabel','MitigationLabel','AdaptationLabel','GHGLabel','NetzeroLabel','NonGHGLabel','text','keep','page'})
|
178 |
sector_cols.sort()
|
179 |
hits['Sector'] = hits.apply(lambda x: [col for col in sector_cols if x[col] == True],axis=1)
|
180 |
+
st.session_state['policy_hits'] = hits[['text','page','keep','Sector','MitigationLabel','AdaptationLabel']]
|
181 |
placeholder= []
|
182 |
for col in sector_cols:
|
183 |
placeholder.append({'Sector':col,'Count':sum(hits[col] == True)})
|
|
|
186 |
st.plotly_chart(fig,use_container_width= True)
|
187 |
st.write('-------------------')
|
188 |
st.write('Explore the data')
|
189 |
+
#st.dataframe(hits[['text','page','keep','MitigationLabel','AdaptationLabel','Sector']])
|
190 |
else:
|
191 |
st.info("🤔 No Policy Found")
|
192 |
|
|
|
225 |
sector_cols = list(set(cols) - {'PlansLabel','MitigationLabel','AdaptationLabel','GHGLabel','NetzeroLabel','NonGHGLabel','text','keep','page'})
|
226 |
sector_cols.sort()
|
227 |
hits['Sector'] = hits.apply(lambda x: [col for col in sector_cols if x[col] == True],axis=1)
|
228 |
+
st.session_state['plan_hits'] = hits[['text','page','keep','Sector','MitigationLabel','AdaptationLabel']]
|
229 |
placeholder= []
|
230 |
for col in sector_cols:
|
231 |
placeholder.append({'Sector':col,'Count':sum(hits[col] == True)})
|
|
|
235 |
st.write('---------------')
|
236 |
st.write('Explore the data')
|
237 |
|
238 |
+
#st.dataframe(hits[['text','page','keep','MitigationLabel','AdaptationLabel','Sector']])
|
239 |
else:
|
240 |
st.info("🤔 No Plans Found")
|
241 |
|