deafrica_tools.app.crophealth¶
- Functions for loading and interacting with data in the crop health notebook,
inside the Real_world_examples folder.
Functions
|
Loads Sentinel-2 analysis-ready data (ARD) product for the crop health case-study area over the last two years. |
|
Plots an interactive map of the crop health case-study area and allows the user to draw polygons. |
- deafrica_tools.app.crophealth.load_crophealth_data(lat, lon, buffer, date)¶
Loads Sentinel-2 analysis-ready data (ARD) product for the crop health case-study area over the last two years. Last modified: April 2020
- Parameters
lat (float) – The central latitude to analyse
lon (float) – The central longitude to analyse
buffer – The number of square degrees to load around the central latitude and longitude. For reasonable loading times, set this as 0.1 or lower.
date – The most recent date to show data for. The app will automatically load all data available for the two years prior to this date.
- Returns
ds – data set containing combined, masked data Masked values are set to ‘nan’
- Return type
xarray.Dataset
- deafrica_tools.app.crophealth.run_crophealth_app(ds, lat, lon, buffer)¶
Plots an interactive map of the crop health case-study area and allows the user to draw polygons. This returns a plot of the average NDVI value in the polygon area. Last modified: January 2020
- Parameters
ds (xarray.Dataset) – data set containing combined, masked data Masked values are set to ‘nan’
lat (float) – The central latitude corresponding to the area of loaded ds
lon (float) – The central longitude corresponding to the area of loaded ds
buffer – The number of square degrees to load around the central latitude and longitude. For reasonable loading times, set this as 0.1 or lower.