| Title: | Ethnobotanical Analysis, Decision-Framing, and TEK Modeling |
|---|---|
| Description: | Tools for quantifying Traditional Ecological Knowledge (TEK), modeling TEK in decision frameworks, and designing structured decision-framing exercises in conservation and development contexts. The package implements quantitative ethnobotany indices (Use Value, Relative Frequency of Citation, etc.) but positions them within a larger framework of Bayesian modeling and participatory decision analysis. Includes critical assessment of indices' limitations and case studies of participatory workshops. |
| Authors: | Cory Whitney [aut, cre] |
| Maintainer: | Cory Whitney <[email protected]> |
| License: | GPL |
| Version: | 0.3.0 |
| Built: | 2026-10-07 09:39:42 UTC |
| Source: | https://github.com/cwwhitney/ethnobotanyr |
Calculates the Cultural Importance Index (CI) per species.
CIs(data)CIs(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per informant (should be 0 or 1 values). |
Data frame of species and Cultural Importance Index (CI) values.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Tardio, Javier, and Manuel Pardo-de-Santayana. 2008. “Cultural Importance Indices: A Comparative Analysis Based on the Useful Wild Plants of Southern Cantabria (Northern Spain) 1.” 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), 90-100. doi:10.14237/ebl.9.2.2018.503
#Use built-in ethnobotany data example CIs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) CIs(eb_data)#Use built-in ethnobotany data example CIs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) CIs(eb_data)
Calculates the Cultural Value (CVe) per ethnospecies.
CVe(data)CVe(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of ethnospecies names respectively. |
Data frame of ethnospecies and Cultural Value (CVe) values.
Identification for informants and ethnospecies must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Reyes-Garcia, V., T. Huanca, V. Vadez, and W. Leonard. 2006. “Cultural, Practical, and Economic Value of Wild Plants: A Quantitative Study in the Bolivian Amazon.” Economic Botany.
#Use built-in ethnobotany data example CVe(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) CVe(eb_data)#Use built-in ethnobotany data example CVe(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) CVe(eb_data)
Creates a simple alluvial plot of species and uses for ethnobotany studies.
ethno_alluvial(data, alpha = 0, colors = NULL)ethno_alluvial(data, alpha = 0, colors = NULL)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
alpha |
is a number between 0 and 1 for the level of transparency behind the labels on the strata (default is 0). |
colors |
is the color palette to be used for the fill of the bars. The default is from the rainbow palette with the number of plants in the data |
Alluvial diagram showing all use reports for each use (center) related to each species (left) and informant (right) in the data set.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns represent the identified ethnobotany use categories. These data should be populated with counts of uses per person (should be 0 or 1 values).
Mon, Aye Mya, Yinxian Shi, Xuefei Yang, Pyae Phyo Hein, Thaung Naing Oo, Cory Whitney, and Yongping Yang. “The Uses of Fig (Ficus) by Five Ethnic Minority Communities in Southern Shan State, Myanmar.” Journal of Ethnobiology and Ethnomedicine 16, no. 5 (2020). doi:10.1186/s13002-020-00406-z
#Use built-in ethnobotany data example ethno_alluvial(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) # Default plot #### ethno_alluvial(eb_data)#Use built-in ethnobotany data example ethno_alluvial(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) # Default plot #### ethno_alluvial(eb_data)
Determine the probability that informant citations for a given use are 'correct' given informant responses to the use category for each plant, an estimate of each person's prior_for_answers with this plant and use, and the number of possible answers about this plant use.
ethno_bayes_consensus(data, answers = 2, prior_for_answers, prior = -1)ethno_bayes_consensus(data, answers = 2, prior_for_answers, prior = -1)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
answers |
The number of possible answers per question. Responses must be whole numbers from 0 to answers - 1: use 2 for 0/1 data, or 11 for counts of 0 to 10. |
prior_for_answers |
Informant competence (probability of knowing the answer, 0 to 1): a single value or one value per row of data. Required. Competence is supplied, not estimated. |
prior |
a prior distribution of probabilities over all answers as a matrix. If this is not provided the function assumes a uniform distribution (prior = -1). |
A matrix of posterior probabilities: rows are the answers 0 to answers - 1 (for binary data 0 = not used, 1 = used), columns are use categories.
A matrix, where columns represent plant use categories and rows represent responses per person and plant (matching the data). Each value represents the bayes_consensus that an answer was 'correct' for a particular use, within the cultural consensus framework.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
ethnobotanyR users often have a large number of counts in cells of the data set after categorization (i.e one user cites ten different ‘food’ uses but this is just one category). Most quantitative ethnobotany tools are not equipped for cases where the theoretical maximum number of use reports in one category, for one species by one informant is >1. This function and the bayes_boot function may be useful to work with these richer datasets for the Bayes consensus analysis.
Oravecz, Z., Vandekerckhove, J., & Batchelder, W. H. (2014). Bayesian Cultural Consensus Theory. Field Methods, 1525822X13520280. doi:10.1177/1525822X13520280
Romney, A. K., Weller, S. C., & Batchelder, W. H. (1986). Culture as Consensus: A Theory of Culture and Informant Accuracy. American Anthropologist, 88(2), 313-338.
#Use built-in ethnobotany data example #assign a non-informative prior to prior_for_answers with 'prior_for_answers=0.5' ethno_bayes_consensus(ethnobotanydata, answers = 2, prior_for_answers = 0.5, prior = -1) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) #assign a non-informative prior to prior_for_answers eb_prior_for_answers <- rep(0.5, len = nrow(eb_data)) ethno_bayes_consensus(eb_data, answers = 2, prior_for_answers = eb_prior_for_answers)#Use built-in ethnobotany data example #assign a non-informative prior to prior_for_answers with 'prior_for_answers=0.5' ethno_bayes_consensus(ethnobotanydata, answers = 2, prior_for_answers = 0.5, prior = -1) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) #assign a non-informative prior to prior_for_answers eb_prior_for_answers <- rep(0.5, len = nrow(eb_data)) ethno_bayes_consensus(eb_data, answers = 2, prior_for_answers = eb_prior_for_answers)
Posterior probability that a random informant cites a use for a species, with a credible interval. Valid for small samples and rare uses, where the bootstrap in ethno_boot fails.
ethno_beta(data, level = 0.9, prior = c(1, 1))ethno_beta(data, level = 0.9, prior = c(1, 1))
data |
An ethnobotany data set with columns 'informant' and 'sp_name' and one column per use category. Any value above 0 counts as a citation. |
level |
Credible interval level. Default 0.9. |
prior |
Beta prior, c(a, b). Default c(1, 1) is uniform. |
A data frame with one row per species and use: 'k' informants citing, 'n' informants, posterior 'mean', 'lower' and 'upper'.
Informants are treated as independent and as a random sample of the community. This is the share of informants citing a use, not the Use Value, which can exceed 1.
ethno_beta(ethnobotanydata)ethno_beta(ethnobotanydata)
Creates a non-parametric bootstrap as a Bayesian Model https://www.sumsar.net/blog/2015/04/the-non-parametric-bootstrap-as-a-bayesian-model/. This is meant to be applied for ethnobotany data and indices in the ethnobotanyR package. Performs a Bayesian bootstrap and returns a sample of size 'n1' representing the posterior distribution of the chosen statistic (i.e. 'mean'). The function returns a vector if the statistic is one-dimensional (like for mean(...)) or a data.frame if the statistic is multi-dimensional (like for the coefficients 'coefs.' of a regression model 'lm').
ethno_boot(data, statistic, n1 = 1000, n2 = NULL, use_weights = FALSE, ...)ethno_boot(data, statistic, n1 = 1000, n2 = NULL, use_weights = FALSE, ...)
data |
Can be either a vector, matrix or a data.frame. |
statistic |
A function that accepts data as its first argument. Should return a numeric vector. |
n1 |
The size of the bootstrap sample. |
n2 |
The sample size used to calculate the statistic for each bootstrap draw. Defaults to the number of observations. Ignored if 'use_weights = TRUE'. |
use_weights |
If TRUE the statistic is called as 'statistic(data, w)' with Dirichlet weights 'w' (e.g. 'weighted.mean'), the exact Bayesian bootstrap with no extra resampling noise. Default FALSE resamples 'n2' observations with the weights as probabilities. |
... |
Further arguments passed on to the statistic function. |
Bayesian bootstrap of chosen ethnobotany indices in ethnobotanyR package.
The bootstrap only reweights observed values. If all observations are identical (e.g. a use cited by 0 of n informants) every draw is identical and the interval has zero width, which is not credible for rare uses; the function warns in this case. For a binary use, a Beta-binomial posterior such as 'rbeta(n1, k + 1, n - k + 1)' is more appropriate. Rows are treated as independent, so clustering by informant, species or village is ignored.
This function was inspired by Rasmus Bååth's “The Non-Parametric Bootstrap as a Bayesian Model” Publishable Stuff, 2015. https://www.sumsar.net/blog/2015/04/the-non-parametric-bootstrap-as-a-bayesian-model/. In order to understand the various possible applications of this function for ethnobotany analyses it is important to read through that work.
ethnobotanyR users often have a large number of counts in cells of the data set after categorization (i.e one user cites ten different ‘food’ uses but this is just one category). Most quantitative ethnobotany tools are not equipped for cases where the theoretical maximum number of use reports in one category, for one species by one informant is >1. This function and the ethno_bayes_consensus function may be useful to work with these richer datasets for the Bayes consensus analysis.
Bååth, Rasmus. “The Non-Parametric Bootstrap as a Bayesian Model” Publishable Stuff, 2015. https://www.sumsar.net/blog/2015/04/the-non-parametric-bootstrap-as-a-bayesian-model/. Rubin, Donald B. “The Bayesian Bootstrap.” Annals of Statistics 9, no. 1 (January 1981): 130–34. doi:10.1214/aos/1176345338.
#Use built-in ethnobotany data example ethno_boot(data = ethnobotanydata$Use_1, statistic = mean, n1 = 1000) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) # Simple Bayesian bootstrap of the mean #### boot_dataUR <- URs(eb_data) ethno_boot(data = boot_dataUR$URs, statistic = mean) # Generate random dataset of three informants with multiple uses for four species eb_multi_use_data <- data.frame(replicate(10,sample(0:10,20,rep=TRUE))) names(eb_multi_use_data) <- gsub(x = names(eb_multi_use_data), pattern = "X", replacement = "Use_") eb_multi_use_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_multi_use_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) # Simple Bayesian bootstrap of the mean of Use_1 #### ethno_boot(data = eb_multi_use_data$Use_1, statistic = mean)#Use built-in ethnobotany data example ethno_boot(data = ethnobotanydata$Use_1, statistic = mean, n1 = 1000) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) # Simple Bayesian bootstrap of the mean #### boot_dataUR <- URs(eb_data) ethno_boot(data = boot_dataUR$URs, statistic = mean) # Generate random dataset of three informants with multiple uses for four species eb_multi_use_data <- data.frame(replicate(10,sample(0:10,20,rep=TRUE))) names(eb_multi_use_data) <- gsub(x = names(eb_multi_use_data), pattern = "X", replacement = "Use_") eb_multi_use_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_multi_use_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) # Simple Bayesian bootstrap of the mean of Use_1 #### ethno_boot(data = eb_multi_use_data$Use_1, statistic = mean)
One-parameter consensus model for binary use data. Each informant has a competence D (0 = guessing, 1 = always agrees with the consensus), estimated from agreement with other informants across all species-use questions. Returns the probability that each species-use is 'used' in the consensus answer key. Fitted by EM (maximum a posteriori; competence has a Laplace smoothing prior).
ethno_consensus(data, prior_used = 0.5, max_iter = 100, tol = 1e-06)ethno_consensus(data, prior_used = 0.5, max_iter = 100, tol = 1e-06)
data |
An ethnobotany data set with columns 'informant' and 'sp_name' and one column per use category. Any value above 0 counts as a citation. |
prior_used |
Prior probability that a species-use is 'used'. Default 0.5. |
max_iter |
Maximum EM iterations. Default 100. |
tol |
Convergence tolerance. Default 1e-6. |
A list with 'truth' (data frame: sp_name, use, p_used), 'competence' (data frame: informant, D) and 'converged'.
Assumes one shared answer key and informants of equal knowledge across questions. Minority knowledge, such as healer or gender-specific knowledge, is treated as error. Needs many questions per informant (species x uses) and informants (roughly 10 or more) to estimate competence; with few the results are unstable. Probabilities become extreme as informants are added, so read them as ranks, not as calibrated certainty. Check that informants who disagree are not a different knowledge group before using.
Oravecz, Z., Vandekerckhove, J., & Batchelder, W. H. (2014). Bayesian Cultural Consensus Theory. Field Methods. doi:10.1177/1525822X13520280
Romney, A. K., Weller, S. C., & Batchelder, W. H. (1986). Culture as Consensus: A Theory of Culture and Informant Accuracy. American Anthropologist, 88(2), 313-338.
ethno_consensus(ethnobotanydata)ethno_consensus(ethnobotanydata)
Number of distinct species-use citations as informants are added in random order. A curve that is still rising means more interviews would still find new uses, so use probabilities and rankings are likely to change.
ethno_saturation(data, n_perm = 200, level = 0.9)ethno_saturation(data, n_perm = 200, level = 0.9)
data |
An ethnobotany data set with columns 'informant' and 'sp_name' and one column per use category. Any value above 0 counts as a citation. |
n_perm |
Number of random informant orderings. Default 200. |
level |
Interval level across orderings. Default 0.9. |
A data frame with 'n_informants', and the 'mean', 'lower' and 'upper' number of distinct species-use pairs.
sat <- ethno_saturation(ethnobotanydata) plot(sat$n_informants, sat$mean, type = "l", xlab = "Informants", ylab = "Distinct species-use pairs")sat <- ethno_saturation(ethnobotanydata) plot(sat$n_informants, sat$mean, type = "l", xlab = "Informants", ylab = "Distinct species-use pairs")
An ethnobotany dataset from 20 informants, four species and 10 uses column 1 'informant' lists the names or id's of knowledge holders column 2 'sp_name' lists the names or id's of species The other 10 columns are the identified ethnobotany use categories. The data is populated with counts of uses per person (0 and 1 values).
ethnobotanydataethnobotanydata
A data frame with 80 rows and 12 variables:
anonymized id's of 20 knowledge holders
id's of four species
one of the categorized uses of species, 0 and 1 values
one of the categorized uses of species, 0 and 1 values
one of the categorized uses of species, 0 and 1 values
one of the categorized uses of species, 0 and 1 values
one of the categorized uses of species, 0 and 1 values
one of the categorized uses of species, 0 and 1 values
one of the categorized uses of species, 0 and 1 values
one of the categorized uses of species, 0 and 1 values
one of the categorized uses of species, 0 and 1 values
one of the categorized uses of species, 0 and 1 values
...
Creates a simple chord diagram of species and uses for ethnobotany studies. For more on the circlize package see Zuguang Gu's 'Circular Visualization in R' https://jokergoo.github.io/circlize_book/book/
ethnoChord(data, by)ethnoChord(data, by)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
by |
indicates the variable that should be mapped to the bottom of the chord diagram. This automatically defaults to the column referring to the species (by = "sp_name") |
Chord diagram figure for each use by 'informant' (top half) related to each 'sp_name' (bottom half) in the data set. To change variable names try using the dplyr rename function.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns represent the identified ethnobotany use categories. These data should be populated with counts of uses per person (should be 0 or 1 values).
Gu, Zuguang, Lei Gu, Roland Eils, Matthias Schlesner, and Benedikt Brors. “Circlize Implements and Enhances Circular Visualization in R.” Bioinformatics, 2014, 393.
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), 90-100. doi:10.14237/ebl.9.2.2018.503
#Use built-in ethnobotany data example ethnoChord(ethnobotanydata, by = "informant") #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) ethnoChord(eb_data, by = "informant")#Use built-in ethnobotany data example ethnoChord(ethnobotanydata, by = "informant") #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) ethnoChord(eb_data, by = "informant")
Calculates the frequency of citation (FC) per species.
FCs(data)FCs(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
Data frame of species and frequency of citation (FC) values.
Prance, G. T., W. Balee, B. M. Boom, and R. L. Carneiro. 1987. “Quantitative Ethnobotany and the Case for Conservation in Amazonia.” Conservation Biology 1 (4): 296–310.
#Use built-in ethnobotany data example FCs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) FCs(eb_data)#Use built-in ethnobotany data example FCs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) FCs(eb_data)
Calculates the fidelity level (FL) of the various uses of a species, i.e. the ratio between the number of informants who independently cite the use of a species for the same purposes (Ns * 100) and the total number of informants who mentioned the plant for any use (FCs).
FLs(data)FLs(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
Data frame of species and fidelity level (FL) values.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Friedman, J., Z. Yaniv, A. Dafni, and D. Palewitch. 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–87.
#Use built-in ethnobotany data example FLs(ethnobotanydata) #returns the primary use category (Primary.use) and the FLs value #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) FLs(eb_data)#Use built-in ethnobotany data example FLs(ethnobotanydata) #returns the primary use category (Primary.use) and the FLs value #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) FLs(eb_data)
Plants recorded in 102 homegardens in southwestern Uganda, with 14 use categories. Each informant is one family's garden. Same format as ethnobotanydata. This is the data set analyzed in Whitney et al. (2018); see also Whitney et al. (2017).
homegardenshomegardens
A data frame with 2870 rows and 16 variables:
garden id (102 gardens); letters are the survey site, number is the garden
225 species names
use categories, 0 = not used, 1 = used
One row is one species in one garden. Gardens only have rows for species they grow, so the number of informants differs by species: ethno_beta() estimates the share of gardens growing a species that use it. Use columns are 0/1 (1 = the species is used for that purpose in that garden); one species can have several uses. The data match the published analysis: 3,961 use reports, 225 species, 102 gardens. Only plants recorded on the first visit and identified were kept (as in the paper); the 'weed' category is excluded. Species names are as recorded in the survey, reduced to genus and epithet (or Musa group). Some uses are rare (for example, manure has 2 use reports); drop or merge sparse categories before modeling.
Survey data of Whitney et al. (2017, 2018), held by the author (GitHub repository CWWhitney/Uganda_Homegarden_Agrobiodiv, files AllRawNoWeeds_v7.csv and GardenStats.csv). Rebuilt by data-raw/homegardens.R in the package source.
Whitney C, Tabuti JRS, Hensel O, Yeh C, Gebauer J, Luedeling E (2017). Homegardens and the future of food and nutrition security in southwest Uganda. Agricultural Systems, 154, 133-144. doi:10.1016/j.agsy.2017.03.009
Whitney C, Bahati J, Gebauer J (2018). Ethnobotany and agrobiodiversity: valuation of plants in the homegardens of southwestern Uganda. Ethnobiology Letters, 9(2), 90-100. doi:10.14237/ebl.9.2.2018.503
homegardens_info, homegardens_species
# share of gardens growing a species that report each use head(ethno_beta(homegardens[homegardens$sp_name == "Persea americana", ]))# share of gardens growing a species that report each use head(ethno_beta(homegardens[homegardens$sp_name == "Persea americana", ]))
One row per garden in homegardens, for modeling use by garden. Coordinates, informant names and household characteristics of the survey are not included.
homegardens_infohomegardens_info
A data frame with 102 rows and 7 variables:
garden id, matches homegardens$informant
Bushenyi, Rubirizi or Sheema
survey village (9)
altitude in metres
garden area in square metres
distance to the nearest market in km
travel time to the nearest market in hours
Survey data of Whitney et al. (2017, 2018), file GardenStats.csv.
Whitney C, Tabuti JRS, Hensel O, Yeh C, Gebauer J, Luedeling E (2017). Homegardens and the future of food and nutrition security in southwest Uganda. Agricultural Systems, 154, 133-144. doi:10.1016/j.agsy.2017.03.009
One row per species in homegardens, as recorded in the survey. Species with conflicting records take the most frequent value; three family typos were resolved by hand (see data-raw/homegardens.R).
homegardens_specieshomegardens_species
A data frame with 225 rows and 4 variables:
species, matches homegardens$sp_name
life form: annual forb, annual grass, palm, perennial forb, perennial grass, shrub, tree or vine
plant family as recorded
1 = recorded as native, 0 = recorded as not native
Survey data of Whitney et al. (2017, 2018), file AllRawNoWeeds_v7.csv.
Whitney C, Bahati J, Gebauer J (2018). Ethnobotany and agrobiodiversity: valuation of plants in the homegardens of southwestern Uganda. Ethnobiology Letters, 9(2), 90-100. doi:10.14237/ebl.9.2.2018.503
Calculates the number of uses (NU) per species.
NUs(data)NUs(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
Data frame of species and number of uses (NU) values.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Prance, G. T., W. Balee, B. M. Boom, and R. L. Carneiro. 1987. “Quantitative Ethnobotany and the Case for Conservation in Amazonia.” Conservation Biology 1 (4): 296–310.
#Use built-in ethnobotany data example NUs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) NUs(eb_data)#Use built-in ethnobotany data example NUs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) NUs(eb_data)
Creates a radial bar plot of ethnobotany indices in ethnobotanyR package using the ggplot2 library https://ggplot2.tidyverse.org/.
Radial_plot(data, analysis, colors = NULL, legend = "none")Radial_plot(data, analysis, colors = NULL, legend = "none")
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
analysis |
is one of the quantitative ethnobotany functions from ethnobotanyR, i.e. ethnobotanyR::FCs. |
colors |
is the color palette to be used for the fill of the bars. The default is from the rainbow palette with the number of plants |
legend |
is the option for placing a legend in the radial plot (fits ggplot2 'legend.position' argument). The default is "none" |
Radial bar plot of chosen ethnobotany indices in ethnobotanyR package.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Wickham, Hadley. “Reshaping Data with the Reshape Package.” Journal of Statistical Software 21, no. 12 (2007): 1–20.
Wickham, Hadley. ggplot2: Elegant Graphics for Data Analysis. Springer, 2016.
#Use built-in ethnobotany data example and Frequency of Citation function FCs() Radial_plot(ethnobotanydata, analysis = FCs) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) Radial_plot(data = eb_data, analysis = URs, legend = "none")#Use built-in ethnobotany data example and Frequency of Citation function FCs() Radial_plot(ethnobotanydata, analysis = FCs) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) Radial_plot(data = eb_data, analysis = URs, legend = "none")
Calculates the relative frequency of citation (RFC) per species published by Pardo-de-Santayana (2003).
RFCs(data)RFCs(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
Data frame of species and relative frequency of citation (RFC) values.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Tardio, Javier, and Manuel Pardo-de-Santayana. 2008. “Cultural Importance Indices: A Comparative Analysis Based on the Useful Wild Plants of Southern Cantabria (Northern Spain) 1.” Economic Botany 62 (1): 24–39.
#Use built-in ethnobotany data example RFCs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) RFCs(eb_data)#Use built-in ethnobotany data example RFCs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) RFCs(eb_data)
Calculates the relative importance index (RI) per species, published by Pardo-de-Santayana (2003).
RIs(data)RIs(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
Data frame of species and relative importance index (RI) values.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Tardio, Javier, and Manuel Pardo-de-Santayana. 2008. “Cultural Importance Indices: A Comparative Analysis Based on the Useful Wild Plants of Southern Cantabria (Northern Spain) 1.” Economic Botany 62 (1): 24–39.
#Use built-in ethnobotany data example RIs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) RIs(eb_data)#Use built-in ethnobotany data example RIs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) RIs(eb_data)
Calculates the simplified use value (UV) index for each species in the data set (see Albuquerque et al. 2006). This is calculated the same as the CIs function.
simple_UVs(data)simple_UVs(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
Data frame of species and simplified use value (UV) index values.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Albuquerque, Ulysses P., Reinaldo FP Lucena, Julio M.Monteiro, Alissandra TN Florentino, and Cecilia de Fatima CBR Almeida. 2006. “Evaluating Two Quantitative Ethnobotanical Techniques.” Ethnobotany Research and Applications 4: 51–60.
#Use built-in ethnobotany data example simple_UVs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) simple_UVs(eb_data)#Use built-in ethnobotany data example simple_UVs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) simple_UVs(eb_data)
Calculates the use reports (UR) per species, a common metric for ethnobotany studies.
URs(data)URs(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
Data frame of species and use reports (UR) values.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Prance, G. T., W. Balee, B. M. Boom, and R. L. Carneiro. 1987. “Quantitative Ethnobotany and the Case for Conservation in Amazonia.” Conservation Biology 1 (4): 296–310.
Whitney, Cory W., J. Gebauer, and M. Anderson. “A Survey of Wild Collection and Cultivation of Indigenous Species in Iceland.” Human Ecology 40, no. 5 (2012): 781–87. doi:10.1007/s10745-012-9517-0
#Use built-in ethnobotany data example URs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10, sample(0:1, 20, rep = TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace = TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace = TRUE) URs(eb_data)#Use built-in ethnobotany data example URs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10, sample(0:1, 20, rep = TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace = TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace = TRUE) URs(eb_data)
Calculates the sum of all ethnobotany use reports (UR) for all species, a common metric for ethnobotany studies.
URsum(data)URsum(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
Single value sum of all ethnobotany use reports (UR) for all species in the data.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Prance, G. T., W. Balee, B. M. Boom, and R. L. Carneiro. 1987. “Quantitative Ethnobotany and the Case for Conservation in Amazonia.” Conservation Biology 1 (4): 296–310.
#Use built-in ethnobotany data example URsum(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) URsum(eb_data)#Use built-in ethnobotany data example URsum(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant <- sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name <- sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) URsum(eb_data)
Calculates the use value (UV) index for each species in the data set (see Tardio and Pardo-de-Santayana 2008). This is calculated the same as the CIs function.
UVs(data)UVs(data)
data |
is an ethnobotany data set with column 1 'informant' and 2 'sp_name' as row identifiers of informants and of species names respectively. The rest of the columns are the identified ethnobotany use categories. The data should be populated with counts of uses per person (should be 0 or 1 values). |
Data frame of species and use value (UV) index results.
Identification for informants and species must be listed by the names 'informant' and 'sp_name' respectively in the data set. The rest of the columns should all represent separate identified ethnobotany use categories. These data should be populated with counts of uses per informant (should be 0 or 1 values).
Tardio, Javier, and Manuel Pardo-de-Santayana. “Cultural Importance Indices: A Comparative Analysis Based on the Useful Wild Plants of Southern Cantabria (Northern Spain)1.” Economic Botany 62, no. 1 (May 2008): 24–39. doi:10.1007/s12231-007-9004-5
#Use built-in ethnobotany data example UVs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) UVs(eb_data)#Use built-in ethnobotany data example UVs(ethnobotanydata) #Generate random dataset of three informants uses for four species eb_data <- data.frame(replicate(10,sample(0:1,20,rep=TRUE))) names(eb_data) <- gsub(x = names(eb_data), pattern = "X", replacement = "Use_") eb_data$informant<-sample(c('User_1', 'User_2', 'User_3'), 20, replace=TRUE) eb_data$sp_name<-sample(c('sp_1', 'sp_2', 'sp_3', 'sp_4'), 20, replace=TRUE) UVs(eb_data)