Package {ethnoecologyR}


Type: Package
Title: Quantitative Ethnoecology Analysis and Landscape Knowledge Modeling
Version: 0.1.6
Description: A comprehensive toolkit for quantitative ethnoecology analysis and landscape knowledge modeling. Implements core indices including Landscape Use (LU), Cultural Importance in Ecology (CIE), Frequency of Citation (FC), Fidelity Level (FL), Number of Uses (NU), and Cultural Value of Ecolandscape (CVe). Provides visualization tools for chord diagrams, alluvial plots, radial plots, and bipartite networks, as well as Bayesian consensus modeling and bootstrap resampling to support reproducible research in Local Ecological Knowledge (LEK) and participatory land-use decision analysis. Methods are based on Tardío and Pardo-de-Santayana (2008) <doi:10.1007/s12231-007-9004-5>, Reyes-García et al. (2006) https://www.jstor.org/stable/4257061, and Friedman et al. (1986) <doi:10.1037/0022-3514.51.6.1173>.
License: GPL (≥ 3)
Encoding: UTF-8
LazyData: true
Imports: dplyr, magrittr, ggplot2, tidyr, circlize, ggalluvial, reshape2, rlang, boot, rstan, ggraph, tidygraph, tidyselect
Suggests: knitr, rmarkdown, cowplot, testthat (≥ 3.0.0)
Depends: R (≥ 3.5)
VignetteBuilder: knitr
Config/roxygen2/version: 8.1.0
NeedsCompilation: no
Packaged: 2026-11-06 16:18:06 UTC; marw0
Author: Marwan Setiawan ORCID iD [aut, cre]
Maintainer: Marwan Setiawan <marw002@brin.go.id>
Repository: CRAN
Date/Publication: 2026-11-06 17:00:02 UTC

ethnoecology: Quantitative Ethnoecology Analysis and Landscape Knowledge Modeling

Description

The ethnoecology package provides tools for quantifying Traditional Ecological Knowledge (LEK) in landscape and ecosystem contexts. It implements quantitative ethnoecology indices (Landscape Use Value, Cultural Importance in Ecology, Fidelity Level, etc.) and positions them within a larger framework of Bayesian modeling and participatory land-use decision analysis.

Author(s)

Maintainer: Marwan Setiawan marw002@brin.go.id (ORCID)

Authors:

References

Toledo, V. M. 2002. "Ethnoecology: A conceptual framework for the study of indigenous knowledge of nature." In *Ethnobiology and Biocultural Diversity*, edited by J. R. Stepp et al., 511-522.

Berkes, F. 2012. *Sacred Ecology*. 3rd ed. Routledge.

Tardío, J., and Pardo-de-Santayana, M. 2008. "Cultural Importance Indices: A Comparative Analysis Based on the Useful Wild Plants of Southern Cantabria (Northern Spain)." *Economic Botany* 62(1): 24-39.

Whitney, C. W., Bahati, J., and Gebauer, J. 2018. "Ethnobotany and Agrobiodiversity: Valuation of Plants in the Homegardens of Southwestern Uganda." *Ethnobiology Letters* 9(2): 1-12.


Cultural Importance in Ecology (CIE)

Description

Calculates the Cultural Importance in Ecology (CIE) index per landscape unit. CIE = LU / N, where N is the number of informants.

Usage

CIEs(data)

Arguments

data

an ethnoecology data set with columns 'informant' and 'landscape_unit'.

Value

Data frame with CIE values per landscape unit.

References

Tardío, J., and Pardo-de-Santayana, M. 2008. "Cultural Importance Indices: A Comparative Analysis Based on the Useful Wild Plants of Southern Cantabria (Northern Spain)." Economic Botany 62(1): 24-39.

Examples

  data(ethnoecology_data)
  CIEs(ethnoecology_data)

Cultural Value of Ecolandscape (CVe)

Description

Calculates the Cultural Value (CVe) per landscape unit. CVe = (LU / N) * (FC / N) where N = number of informants.

Usage

CVe_eco(data)

Arguments

data

an ethnoecology data set with columns 'informant' and 'landscape_unit'.

Value

Data frame with CVe values per landscape unit.

References

Reyes-García, V., Huanca, T., Vadez, V., Leonard, W., and Wilkie, D. 2006. "Cultural, Practical, and Economic Value of Wild Plants: A Quantitative Study in the Bolivian Amazon." Economic Botany 60(1): 62-74.

Examples

  data(ethnoecology_data)
  CVe_eco(ethnoecology_data)

Frequency of Citation (FC) for Ethnoecology

Description

Calculates the Frequency of Citation (FC) per landscape unit. FC = number of informants who mention the landscape unit for any use.

Usage

FCs_eco(data)

Arguments

data

an ethnoecology data set with columns 'informant' and 'landscape_unit'.

Value

Data frame with FC values per landscape unit.

References

