
diversity_concentration(): 渔获量的多样性与集中度
Source:vignettes/articles/zh/reference/diversity_concentration.Rmd
diversity_concentration.Rmd说明
该函数逐年计算:
- 上报的物种数(有渔获量且鉴定到种的条目数)和有渔获量的国家数;
- 基于FAO物种条目计算的渔获量香农多样性指数
H = -\sum p_i \ln p_i,其中p_i为条目i的占比; - 物种条目和国家的赫芬达尔-赫希曼指数(HHI),即各百分比占比的平方和(取值0至10 000;通常认为高于2 500为高度集中);
- 最大的
top_n个物种条目和国家所占的比例。
English
This function computes, for each year:
- the number of species reported (items identified to species with catch) and the number of countries with catch;
- the Shannon diversity index of the catch over FAO species items,
H = -\sum p_i \ln p_i, wherep_iis the share of itemi; - the Herfindahl-Hirschman index (HHI) of species items and of countries, the sum of squared percentage shares (0 to 10 000; above 2 500 is usually read as highly concentrated);
- the share of the
top_nlargest species items and countries.
用法
diversity_concentration(
area_data,
top_n = 5,
plot = TRUE,
table = TRUE,
lang = NULL,
pptx = getOption("faofishingreport.pptx", FALSE),
plot_show = fao_setting("plot_show"),
label = NULL
)参数
area_data-
FAO渔获数据:
fishing_area_data()$area_data,或load_fao_data()的任意子集(例如一个国家,或几个渔区)。English
FAO catch data:fishing_area_data()$area_data, or any subset ofload_fao_data()(e.g. one country, or several fishing areas). top_n-
计算前几名所占比例时取的最大物种数和国家数。默认为5。
English
The number of largest species and countries for the top share. Default is 5. plot-
逻辑值。为TRUE(默认)时,图表保存在figures/png/summary/。
English
A logical value. If TRUE (default), charts are saved infigures/png/summary/. table-
逻辑值。为TRUE(默认)时,表格保存在tables/。
English
A logical value. If TRUE (default), tables are saved intables/. lang-
图表文字和名称的语言:“en”(英文)、“zh”(中文)或”both”(中英双语)。默认为NULL,即使用
fao_settings()设置的语言(未更改时为”en”)。English
The language of the chart text and names: “en” (English), “zh” (Chinese) or “both” (Chinese and English). Default is NULL, which uses the language set withfao_settings()(“en” unless changed). pptx-
逻辑值。为TRUE时,图表还另存为可编辑的PowerPoint文件,保存在figures/pptx/summary/。默认为FALSE,可以用
fao_settings(pptx = TRUE)为所有函数统一更改。English
A logical value. If TRUE, charts are also saved as editable PowerPoint files infigures/pptx/summary/. Default is FALSE, which can be changed for all functions withfao_settings(pptx = TRUE). plot_show-
逻辑值。为TRUE时,每张图在保存的同时也画在绘图窗口中(例如RStudio的Plots窗格),便于立即查看。默认为FALSE,可以用
fao_settings(plot_show = TRUE)为所有函数统一更改。无论是否显示,图表都会保存为文件(plot = TRUE)。English
A logical value. If TRUE, each chart is also drawn in the plot window (e.g. the Plots pane of RStudio) as it is saved, to look at it at once. Default is FALSE, which can be changed for all functions withfao_settings(plot_show = TRUE). The charts are saved as files (plot = TRUE) either way. label-
输出文件名中使用的名称。默认为数据所属的渔区(或国家)。
English
The name used in the output file names. Default is the fishing area (or the country) of the data.
另请参阅
Other summary analyses: area_overview(),
coastal_distant(), country_group_summary(),
data_quality(), peak_trend(),
regime_shift(), species_group_composition(),
stock_status()
示例
FAO27 <- fishing_area_data("Atlantic, Northeast", plot = FALSE)
diversity_concentration(FAO27$area_data, lang = "zh")