Spaces:
Runtime error
Runtime error
Commit
•
391f5e7
1
Parent(s):
f9eef39
Number of request
Browse files
app.py
CHANGED
@@ -232,8 +232,10 @@ st.markdown(SLOGAN, unsafe_allow_html=True)
|
|
232 |
# Load data and initialize map with plugins
|
233 |
df = parse_gg_sheet(REQUESTS_URL)
|
234 |
df = add_latlng_col(df, process_column=15)
|
|
|
235 |
interventions_df = parse_gg_sheet(INTERVENTIONS_URL)
|
236 |
interventions_df = add_latlng_col(interventions_df, process_column=12)
|
|
|
237 |
m = init_map()
|
238 |
fg = folium.FeatureGroup(name="Markers")
|
239 |
|
@@ -355,10 +357,74 @@ tab_ar, tab_en, tab_fr = st.tabs(["العربية", "English", "Français"])
|
|
355 |
|
356 |
with tab_en:
|
357 |
st.markdown(INTRO_TEXT_EN, unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
with tab_ar:
|
359 |
st.markdown(INTRO_TEXT_AR, unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
with tab_fr:
|
361 |
st.markdown(INTRO_TEXT_FR, unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
|
363 |
# Requests table
|
364 |
st.divider()
|
|
|
232 |
# Load data and initialize map with plugins
|
233 |
df = parse_gg_sheet(REQUESTS_URL)
|
234 |
df = add_latlng_col(df, process_column=15)
|
235 |
+
len_requests = len(df)
|
236 |
interventions_df = parse_gg_sheet(INTERVENTIONS_URL)
|
237 |
interventions_df = add_latlng_col(interventions_df, process_column=12)
|
238 |
+
len_interventions = len(interventions_df)
|
239 |
m = init_map()
|
240 |
fg = folium.FeatureGroup(name="Markers")
|
241 |
|
|
|
357 |
|
358 |
with tab_en:
|
359 |
st.markdown(INTRO_TEXT_EN, unsafe_allow_html=True)
|
360 |
+
col1, col2 = st.columns([1, 1])
|
361 |
+
with col1:
|
362 |
+
st.markdown(
|
363 |
+
f"""
|
364 |
+
<div style="text-align: center;">
|
365 |
+
<h3>Number of help requests</h3>
|
366 |
+
<h2>{len_requests}</h2>
|
367 |
+
</div>
|
368 |
+
""",
|
369 |
+
unsafe_allow_html=True,
|
370 |
+
)
|
371 |
+
with col2:
|
372 |
+
st.markdown(
|
373 |
+
f"""
|
374 |
+
<div style="text-align: center;">
|
375 |
+
<h3>Number of interventions</h3>
|
376 |
+
<h2>{len_interventions}</h2>
|
377 |
+
</div>
|
378 |
+
""",
|
379 |
+
unsafe_allow_html=True,
|
380 |
+
)
|
381 |
with tab_ar:
|
382 |
st.markdown(INTRO_TEXT_AR, unsafe_allow_html=True)
|
383 |
+
col1, col2 = st.columns([1, 1])
|
384 |
+
with col1:
|
385 |
+
st.markdown(
|
386 |
+
f"""
|
387 |
+
<div style="text-align: center;">
|
388 |
+
<h3>عدد طلبات المساعدة</h3>
|
389 |
+
<h2>{len_requests}</h2>
|
390 |
+
</div>
|
391 |
+
""",
|
392 |
+
unsafe_allow_html=True,
|
393 |
+
)
|
394 |
+
with col2:
|
395 |
+
st.markdown(
|
396 |
+
f"""
|
397 |
+
<div style="text-align: center;">
|
398 |
+
<h3>عدد التدخلات</h3>
|
399 |
+
<h2>{len_interventions}</h2>
|
400 |
+
</div>
|
401 |
+
""",
|
402 |
+
unsafe_allow_html=True,
|
403 |
+
)
|
404 |
+
|
405 |
with tab_fr:
|
406 |
st.markdown(INTRO_TEXT_FR, unsafe_allow_html=True)
|
407 |
+
col1, col2 = st.columns([1, 1])
|
408 |
+
with col1:
|
409 |
+
st.markdown(
|
410 |
+
f"""
|
411 |
+
<div style="text-align: center;">
|
412 |
+
<h3>Nombre de demandes d'aide</h3>
|
413 |
+
<h2>{len_requests}</h2>
|
414 |
+
</div>
|
415 |
+
""",
|
416 |
+
unsafe_allow_html=True,
|
417 |
+
)
|
418 |
+
with col2:
|
419 |
+
st.markdown(
|
420 |
+
f"""
|
421 |
+
<div style="text-align: center;">
|
422 |
+
<h3>Nombre d'interventions</h3>
|
423 |
+
<h2>{len_interventions}</h2>
|
424 |
+
</div>
|
425 |
+
""",
|
426 |
+
unsafe_allow_html=True,
|
427 |
+
)
|
428 |
|
429 |
# Requests table
|
430 |
st.divider()
|