reporting_rate: Calculate the reporting rate of a species

Description Usage Arguments Details Value Examples

View source: R/reporting_rate.R

Description

Obtain a reporting rate of a species over a specified time period and spatial configuration.

Usage

1
2
3
reporting_rate(df, species_id, start_date = "1970-01-01",
  end_date = Sys.Date(), selected_area = "Kenya",
  selection_type = "Country")

Arguments

df

A dataframe obtained from the species API call. Use 'extract_data' if required.

species_id

An integer id. The KBM website has a list of all species with their ids.

start_date

A character or date object denoting the starting point from which reporting rate is to be measured.

selected_area

Either a pentad (eg: 0105_3930), country (eg: Kenya), county (eg: Kitui) or province (eg: rift valley). Lists of the same can be applied as well. For instance, for multiple pentads you could use, c('0105_3930', '0110c3620').

selection_type

Can take either of the four values: 'Pentad', 'Country', 'County' or 'Province'.

Details

Value

A numeric object between 0 and 1 (inclusive) denoting the reporting rate of a species. The reporting rate is equal to the number of times a species has been recorded divided by the number of full protocol cards in the specified time and area.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

# the reporting rate of African Paradise Flycatchers in the coastal region in Kenya.
reporting_rate(df,
species_id = 682,
start_date = '1970-01-01',
end_date = Sys.Date(),
selected_area = "Coast" ,
selection_type = "Province")


## End(Not run)

davidclarance/africabirdmap documentation built on Sept. 3, 2019, 12:34 p.m.