Title: | A Shiny-Based Application for Generating Place-Based Species Lists for Australian Plants |
---|---|
Description: | This shiny-based application allows users to extract plant occurrence data from the Atlas of Living Australia and generate a species list for any defined area in New South Wales. All records associated with either a physical voucher (stored in Australian herbaria) or a photographic voucher (stored in iNaturalist) are extracted. For each species within the defined area, the application will return voucher type, number of vouchers, date of the most recent voucher, spatial coordinates, voucher location, and the voucher collector. Records are displayed both in a table and on a map, and are downloadable as a CSV. |
Authors: | Thomas Mesaglio [aut, cre, cph] , Will Cornwell [aut] , Fonti Kar [aut] |
Maintainer: | Thomas Mesaglio <[email protected]> |
License: | CC BY 4.0 |
Version: | 1.0.0 |
Built: | 2024-12-08 11:35:40 UTC |
Source: | https://github.com/traitecoevo/infinitylists |
This function downloads observation data for the given taxon and year range from the "Infinity List" source, processes and cleans the data, adds additional columns (e.g., establishment status), and optionally saves the raw and processed data.
download_ala_obs( taxon, year_range = c(1923, as.numeric(format(Sys.Date(), "%Y"))), save_raw_data = FALSE, output_dir = file.path(system.file(package = "infinitylists"), "data/") )
download_ala_obs( taxon, year_range = c(1923, as.numeric(format(Sys.Date(), "%Y"))), save_raw_data = FALSE, output_dir = file.path(system.file(package = "infinitylists"), "data/") )
taxon |
A character vector or string specifying the taxon (e.g., species, genus) for which observations are to be downloaded. |
year_range |
A numeric vector of length 2 indicating the start and end years for data retrieval. Default is from 1923 to the current year |
save_raw_data |
A logical value indicating whether to save the raw data.
By default, raw data is not saved ( |
output_dir |
A character string specifying the directory where any saved data
(raw or processed) will be stored. Default is |
The function carries out the following steps:
Retrieve the data from the "Infinity List" source.
Process and clean the retrieved data to remove any inconsistencies.
Add additional columns to the cleaned data, such as the establishment status for the given taxon.
If save_raw_data
is TRUE
, save the processed data to the specified output_dir
.
This function saves the processed data and returns invisibly. The structure and
content of the returned value (if any) is determined by the functions called
within (e.g., retrieve_data
, process_data
).
This function retrieves, processes, and saves GBIF (Global Biodiversity Information Facility) observation data for a specified taxon.
download_gbif_obs( taxon, min_year = 1923, max_year = as.numeric(format(Sys.Date(), "%Y")), country_code = NULL, save_raw_data = FALSE, output_dir = file.path(system.file(package = "infinitylists"), "data/") )
download_gbif_obs( taxon, min_year = 1923, max_year = as.numeric(format(Sys.Date(), "%Y")), country_code = NULL, save_raw_data = FALSE, output_dir = file.path(system.file(package = "infinitylists"), "data/") )
taxon |
Character. The taxon (species, genus, etc.) for which to retrieve GBIF data. |
min_year |
Numeric. The minimum year for the observations to be retrieved. Default is 1923. |
max_year |
Numeric. The maximum year for the observations to be retrieved. Default is the current year. |
country_code |
Character. The ISO 3166-1 alpha-2 country code to filter observations by country. Default is NULL (no country filter). |
save_raw_data |
Logical. Whether to save the raw data retrieved from GBIF. Default is FALSE. |
output_dir |
Character. The directory where the processed data will be saved. Default is a "data" directory within the "infinitylists" package. |
None. The function saves the processed data to the specified output directory.
Initializes and sets up the server-side logic for the Infinity List Shiny application. This function manages the user interactions, data processing, and rendering of both UI elements and outputs (tables, maps, stats). It handles file uploads, data filtering, and interaction with map elements.
infinity_server(...)
infinity_server(...)
... |
Additional arguments that might be passed to server functions. These could be passed from a Shiny UI function or another server function. |
The server function handles several main tasks:
Observes and processes KML file uploads.
Reactively creates polygons based on user inputs.
Filters and processes ALA data based on user-selected polygons.
Computes and displays statistics about observed species.
Updates select input choices based on the available data.
Renders and displays a data table with specific details.
Provides a CSV download handler for the displayed data.
Renders a Leaflet map with markers, polygons, and buffers.
Key internal functions include:
load_place()
: For processing KML files.
create_circle_polygon()
: To create polygons from user inputs.
points_in_target()
: To determine if points lie within a target polygon.
points_in_buffer()
: To determine if points lie within a buffer around a polygon.
filter_by_taxon()
: Filters the ALA data by selected taxa.
add_buffer()
: Adds a buffer around a given polygon.
This function sets up and returns a server function for the Shiny app. It does not have a direct return value, but rather, it sets up reactive outputs, observers, and expressions that the Shiny app will utilize.
infinitylistApp
: Main function that launches the Infinity List Shiny app.
This function initializes and runs the "Infinity List" application using
Shiny. Before launching, it checks for any available updates and downloads
them if necessary. The app provides a user interface (ui
) and server-side
logic (server
) to interactively work with the Infinity List.
infinitylistApp(...)
infinitylistApp(...)
... |
Additional arguments passed to |
The function carries out the following steps:
Checks and downloads any available updates using check_and_download_update()
.
Initializes the user interface (ui
) for the application.
Sets up the server-side logic (server
) for the application.
Launches the Shiny application using shinyApp()
.
This function launches the Shiny application and does not return until the app is terminated by the user.
## Not run: # Launch the Infinity List App infinitylistApp() ## End(Not run)
## Not run: # Launch the Infinity List App infinitylistApp() ## End(Not run)
Generate galah query for Global GBIF Node
query_gbif_global(taxon, min_year, max_year, country_code = NULL)
query_gbif_global(taxon, min_year, max_year, country_code = NULL)
taxon |
character, genus/family/kingdom |
min_year |
numeric, year cut off for query, only records where year >= min_year will be included |
max_year |
numeric, year cut off for query, only records where year <= max_year will be included |
country_code |
character, code for country |