Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,6 @@ from datasets import load_dataset
|
|
6 |
import folium
|
7 |
from streamlit_folium import st_folium
|
8 |
from geopy.geocoders import Nominatim
|
9 |
-
from shadcn.ui import Card, CardContent, Button
|
10 |
|
11 |
# Initialize geolocator
|
12 |
geolocator = Nominatim(user_agent="geoapiExercises")
|
@@ -164,14 +163,20 @@ def recommend_deployment(data):
|
|
164 |
if data.empty:
|
165 |
return "No viable deployment regions within the specified parameters."
|
166 |
best_region = data.loc[data["Composite Score"].idxmax()]
|
167 |
-
return f"Recommended Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
|
169 |
recommendation = recommend_deployment(filtered_data)
|
170 |
|
171 |
-
# Display Recommendation
|
172 |
st.markdown("### π Final Recommendation")
|
173 |
-
|
174 |
-
st.markdown(f"**{recommendation}**")
|
175 |
|
176 |
# Footer
|
177 |
st.sidebar.markdown("---")
|
|
|
6 |
import folium
|
7 |
from streamlit_folium import st_folium
|
8 |
from geopy.geocoders import Nominatim
|
|
|
9 |
|
10 |
# Initialize geolocator
|
11 |
geolocator = Nominatim(user_agent="geoapiExercises")
|
|
|
163 |
if data.empty:
|
164 |
return "No viable deployment regions within the specified parameters."
|
165 |
best_region = data.loc[data["Composite Score"].idxmax()]
|
166 |
+
return f"**Recommended Region:** {best_region['Region']} \n" \
|
167 |
+
f"**Composite Score:** {best_region['Composite Score']:.2f} \n" \
|
168 |
+
f"**Signal Strength:** {best_region['Signal Strength (dBm)']} dBm \n" \
|
169 |
+
f"**Terrain Difficulty:** {best_region['Terrain Difficulty (0-10)']} \n" \
|
170 |
+
f"**Climate Risk:** {best_region['Climate Risk (0-10)']} \n" \
|
171 |
+
f"**Estimated Cost:** ${best_region['Cost ($1000s)']}k \n" \
|
172 |
+
f"**Description:** {best_region['Description']} \n" \
|
173 |
+
f"**Location Name:** {best_region.get('Location Name', 'N/A')}"
|
174 |
|
175 |
recommendation = recommend_deployment(filtered_data)
|
176 |
|
177 |
+
# Display Recommendation
|
178 |
st.markdown("### π Final Recommendation")
|
179 |
+
st.markdown(recommendation)
|
|
|
180 |
|
181 |
# Footer
|
182 |
st.sidebar.markdown("---")
|