diff --git a/.streamlit/config.toml b/.streamlit/config.toml new file mode 100644 index 0000000..0465b38 --- /dev/null +++ b/.streamlit/config.toml @@ -0,0 +1,5 @@ +[theme] +base="light" +backgroundColor = "white" + + diff --git a/HowTo.html b/HowTo.html index 3c4ea98..ac7a83a 100644 --- a/HowTo.html +++ b/HowTo.html @@ -37,27 +37,27 @@
The user will need to provide the file in .shp (as a zip file) or .geojson formats to set the AOI where the trials will be conducted. This will define the tool for which to process the different environmental units in the AOI.
Alternatively, the user could manually draw a shape on the map that defines the region of interest. To achieve this, use map icons (polygon or rectangle) to draw a shape on the map and export using 'export' button on the right side of the map; then upload the downloaded geojson file of the AOI.
-Note: The size of the area has a limit of XXX km2.Consider this, as the tool will not work for very large areas. In case you need to run the tool for a very large AOI, you can contact xxxx.xxxxx@cgiar.org
In this step, the user will define the main crop that the trials are targeting to validate. - This is done to select a set of relevant environmental variables that are considered most relevant by agronomists. - The crops available, together with the list of associated variables are indicated in the table below:
-[Table with crops + variables]
+ This is done to select a set of relevant environmental variables that are considered most relevant by agronomists. +Seasonal conditions affect how environments might be clustered within the AOI, thus affecting the results of the trials and how the crop performs. The tool requires that the user indicates the seasonality (start month and end month) when the trials will be conducted.
@@ -81,13 +81,13 @@If for some reason the optimal number of clusters defined by the dry-run of the tool is not desirable, the user may indicate what would be a more adequate number that fits their knowledge of the area or the logistical constraints. Please, [select a number from the drop-down / indicate a number].
At this point, the user may also decide which are the most relevant environmental variables that may influence the trials or that are of specific focus in the validation. For example, an MVP might be focusing on drought-resistant varieties in rainfed wheat, and therefore rainfall might be the most important environmental variable to define the diff --git a/SFapp.py b/SFapp.py index 2636e98..a317f93 100644 --- a/SFapp.py +++ b/SFapp.py @@ -32,7 +32,8 @@ 'Temperature Minimum','Temperature Mean','Soil Zinc', 'Elevation','Slope', 'Soil Organic Carbon','Soil pH','Soil CEC','Soil Nitrogen','Soil Clay','Soil Sand'] cropmask = ee.Image('COPERNICUS/Landcover/100m/Proba-V-C3/Global/2019').select('discrete_classification').eq(40) -Map = geemap.Map(center=[0, 0], zoom=2, Draw_export=True) +Map = geemap.Map(center=[0, 0], zoom=2, Draw_export=True) +Map.add_basemap("SATELLITE") # Load CSS file content with open('style.css', 'r') as css_file: @@ -51,8 +52,8 @@ with st.sidebar: st.image(logo) # st.experimental_rerun() - st.write("## Upload AOI :gear:") - data = st.file_uploader("Upload AOI Shapefile", type=["geojson","zip"]) + st.write("## Area of Interest (AOI) :gear:") + data = st.file_uploader(" " ,type=["geojson","zip"]) if data is not None: st.write("## Select Crop and Date: ") @@ -101,6 +102,7 @@ # Create map Map = geemap.Map(center=centroid_coords, zoom=8) + Map.add_basemap("SATELLITE") Map.add_gdf(poly, 'AOI') #Map.addLayer(bb, {}, 'Bounding Box') selected_Sdate1 = (datetime.date.today() - datetime.timedelta(days=10*365)) @@ -158,7 +160,7 @@ bb_clip = mapping(poly.geometry.unary_union) res = res.clip(bb_clip) - # numClusters = numClusters.getInfo() + numClusters = numClusters.getInfo() # def gen_colors(num_colors): # random.seed(0) #ensure reproducibility @@ -296,6 +298,7 @@ def download_file(file_path): Map = geemap.Map(center=[0, 0], zoom=2, Draw_export=True) Map = geemap.Map(center=centroid_coords, zoom=8) + Map.add_basemap("SATELLITE") Map.add_gdf(poly, 'AOI') Map.addLayer (res.randomVisualizer(), {}, 'Kmeans') @@ -374,7 +377,7 @@ def download_file(file_path): except Exception as e: st.error(e) # st.error("An error occurred: There is an issue with your file download. Try again") - + Map.to_streamlit(height=600) @@ -407,9 +410,9 @@ def download_file(file_path): 'Rainfall Total': {'property': 'prcSum', 'unit': 'mm'}, 'Rainfall Days': {'property': 'prcNrd', 'unit': 'days'}, 'Rainfall Average': {'property': 'Di', 'unit': 'mm/day'}, - 'Temperature Maximum': {'property': 'tmaxMax', 'unit': '°C'}, - 'Temperature Minimum': {'property': 'tminMin', 'unit': '°C'}, - 'Temperature Mean': {'property': 'tmeanMean', 'unit': '°C'}, + 'Temperature Maximum': {'property': 'tmaxMax', 'unit': 'K'}, + 'Temperature Minimum': {'property': 'tminMin', 'unit': 'K'}, + 'Temperature Mean': {'property': 'tmeanMean', 'unit': 'K'}, 'Soil Zinc': {'property': 'zinc', 'unit':' ppmg'}, 'Elevation': {'property': 'srtm', 'unit': 'm'}, 'Slope': {'property': 'slp', 'unit': '%'}, diff --git a/__pycache__/eefun.cpython-311.pyc b/__pycache__/eefun.cpython-311.pyc index dcc148f..dc626f2 100644 Binary files a/__pycache__/eefun.cpython-311.pyc and b/__pycache__/eefun.cpython-311.pyc differ diff --git a/datasets.html b/datasets.html index 38b2a13..ac689c8 100755 --- a/datasets.html +++ b/datasets.html @@ -705,10 +705,10 @@