deafrica_tools.app.forestmonitoring#
Functions for loading and interacting with Global Forest Change data in the forest monitoring notebook, inside the Real_world_examples folder.
Functions
|
Defines a number of CSS properties to create a button to handle mouse clicks. |
|
Preprocess the Global Forest Change "gain" layer. |
|
Preprocess the Global Forest Change "lossyear" layer. |
|
Preprocess the Global Forest change "treecover2020" layer. |
|
Get the latitude label given the latitude value. |
|
Get the longitude label given the longitude value. |
Get the individual 10x10 degree granules that comprise the Global Forest Change 2000-2023 dataset. |
|
|
|
|
Loads the selected Global Forest Change layer for the area drawn on the map widget. |
Defines a number of CSS properties that impact how a widget is laid out. |
|
|
|
|
Plot all the Global Forest Change Layers loaded. |
|
Plot the Global Forest Change "gain" layer. |
|
Plot the Global Forest change "lossyear" layer. |
|
Plot the Global Forest Change "treecover2000" layer. |
|
Updates map widget to add new basemap when selected using menu options. |
Classes
|
- deafrica_tools.app.forestmonitoring.create_expanded_button(description, button_style)#
Defines a number of CSS properties to create a button to handle mouse clicks.
- class deafrica_tools.app.forestmonitoring.forest_monitoring_app(*args: Any, **kwargs: Any)#
- update_basemap(change)#
Updates the basemap on the map widget based on the selected value of the dropdown_basemap widget.
- update_checkbox_max_size(change)#
Sets the value of self.max_size to True when the checkbox_max_size CheckBox is checked.
- update_gfclayer(change)#
Updates the Global Forest Change layer to be plotted based on the selected value of the dropdown_gfclayer widget.
- update_timerange(change)#
Updates the time range of the data to be loaded
- deafrica_tools.app.forestmonitoring.get_gfclayer_gain(gfclayer_ds, gfclayer='gain')#
Preprocess the Global Forest Change “gain” layer.
- deafrica_tools.app.forestmonitoring.get_gfclayer_lossyear(gfclayer_ds, start_year, end_year, gfclayer='lossyear')#
Preprocess the Global Forest Change “lossyear” layer.
- deafrica_tools.app.forestmonitoring.get_gfclayer_treecover2000(gfclayer_ds, gfclayer='treecover2000')#
Preprocess the Global Forest change “treecover2020” layer.
- deafrica_tools.app.forestmonitoring.get_lat_label(lat: float) str#
Get the latitude label given the latitude value. :param lat: Latitude to get the label for. :type lat: float
- Returns:
Latitude label where negative values are South and positive values are North.
- Return type:
str
- deafrica_tools.app.forestmonitoring.get_lon_label(lon: float) str#
Get the longitude label given the longitude value. :param lon: Longitude to get the label for. :type lon: float
- Returns:
Longitude label where negative values are East and positive values are West.
- Return type:
str
- deafrica_tools.app.forestmonitoring.get_product_tiles() geopandas.GeoDataFrame#
Get the individual 10x10 degree granules that comprise the Global Forest Change 2000-2023 dataset.
- Returns:
gpd.GeoDataFrame – The individual 10x10 degree granules that comprise the Global Forest Change 2000-2023
dataset
- deafrica_tools.app.forestmonitoring.load_gfclayer(gdf_drawn, gfclayer)#
Loads the selected Global Forest Change layer for the area drawn on the map widget.
- deafrica_tools.app.forestmonitoring.make_box_layout()#
Defines a number of CSS properties that impact how a widget is laid out.
- deafrica_tools.app.forestmonitoring.plot_gfclayer_all(gfclayer_ds, start_year, end_year)#
Plot all the Global Forest Change Layers loaded.
- deafrica_tools.app.forestmonitoring.plot_gfclayer_gain(gfclayer_ds, gfclayer='gain')#
Plot the Global Forest Change “gain” layer.
- deafrica_tools.app.forestmonitoring.plot_gfclayer_lossyear(gfclayer_ds, start_year, end_year, gfclayer='lossyear')#
Plot the Global Forest change “lossyear” layer.
- deafrica_tools.app.forestmonitoring.plot_gfclayer_treecover2000(gfclayer_ds, gfclayer='treecover2000')#
Plot the Global Forest Change “treecover2000” layer.
- deafrica_tools.app.forestmonitoring.update_map_layers(self)#
Updates map widget to add new basemap when selected using menu options.