R/taxon_search_demo.R

Defines functions taxon_search_demo

Documented in taxon_search_demo

#' Takes user input and obtains a query from iNaturalist using rinat
#' @name taxon_search_demo
#' @description Takes user input and obtains a query from iNaturalist using rinat
#' @param taxon_of_interest prompts user for taxon of interest
#' @param year_of_interest prompts user for what year they want to search
#' @return search_output the output of the users search from iNaturalist
#' @export
#' @import rinat


taxon_search_demo <- function(){
  taxon_of_interest <- c("chiroptera")
  year_of_interest <-  c(2020)
  loadNamespace("rinat")
  iNaturalist_output <- rinat::get_inat_obs(taxon_name = taxon_of_interest, place_id=97394, geo=TRUE, year = year_of_interest)
  search_output<<- data.frame(iNaturalist_output)
}
Sammibulin/NaturalR documentation built on Dec. 18, 2021, 12:56 p.m.