nzffdr: an R package to import, clean and update data from the New Zealand Freshwater Fish Database
The New Zealand Freshwater Fish Database (NZFFD) is a repository of more than 155,000 records of freshwater fish observations from around New Zealand, maintained by the National Institute of Water and Atmospheric Research (NIWA). Records from the NZFFD can be downloaded using a web interface. The statistical computing language R is now widely used for data wrangling, analysis, and visualisation. Here, we present nzffdr, an open source R software package that: i) allows users to query and download data from the New Zealand Freshwater Fish Database directly in R, ii) provides functions to clean imported data, iii) facilitates the addition of information such as species names and Department of Conservation threat classification status, and iv) a workflow for visualising information from the NZFFD. The nzffdr package aims to standardise, simplify, and speed up a workflow likely already used in an ad hoc manner by scientists across New Zealand and abroad.