Import data from the NZ Freshwater Fish Database. Enter search terms as arguments as you would in the NZFFD and import directly into R. You can search using all the same query options which are used for in the NZFFFD, see their info page for details. To import the entire database leave all arguments as default.

nzffdr_import(
  institution = "",
  catchment_num = "",
  catchment_name = "",
  water_body = "",
  fish_method = "",
  taxon = "",
  starts = "",
  ends = "",
  download_format = "all"
)

Arguments

institution

institution that collected the data. Use the nzffdr_get_table("institution") function to see a list of all possible options, or don't set the arg if you want all institutions in the database.

catchment_num

catchment number. A 6 digit number unique to the reach of interest. You can search using the individual number (e.g. catchment = "702.500"), or for all rivers in a catchment you can use the wildcard search term (e.g. catchment = "702%"), or don't set the arg if you want all catchments in the database.

catchment_name

catchment name. e.g. catchment_name = "Hinds R". Case sensitive. Don't set the arg if you want all catchments in the database.

water_body

water body name. e.g. to get all records for Limestone Creek, water_body = "Limestone Creek". Don't set the arg if you want all water bodies in the database.

fish_method

fishing method used. Use the nzffdr_get_table("fish_method") function to see a list of all possible options. If you only want fish caught be lures use fish_meth = "Angling - Lure", don't set the arg if you want all fishing methods in the database.

taxon

taxon of interest. Use the nzffdr_get_table("taxon") function to see a list of all possible options. You can search using either common or scientific names and can search for multiple taxon at once, e.g. to search for Black mudfish use taxon = "Black mudfish" or taxon = "Neochanna diversus" and to search for Black mudfish and Bluegill bully use taxon = c("Black mudfish", "Bluegill bully") etc.

starts

start year. Don't set the arg if you want all records in the database.

ends

end year. Don't set the arg if you want all records in the database.

download_format

use "all" or "essential" to download either, all variables (67 columns), which now includes some River Environment Classification data, or just essential data (23 columns).

Value

A dataframe where each row is a NZFFD record.

Details

This function requires an internet connection to query NIWA's database.

Data citation: Stoffels R (2022). New Zealand Freshwater Fish Database (extended). The National Institute of Water and Atmospheric Research (NIWA). Sampling event dataset https://doi.org/10.15468/jbpw92

Examples

if (FALSE) {
# import entire NZFFD
dat <- nzffdr_import()
}