Friedman, J., Yaniv, Z., Dafni, A., and Palevitch, D. 1986. "A Preliminary Classification of the Healing Potential of Medicinal Plants, Based on a Rational Analysis of an Ethnopharmacological Field Survey among Bedouins in the Negev Desert, Israel." Journal of Ethnopharmacology 16(2-3): 275-287.

Examples

  data(ethnoecology_data)
  FCs_eco(ethnoecology_data)

Fidelity Level (FL) for Ethnoecology

Description

Calculates the Fidelity Level (FL) per landscape unit for a specific use category. FL = (number of informants who mention the landscape unit for a specific use / total number of informants who mention the landscape unit for any use) * 100.

Usage

FLs_eco(data, use_category)

Arguments

data

an ethnoecology data set with columns 'informant' and 'landscape_unit'.

use_category

a character string specifying the use category column name.

Value

Data frame with FL values per landscape unit.

References

Friedman, J., Yaniv, Z., Dafni, A., and Palevitch, D. 1986. "A Preliminary Classification of the Healing Potential of Medicinal Plants, Based on a Rational Analysis of an Ethnopharmacological Field Survey among Bedouins in the Negev Desert, Israel." Journal of Ethnopharmacology 16(2-3): 275-287.

Examples

data(ethnoecology_data)
FLs_eco(ethnoecology_data, "use_forest")

Landscape Use (LU)

Description

Calculates the Landscape Use (LU) per landscape unit, a common metric for ethnoecology studies. This is the sum of all use reports for each landscape unit.

Usage

LUs(data)

Arguments

data

an ethnoecology data set with column 1 'informant' and column 2 'landscape_unit' as row identifiers of informants and of landscape units respectively. The rest of the columns are the identified ethnoecology use categories. The data should be populated with counts of uses per person (0 or 1 values).

Value

Data frame of landscape units and Landscape Use (LU) values.

Warning

Identification for informants and landscape units must be listed by the names 'informant' and 'landscape_unit' respectively in the data set. The rest of the columns should all represent separate identified ethnoecology use categories.

References

Tardío, J., and Pardo-de-Santayana, M. 2008. "Cultural Importance Indices: A Comparative Analysis Based on the Useful Wild Plants of Southern Cantabria (Northern Spain)." Economic Botany 62(1): 24-39.

Whitney, C. W., Bahati, J., and Gebauer, J. 2018. "Ethnobotany and Agrobiodiversity: Valuation of Plants in the Homegardens of Southwestern Uganda." Ethnobiology Letters 9(2): 1-12.

Examples

  data(ethnoecology_data)
  LUs(ethnoecology_data)

Number of Uses (NU) for Ethnoecology

Description

Calculates the Number of Uses (NU) per landscape unit. NU = total number of use categories reported for each landscape unit.

Usage

NUs_eco(data)

Arguments

data

an ethnoecology data set with columns 'informant' and 'landscape_unit'.

Value

Data frame with NU values per landscape unit.

Examples

  data(ethnoecology_data)
  NUs_eco(ethnoecology_data)

Bayesian Consensus Model for Landscape Knowledge

Description

Fits a Bayesian model to estimate consensus among informants regarding landscape use and ecological knowledge.

Usage

ethno_bayes_land(data, iter = 2000, chains = 4)

Arguments

data

an ethnoecology data set with columns 'informant' and 'landscape_unit'.

iter

number of MCMC iterations.

chains

number of MCMC chains.

Value

A Bayesian model object (Stan).

Examples


  data(ethnoecology_data)
  ethno_bayes_land(ethnoecology_data, iter = 1000, chains = 2)



Bootstrap Analyses of Ethnoecology Indices

Description

Performs bootstrap resampling to calculate confidence intervals for ethnoecology indices.

Usage

ethno_boot_land(data, index_function, R = 1000)

Arguments

data

an ethnoecology data set.

index_function

a function that calculates an ethnoecology index (e.g., LUs, CIEs).

R

number of bootstrap replicates.

Value

A list containing bootstrap results.

Examples


  data(ethnoecology_data)
  ethno_boot_land(ethnoecology_data, LUs, R = 100)



Prepare Ethnoecology Data

Description

Prepare Ethnoecology Data

Usage

ethno_data_prep(
  data,
  id_cols = c("informant", "landscape_unit"),
  pivot_long = TRUE
)

Arguments

data

Raw data frame.

id_cols

Columns to keep as identifiers (e.g., informant, landscape).

pivot_long

Logical. Convert wide to long format (default: TRUE).

Value

A cleaned and standardized data frame.


Habitat × Use-Category Cross-Analysis

Description

Habitat × Use-Category Cross-Analysis

Usage

ethno_habitat_analysis(
  data,
  habitat_col = "landscape_unit",
  use_col = "use_category",
  use_cols = NULL
)

Arguments

data

Data frame in wide or long format.

habitat_col

Column name for habitat (default "landscape_unit").

use_col

Column name for use-category. Auto-detects use_* columns if not present (wide format).

