Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -225,7 +225,7 @@ if uploaded_file is not None:
|
|
225 |
max_ndvi_buffered_geoms.append(get_zonal_ndviYoY(collection.filterBounds(buffered_ee_object), buffered_ee_object))
|
226 |
|
227 |
# Create a DataFrame for YoY profile
|
228 |
-
yoy_df = pd.DataFrame({'Year': [str(
|
229 |
yoy_df['Ratio'] = yoy_df['NDVI_Inside'] / yoy_df['NDVI_Buffer']
|
230 |
|
231 |
# plot the time series
|
@@ -234,11 +234,12 @@ if uploaded_file is not None:
|
|
234 |
|
235 |
# Visualize map on ESRI basemap
|
236 |
st.write("Map Visualization")
|
237 |
-
|
|
|
238 |
m = geemapfolium.Map(center=(polygon_info['centroid'][1],polygon_info['centroid'][0]), zoom=14)
|
239 |
# Center the map and display the image.
|
240 |
-
m.
|
241 |
-
m.
|
242 |
m.add_layer_control()
|
243 |
st_folium(m)
|
244 |
|
|
|
225 |
max_ndvi_buffered_geoms.append(get_zonal_ndviYoY(collection.filterBounds(buffered_ee_object), buffered_ee_object))
|
226 |
|
227 |
# Create a DataFrame for YoY profile
|
228 |
+
yoy_df = pd.DataFrame({'Year': [str(i) for i in range(start_year, end_year+1)], 'NDVI_Inside': max_ndvi_geoms, 'NDVI_Buffer': max_ndvi_buffered_geoms})
|
229 |
yoy_df['Ratio'] = yoy_df['NDVI_Inside'] / yoy_df['NDVI_Buffer']
|
230 |
|
231 |
# plot the time series
|
|
|
234 |
|
235 |
# Visualize map on ESRI basemap
|
236 |
st.write("Map Visualization")
|
237 |
+
|
238 |
+
# Create Folium Map object
|
239 |
m = geemapfolium.Map(center=(polygon_info['centroid'][1],polygon_info['centroid'][0]), zoom=14)
|
240 |
# Center the map and display the image.
|
241 |
+
m.add_layer(geom_ee_object, {}, 'KML Original')
|
242 |
+
m.add_layer(buffered_ee_object, {}, 'KML Buffered')
|
243 |
m.add_layer_control()
|
244 |
st_folium(m)
|
245 |
|