Description Usage Arguments Details Value Examples
View source: R/reporting_rate.R
Obtain a reporting rate of a species over a specified time period and spatial configuration.
1 2 3 | reporting_rate(df, species_id, start_date = "1970-01-01",
end_date = Sys.Date(), selected_area = "Kenya",
selection_type = "Country")
|
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'. |
This functions assumes that all years are 365 days. Necessary corrections for leap years are made.
For a full list of all possible values for selection_area, run 'View(africabirdmap::pentads_geographical_features)' in the console.
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.