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':
|
229 |
yoy_df['Ratio'] = yoy_df['NDVI_Inside'] / yoy_df['NDVI_Buffer']
|
230 |
|
231 |
# plot the time series
|
@@ -235,10 +235,11 @@ if uploaded_file is not None:
|
|
235 |
# Visualize map on ESRI basemap
|
236 |
st.write("Map Visualization")
|
237 |
|
238 |
-
m = geemapfolium.Map(center=polygon_info['centroid'], zoom=14)
|
239 |
# Center the map and display the image.
|
240 |
-
m.
|
241 |
-
m.
|
|
|
242 |
st_folium(m)
|
243 |
|
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(year) 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
|
|
|
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.add_ee_layer(geom_ee_object, {}, 'KML Original')
|
241 |
+
m.add_ee_layer(buffered_ee_object, {}, 'KML Buffered')
|
242 |
+
m.add_layer_control()
|
243 |
st_folium(m)
|
244 |
|
245 |
|