MABM_report | R Documentation |
This function generates an annual report for one or more MABM stations for, by default, the current calendar year. The report includes, for each route associated with a given station, (1) an overview of the year's efforts, (2) a night-by-night tabular summary with notes, if present, (3) a night-by-night tabular summary of species detections, (4) a tabular and graphical comparison of species detections from the current season with previous season(s), and (5) a map of the route indicating the locations of all bat detections for the season.
MABM_report( station = NULL, year = as.integer(format(Sys.Date(), "%Y")), MABM_dir = NULL, update = FALSE, distribute = TRUE, key = NULL, interactive = TRUE )
station |
character string indicating the MABM station (e.g., refuge, ES office) for which to produce a report. Default (NULL) prompts the user to select from a list of all available MABM stations. The selection of multiple stations is allowed. |
year |
integer indicating the year for which to generate the annual report; defaults to the current year |
MABM_dir |
character string indicating the base directory containing MABM station related data (i.e., MABM route directories with call files, shapefiles, and annual reports). See Details. |
update |
logical (default = FALSE) indicating whether to call a macro inside the MABM
database that exports the data necessary for annual report generation. Generally used
(i.e., update = TRUE) only if (1) this is the first time running |
distribute |
logical (default = TRUE) indicating whether to attempt to place the
output report in an 'Annual Report' directory within the base directory for each station,
if located. To work properly, a specific directory hierarchy is expected (see Details).
If 'distribute' = FALSE or distribute attempt fails (see Details), the output is placed
in an 'Annual Report' directory beneath |
key |
character scalar of Google Maps API key |
interactive |
logical (default = TRUE) indicating whether to attach an interactive leaflet map (*.html file) of bat detections along a route in a given year. If so, it is attached to, and exported with, the report *.pdf |
This is the base directory containing all relevant data for the whole complement of MABM stations. In short, this base directory should contain a separate directory for each MABM station (e.g., Big Oaks; name is not restricted). Each station directory should in turn contain a directory for *each* route named according to its shortened route name in the MABM database (e.g., BokNWR1 for Big Oaks NWR East route); the station directory may also contain an 'Annual Report' directory. An example hierarchy is shown below.
When TRUE, the function attempts to place the output in an 'Annual Report' directory located in the base directory for a given MABM station, alongside the separate directories for each route of that station. For this to work properly, the hierarchy outlined above must exist. If 'distribute' = TRUE but a directory matching the shortened route name (e.g., BokNWR1) is not located, or if 'distribute' = FALSE, the output is placed in an 'Annual Reports' directory just beneath the directory identified by 'MABM_dir', which is created if does not exist.
MABM
Big Lake
BglNWR
BglNWR_canonical_route.shp
Annual Report
Big Oaks
BokNWR1
BokNWR1_canonical_route.shp
BokNWR2
BokNWR2_canonical_route.shp
Annual Report
Map generation of detected bats occurs only if three requirements are met:
at least one bat call has been detected
the calls have been successfully georeferenced (i.e., they possess associated location information).
a shapefile (point or line) named with the form 'shortname_canonical_route.shp' (e.g., BokNWR1_canonical_route.shp') is present in its respective route directory
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.