YashMK89 commited on
Commit
c04779d
·
verified ·
1 Parent(s): a5d11e6

update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -12
app.py CHANGED
@@ -1,9 +1,6 @@
1
  import streamlit as st
2
  import json
3
 
4
- print(geemap.__version__)
5
- print(folium.__version__)
6
- print(geemap.Report())
7
 
8
  st.set_page_config(layout="wide")
9
  m = st.markdown(
@@ -18,15 +15,23 @@ div.stButton > button:first-child {
18
  )
19
 
20
 
21
- # Load dataset IDs from JSON file
 
 
 
22
  with open("datasets.json") as f:
23
- data = json.load(f)
24
- dataset_ids = data["datasets"]
 
 
25
 
26
- # Display title and selection menu
27
- st.title("Google Earth Engine Dataset Selector")
28
- selected_dataset = st.selectbox("Select a Dataset ID", dataset_ids)
29
 
30
- # Display selected dataset information
31
- st.write(f"**Selected Dataset ID:** {selected_dataset}")
32
- st.write("For more information, visit the [Google Earth Engine catalog](https://developers.google.com/earth-engine/datasets).")
 
 
 
 
 
1
  import streamlit as st
2
  import json
3
 
 
 
 
4
 
5
  st.set_page_config(layout="wide")
6
  m = st.markdown(
 
15
  )
16
 
17
 
18
+ import streamlit as st
19
+ import json
20
+
21
+ # Load dataset categories and sub-options from JSON file
22
  with open("datasets.json") as f:
23
+ sentinel_categories = json.load(f)
24
+
25
+ # Display title
26
+ st.title("Sentinel Dataset Selector")
27
 
28
+ # First-level selection box for the main category
29
+ main_selection = st.selectbox("Select Sentinel Dataset Category", list(sentinel_categories.keys()))
 
30
 
31
+ # Check the main selection and display the corresponding sub-options
32
+ if main_selection:
33
+ sub_options = sentinel_categories[main_selection]
34
+ sub_selection = st.selectbox("Select Specific Dataset", sub_options)
35
+
36
+ # Display the selected sub-option
37
+ st.write(f"**Selected Dataset ID:** {sub_selection}")