Skip to contents

Summarise TimeFish data by geography

Usage

timefish_summary_by_geo(
  data = timefish_join(),
  metric = c("abundance", "richness", "biomass"),
  level = c("country", "state", "site")
)

Arguments

data

A joined TimeFish data frame, usually from timefish_join().

metric

One of abundance, richness, or biomass.

level

One of country, state, or site.

Value

A data frame summarised at the requested geographic level.

Examples

timefish_summary_by_geo(metric = "biomass", level = "state")
#>   country          state longitude  latitude    value n_censos n_sites
#> 1  Brazil Santa Catarina -48.37950 -27.33282  495.823     2217      18
#> 2  Brazil      Sao Paulo -45.63326 -24.02124 6111.604      576      17
#>   n_locations
#> 1           8
#> 2           3