The get_shark_table_counts() function retrieves the number of records (row counts)
from various SHARK data tables based on specified filters such as year, months,
data type, stations, and taxa. To view available filter options, see
get_shark_options.
get_shark_table_counts(
tableView = "sharkweb_overview",
fromYear = 2019,
toYear = 2020,
months = c(),
dataTypes = c(),
parameters = c(),
orderers = c(),
qualityFlags = c(),
deliverers = c(),
projects = c(),
datasets = c(),
minSamplingDepth = "",
maxSamplingDepth = "",
checkStatus = "",
redListedCategory = c(),
taxonName = c(),
stationName = c(),
vattenDistrikt = c(),
seaBasins = c(),
counties = c(),
municipalities = c(),
waterCategories = c(),
typOmraden = c(),
helcomOspar = c(),
seaAreas = c(),
prod = TRUE,
utv = FALSE
)An integer representing the total number of rows in the requested SHARK table after applying the specified filters.
Character. Specifies the view of the table to retrieve. Options include:
"sharkweb_overview": Overview table
"sharkweb_all": All available columns
"sharkdata_bacterioplankton": Bacterioplankton table
"sharkdata_chlorophyll": Chlorophyll table
"sharkdata_epibenthos": Epibenthos table
"sharkdata_greyseal": Greyseal table
"sharkdata_harbourporpoise": Harbour porpoise table
"sharkdata_harbourseal: Harbour seal table
"sharkdata_jellyfish": Jellyfish table
"sharkdata_physicalchemical": Physical chemical table
"sharkdata_physicalchemical_columns": Physical chemical table: column view
"sharkdata_phytoplankton": Phytoplankton table
"sharkdata_picoplankton": Picoplankton table
"sharkdata_planktonbarcoding": Plankton barcoding table
"sharkdata_primaryproduction": Primary production table
"sharkdata_ringedseal": Ringed seal table
"sharkdata_sealpathology": Seal pathology table
"sharkdata_sedimentation": Sedimentation table
"sharkdata_zoobenthos": Zoobenthos table
"sharkdata_zooplankton": Zooplankton table
"report_sum_year_param": Report sum per year and parameter
"report_sum_year_param_taxon": Report sum per year, parameter and taxon
"report_sampling_per_station": Report sampling per station
"report_obs_taxon": Report observed taxa
"report_stations": Report stations
"report_taxon": Report taxa
Default is "sharkweb_overview".
Integer. The starting year for the data to retrieve. Default is 2019.
Integer. The ending year for the data to retrieve. Default is 2020.
Integer vector. The months to retrieve data for (e.g., c(4, 5, 6) for April to June).
Character vector. Specifies data types to filter, such as "Chlorophyll" or "Epibenthos".
Character vector. Optional. Parameters to filter results, such as "Chlorophyll-a".
Character vector. Optional. Orderers to filter data by specific organizations.
Character vector. Optional. Quality flags to filter data.
Character vector. Optional. Deliverers to filter data by data providers.
Character vector. Optional. Projects to filter data by specific research or monitoring projects.
Character vector. Optional. Datasets to filter data by specific dataset names.
Numeric. Optional. Minimum depth (in meters) for sampling data.
Numeric. Optional. Maximum depth (in meters) for sampling data.
Character string. Optional. Status check to filter results.
Character vector. Optional. Red-listed taxa for conservation filtering.
Character vector. Optional. Taxa names for filtering specific species or taxa.
Character vector. Optional. Station names to retrieve data from specific stations.
Character vector. Optional. Water district names to filter data by Swedish water districts.
Character vector. Optional. Sea basin names to filter data by different sea areas.
Character vector. Optional. Counties to filter data within specific administrative regions in Sweden.
Character vector. Optional. Municipalities to filter data within specific local regions.
Character vector. Optional. Water categories to filter data by.
Character vector. Optional. Type areas to filter data by specific areas.
Character vector. Optional. HELCOM or OSPAR areas for regional filtering.
Character vector. Optional. Sea area codes for filtering by specific sea areas.
Logical. Select production server when TRUE (default). Ignored if utv is TRUE.
Logical. Select UTV server when TRUE.
https://shark.smhi.se/en for SHARK database.
get_shark_options to see filter options
get_shark_data to download SHARK data
# \donttest{
# Retrieve chlorophyll data for April to June from 2019 to 2020
shark_data_counts <- get_shark_table_counts(fromYear = 2019, toYear = 2020,
months = c(4, 5, 6), dataTypes = c("Chlorophyll"))
print(shark_data_counts)
# }
Run the code above in your browser using DataLab