# Modify this file path with the location where you saved the tutorial files
workingDir <- file.path("C:/soil_water_nutrients")1 Study area
The selected area of interest (aoi) includes the south of Burkina Faso and the north of Ghana. The area contains a large variation in soils. Texture varies from sand to clay, graveliness from not- to very gravelly. Depth varies from very shallow to deep and fertility from very low to high. Plinthosols and Lixisols are among the most common soil classes in the area.
# Load libraries
require(leaflet)
require(sf)# read a shapefile with the area of interest
aoi <- st_read(file.path(workingDir, "aoi/extent.shp"))
aoi <- st_geometry(aoi)Plot the area of interest using ‘OpenStreetMap’ as background.
leaflet(aoi) %>% addTiles() %>%
addPolygons(color = "#444444", weight = 1, smoothFactor = 0.5,
opacity = 1.0, fillColor = "transparent")\(\\\) Plot the area of interest using ‘Esri.WorldImagery’ as background.
leaflet(aoi) %>% addProviderTiles("Esri.WorldImagery", group = "ESRI") %>%
addPolygons(color = "#444444", weight = 4, smoothFactor = 0.5,
opacity = 1.0, fillColor = "transparent")