Package 'rfishnet2'

Title: Exploratory Data Analysis for FishNet2 Data
Description: Provides data processing and summarization of data from FishNet2.net in text and graphical outputs. Allows efficient filtering of information and data cleaning.
Authors: Margaux Armfield email = [email protected] [aut], Kennedy Dorsey [aut, cre]
Maintainer: Kennedy Dorsey <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2024-11-04 06:05:06 UTC
Source: https://github.com/kdors/rfishnet2

Help Index


Summarize a set of records downloaded from FishNet2

Description

Creates a simple summary of data returned by a FishNet2 search.

Usage

fishsummary(input, verbose = TRUE)

Arguments

input

A dataframe in FishNet2 standard format (by using read.csv())

verbose

Print progress and information messages. Default: TRUE

Value

A list of summary statistics

# summarize occurrence records


Get unique species in a given genus in dataframe.

Description

get_species returns all species name that correspond to genus name input in a FishNet2 dataframe.

Usage

get_species(df, genus)

Arguments

df

A dataframe in FishNet2 standard format (by using read.csv())

genus

Genus of species

Details

This is a function to get the species name of a given genus name. Names are found using the 'ScientificName' column in a FishNet2 dataframe. If "value is only one word, no species name is returned.

Value

Vector of unique species values or character(0) if empty

Examples

get_species(ictaluridae, "Ameirus")
get_species(ictaluridae, "Noturus")
get_species(louisiana, "Scaphirhynchus")

Filter a set of records downloaded from FishNet2 by Tissue column

Description

Filters data returned by a FishNet2 search for records that include tissue information.

Usage

has_tissue(input, verbose = TRUE)

Arguments

input

A dataframe in FishNet2 standard format (by using read.csv())

verbose

Print progress and information messages. Default: TRUE

Value

Filtered dataset with records that do not have a blank tissue value

# summarize occurrence records

Examples

has_tissue(louisiana,TRUE)

Heat Map of Occurrence Frequency by Country

Description

Creates a heatmap of the frequency of an occurrence by country/region.

Usage

heatmap_world(df, name = "none")

Arguments

df

A dataframe in FishNet2 standard format with column labeled 'Country'

name

Value in 'ScientificName' or 'Family' column

Value

heatmap showing frequency by country

Examples

heatmap_world(ictaluridae)

Dataset of Ictaluridae Taxon from Years 2017 to 2019

Description

A dataset as a result of a search query of taxon 'Ictaluridae' and date range '2017-2019' on fishnet2.net

Usage

ictaluridae

Format

A data frame with 273 rows and 16 variables:

InstitutionCode

unique code given to institution who owns the data

IndividualCount

Number of fish individuals

ScientificName

Scientific name of fish observation

Family

Family of fish observation

PreparationType

Type of preparation

Tissues

Whether observation contains tissues

Latitude

Latitude observed

Longitude

Longitude observed

Country

Country that lot was observed in

StateProvince

State or province where lot was observed

County

County that lot was observed in

YearCollected

Year collected

MonthCollected

Month collected

DayCollected

Day collected

BasisOfRecord

Preserved Specimen

DateLastModified

Data record last modified in database

Source

http://www.fishnet2.net/search.aspx?t=ictaluridae&d=2017-2019


Dataset of Records from Louisiana from Years 2005 to 2006

Description

A dataset as a result of a search query of location 'Louisiana' and date range '2005-2006' on fishnet2.net

Usage

louisiana

Format

A data frame with 273 rows and 20 variables:

InstitutionCode

unique code given to institution who owns the data

CollectionCode

Collection Code

IndividualCount

Number of fish individuals

ScientificName

Scientific name of fish observation

Family

Family of fish observation

PreparationType

Type of preparation

Tissues

Whether observation contains tissues

Latitude

Latitude observed

Longitude

Longitude observed

HorizontalDatum

Horizontal Datum

Country

Country that lot was observed in

StateProvince

State or province where lot was observed

County

County that lot was observed in

YearCollected

Year collected

MonthCollected

Month collected

DayCollected

Day collected

Collector

Name of collector

GeorefMethod

Geo Reference Method

BasisOfRecord

Preserved Specimen

DateLastModified

Data record last modified in database

Source

http://www.fishnet2.net/search.aspx?l=+Louisiana&d=2005-2006


Plot Longitude and Latitude Points on World Map

Description

occ_map returns a plot with columns 'Longitude' and 'Latitude' in FishNet2 dataframe on a world map.

Usage

occ_map(df, color = "darkred")

Arguments

df

A dataframe in FishNet2 standard format (by using read.csv())

color

Color of plotted points, default is dark red

Details

This is a function to get a plot of occurrence records from FishNet2 search query. Parameter is a dataframe that must have the columns 'Longitude' and 'Latitude'. NA values are removed in the function.

Value

Plot of latitude and longitude points on world map

Examples

occ_map(ictaluridae)

Plots record count by Scientific Name on a bar graph.

Description

plot_records returns a bar graph showing the number of records for each distinct scientific name in the dataset.

Usage

plot_records(df, top_ten = TRUE, color = TRUE)

Arguments

df

A dataframe in FishNet2 standard format (by using read.csv())

top_ten

Top ten species occurrence counts

color

True if each bar should have a distinct color, FALSE for grey bars. Default: TRUE

Details

This is a function to visualize data by Scientific Name from FishNet2 search query. A dataframe is input from a standard FishNet2 search query.

Value

Plot of record count by Scientific Name on a bar graph

Examples

plot_records(louisiana)

Outputs a bar graph giving the top n in frequency in specified column of dataframe

Description

top_n_plots returns a bar graph that shows the top n (n is given as a parameter) labels in a given column in the dataframe with the highest frequency

Usage

top_n_plots(df, n, colName, color = "default colors")

Arguments

df

A dataframe in FishNet2 standard format (by using read.csv())

n

The number of the labels with the highest frequencies to be included in the graph

colName

The column name that the graph outputs

color

Color of the bars, by default is a different color for each bar

Details

This is a function to create and output a bar graph giving the top n in frequency in specified column of dataframe (columns include 'ScientificName', 'Family', 'Country','State/Province','County').

Value

A bar graph

Examples

top_n_plots(ictaluridae,10,"ScientificName")