use_cols

Optional character vector of use columns for wide format. If NULL, columns starting with "use_" are auto-detected.

Value

A wide data frame with one row per habitat and one column per use-category.


Alluvial Plot of Landscape Uses

Description

Creates an alluvial diagram showing flows between informants, landscape units, and ecological uses.

Usage

ethno_landscape_alluvial(data)

Arguments

data

an ethnoecology data set with columns 'informant', 'landscape_unit', and use categories.

Value

A ggplot2 alluvial plot.

Examples


  data(ethnoecology_data)
  ethno_landscape_alluvial(ethnoecology_data)



Chord Diagram of Landscape Uses

Description

Creates a chord diagram showing relationships between informants, landscape units, and ecological uses.

Usage

ethno_landscape_chord(data, by = "landscape_unit")

Arguments

data

an ethnoecology data set with columns 'informant' and 'landscape_unit'.

by

grouping variable: "landscape_unit" or "informant".

Value

A chord diagram plot.

Examples


  data(ethnoecology_data)
  ethno_landscape_chord(ethnoecology_data, by = "landscape_unit")



Landscape Network Visualization

Description

Visualize bipartite relationships between landscape units (or informants) and the plant-use categories associated with them. The function accepts both wide- and long-format input, so users can pass data straight from Excel without prior reshaping.

Usage

ethno_landscape_network(data, by = "landscape_unit", use_cols = NULL)

Arguments

data

Data frame. Wide format: one row per (informant x landscape_unit) observation, with binary columns prefixed use_ (e.g., use_forest, use_water). Long format: contains a use_category column with category labels.

by

Grouping variable: "landscape_unit" (default) or "informant".

use_cols

Optional character vector of use columns for wide format. If NULL (default), columns starting with "use_" are auto-detected.

Value

A ggraph network plot (inherits ggplot).

Examples


# Wide format (package dataset)
ethno_landscape_network(ethnoecology_data)
ethno_landscape_network(ethnoecology_data, by = "informant")

# Long format
long_df <- data.frame(
  informant      = c("A", "A", "B", "B"),
  landscape_unit = c("L1", "L2", "L1", "L2"),
  use_category   = c("forest", "water", "forest", "agriculture")
)
ethno_landscape_network(long_df, by = "informant")


Generate Top-N Rankings

Description

Generate Top-N Rankings

Usage

ethno_ranking(data, index_function, top_n = 10)

Arguments

data

Data frame.

index_function

The index function to use (e.g., LUs, CIEs).

top_n

Number of top items to display (default: 10).

Value

A nicely formatted data frame.


Landscape Resilience Index (LRI)

Description

Computes the Landscape Resilience Index combining use-value intensity, functional richness, and Shannon diversity of use-categories per landscape unit.

Usage

ethno_resilience(data, use_col = "use_category", use_cols = NULL)

Arguments

data

Data frame in wide or long format.

use_col

Column name for use-category. Auto-detects use_* columns if not present (wide format).

use_cols

Optional character vector of use columns.

Value

A data frame with columns landscape_unit, UV, FL, H, and LRI, sorted by descending LRI.


Species / Unit Richness per Group

Description

Computes richness (number of distinct units) per group. Supports both long format (with an explicit count_col) and wide format (auto-detects alternative count column, or falls back to row count).

Usage

ethno_richness(data, group_by = "informant", count_col = "species")

Arguments

data

Data frame.

group_by

Column to group by (default "informant").

count_col

Column to count distinct values from (default "species"). If not found, auto-detects an alternative or falls back to row count.

Value

A data frame with columns group_by and Richness.


Global variables used in ethnoecologyR

Description

Internal declarations to suppress R CMD check NOTEs about non-standard evaluation (NSE) used in dplyr and ggplot2 calls. This file is not exported and not meant to be called by users.


Data Uji Coba untuk ethnoecologyR

Description

Dataset sintetis untuk menguji fungsi-fungsi dalam paket ethnoecologyR. Berisi 15 informan, 6 unit lanskap, dan 6 kategori penggunaan (0/1).

Usage

ethnoecology_data

Format

Data frame dengan 90 baris dan 8 kolom:

informant

ID informan (karakter)

landscape_unit

Nama unit lanskap (karakter)

use_forest

Penggunaan hutan (0/1)

use_water

Penggunaan air (0/1)

use_agriculture

Penggunaan pertanian (0/1)

use_hunting

Penggunaan perburuan (0/1)

use_fishing

Penggunaan perikanan (0/1)

use_gathering

Penggunaan pengumpulan (0/1)

Source

Data sintetis buatan.


Radial Bar Plot of Ethnoecology Indices

Description

Radial Bar Plot of Ethnoecology Indices

Usage

landscape_radial_plot(data, indices_list)

Arguments

data

An ethnoecology data set (data frame).

indices_list

A list of index functions to apply (e.g., list(LUs, CIEs)).

Value

A ggplot2 radial plot object.