Yunus Serhat Bıçakçı commited on
Commit
b7a05c1
·
1 Parent(s): dcc1ecb
Files changed (1) hide show
  1. pages/4_Test.py +4 -2
pages/4_Test.py CHANGED
@@ -1,4 +1,4 @@
1
- import geopandas as gpd
2
  import streamlit as st
3
  import leafmap.foliumap as leafmap
4
  import leafmap.colormaps as cm
@@ -56,9 +56,12 @@ if uploaded_geojson:
56
 
57
  selected_map_1 = st.selectbox("Select data for Map 1", map_choices)
58
  selected_map_2 = st.selectbox("Select data for Map 2", map_choices)
 
 
59
 
60
  if selected_map_1 == "Uploaded GeoJSON":
61
  gdf_1 = gpd.GeoDataFrame.from_features(uploaded_geojson)
 
62
  elif selected_map_1 == "Original Map 1":
63
  gdf_1 = gpd.read_file(map_1)
64
  elif selected_map_1 == "Original Map 2":
@@ -68,7 +71,6 @@ else:
68
 
69
  if selected_map_2 == "Uploaded GeoJSON":
70
  gdf_2 = gpd.GeoDataFrame.from_features(uploaded_geojson)
71
- gdf_1.crs = "EPSG:4326"
72
  gdf_2.crs = "EPSG:4326"
73
 
74
  elif selected_map_2 == "Original Map 1":
 
1
+
2
  import streamlit as st
3
  import leafmap.foliumap as leafmap
4
  import leafmap.colormaps as cm
 
56
 
57
  selected_map_1 = st.selectbox("Select data for Map 1", map_choices)
58
  selected_map_2 = st.selectbox("Select data for Map 2", map_choices)
59
+ # Load the dataset to determine available columns
60
+ import geopandas as gpd
61
 
62
  if selected_map_1 == "Uploaded GeoJSON":
63
  gdf_1 = gpd.GeoDataFrame.from_features(uploaded_geojson)
64
+ gdf_1.crs = "EPSG:4326"
65
  elif selected_map_1 == "Original Map 1":
66
  gdf_1 = gpd.read_file(map_1)
67
  elif selected_map_1 == "Original Map 2":
 
71
 
72
  if selected_map_2 == "Uploaded GeoJSON":
73
  gdf_2 = gpd.GeoDataFrame.from_features(uploaded_geojson)
 
74
  gdf_2.crs = "EPSG:4326"
75
 
76
  elif selected_map_2 == "Original Map 1":