I am badly stuck with the problem of creating a drop-down list using Ipywidgets in python with files (JSON,GEOJSON,CSV)
m = geemap.Map() url = "C:/Users/Hp/Desktop/New_SoilDB_RAW.geojson"
m.add_point_layer(url, popup=["DISTRICTS", "Soil"], layer_name="Soil") m
choose option
from ipywidgets import VBox, Label, Dropdown, Output
desc = Label("C:/Users/Hp/Desktop/New_SoilDB.csv")
dropdown = Dropdown( options=['Soil', 'DISTRICTS', 'LAT', 'LONG'], value='clay','Karimnagar',, disabled=False)
output = Output()
dropdown.observe(generate_plot, names="value")
VBox([desc, dropdown, output])
I am confused how to deal with the issue and any seek help. Thanks in advance
It's not clear what your error is, can you please include any error messages including the full stack trace.
I can see straight away that
'clay'
is not one of your listed options for your Dropdown.dropdown = Dropdown( options=['Soil', 'DISTRICTS', 'LAT', 'LONG'], value='Soil', disabled=False)