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 |
Creates a simple summary of data returned by a FishNet2 search.
fishsummary(input, verbose = TRUE)
fishsummary(input, verbose = TRUE)
input |
A dataframe in FishNet2 standard format (by using read.csv()) |
verbose |
Print progress and information messages. Default: TRUE |
A list of summary statistics
# summarize occurrence records
get_species
returns all species name that correspond to genus name
input in a FishNet2 dataframe.
get_species(df, genus)
get_species(df, genus)
df |
A dataframe in FishNet2 standard format (by using read.csv()) |
genus |
Genus of species |
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.
Vector of unique species values or character(0) if empty
get_species(ictaluridae, "Ameirus") get_species(ictaluridae, "Noturus") get_species(louisiana, "Scaphirhynchus")
get_species(ictaluridae, "Ameirus") get_species(ictaluridae, "Noturus") get_species(louisiana, "Scaphirhynchus")
Filters data returned by a FishNet2 search for records that include tissue information.
has_tissue(input, verbose = TRUE)
has_tissue(input, verbose = TRUE)
input |
A dataframe in FishNet2 standard format (by using read.csv()) |
verbose |
Print progress and information messages. Default: TRUE |
Filtered dataset with records that do not have a blank tissue value
# summarize occurrence records
has_tissue(louisiana,TRUE)
has_tissue(louisiana,TRUE)
Creates a heatmap of the frequency of an occurrence by country/region.
heatmap_world(df, name = "none")
heatmap_world(df, name = "none")
df |
A dataframe in FishNet2 standard format with column labeled 'Country' |
name |
Value in 'ScientificName' or 'Family' column |
heatmap showing frequency by country
heatmap_world(ictaluridae)
heatmap_world(ictaluridae)
A dataset as a result of a search query of taxon 'Ictaluridae' and date range '2017-2019' on fishnet2.net
ictaluridae
ictaluridae
A data frame with 273 rows and 16 variables:
unique code given to institution who owns the data
Number of fish individuals
Scientific name of fish observation
Family of fish observation
Type of preparation
Whether observation contains tissues
Latitude observed
Longitude observed
Country that lot was observed in
State or province where lot was observed
County that lot was observed in
Year collected
Month collected
Day collected
Preserved Specimen
Data record last modified in database
http://www.fishnet2.net/search.aspx?t=ictaluridae&d=2017-2019
A dataset as a result of a search query of location 'Louisiana' and date range '2005-2006' on fishnet2.net
louisiana
louisiana
A data frame with 273 rows and 20 variables:
unique code given to institution who owns the data
Collection Code
Number of fish individuals
Scientific name of fish observation
Family of fish observation
Type of preparation
Whether observation contains tissues
Latitude observed
Longitude observed
Horizontal Datum
Country that lot was observed in
State or province where lot was observed
County that lot was observed in
Year collected
Month collected
Day collected
Name of collector
Geo Reference Method
Preserved Specimen
Data record last modified in database
http://www.fishnet2.net/search.aspx?l=+Louisiana&d=2005-2006
occ_map
returns a plot with columns 'Longitude' and 'Latitude' in FishNet2
dataframe on a world map.
occ_map(df, color = "darkred")
occ_map(df, color = "darkred")
df |
A dataframe in FishNet2 standard format (by using read.csv()) |
color |
Color of plotted points, default is dark red |
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.
Plot of latitude and longitude points on world map
occ_map(ictaluridae)
occ_map(ictaluridae)
plot_records
returns a bar graph showing the number of records for each distinct
scientific name in the dataset.
plot_records(df, top_ten = TRUE, color = TRUE)
plot_records(df, top_ten = TRUE, color = TRUE)
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 |
This is a function to visualize data by Scientific Name from FishNet2 search query. A dataframe is input from a standard FishNet2 search query.
Plot of record count by Scientific Name on a bar graph
plot_records(louisiana)
plot_records(louisiana)
spatialsearch
returns the data that falls within radius given radius,
and latitude and longitude coordinates.
spatial_search(df, lat, lon, r)
spatial_search(df, lat, lon, r)
df |
A dataframe in FishNet2 standard format (by using read.csv()) |
lat |
Latitude coordinate |
lon |
Longitude coordinate |
r |
Radius in kilometers |
This is a function to filter data given in the format of a csv file from FishNet2. For this to work properly, the dataframe must have column names using names given in standard csv format from FishNet2 website.
Rows in file that fall within circle with center (lat,long) and radius r
spatial_search(ictaluridae, 36.12, -77.63, 1) ## Not run: spatial_search(ictaluridae, -173,44,10) ## End(Not run)
spatial_search(ictaluridae, 36.12, -77.63, 1) ## Not run: spatial_search(ictaluridae, -173,44,10) ## End(Not run)
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
top_n_plots(df, n, colName, color = "default colors")
top_n_plots(df, n, colName, color = "default colors")
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 |
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').
A bar graph
top_n_plots(ictaluridae,10,"ScientificName")
top_n_plots(ictaluridae,10,"ScientificName")