knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(lfcdata) library(sf)
The FES database allows access to the data of forest ecosystem services in Catalonia. This data was obtained in a collaborative effort of the CTFC and CREAF research centers.
To access the database, we use the fes()
function:
fesdb <- fes() fesdb
Data can be retrieved with the fes_get_data
function. We need to supply the
name of the desired table and a logical argument indicating if we want a
normal tibble or a spatial object (sf):
fes_get_data(fesdb, 'static', spatial = FALSE)
As stated before, we can get a spatial object, and use it to plot the variables:
fes_get_data(fesdb, 'static', spatial = TRUE) |> plot()
The available tables can be listed with the fes_avail_tables
function:
fes_avail_tables(fesdb)
And we can get a detailed information about the table of interest:
fes_describe_table(fesdb, 'static')
To have a glance on any variable, we can use fes_describe_var
:
fes_describe_var(fesdb, c('animals_presence', 'mushrooms_production'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.