Package: SHARK4R 1.2.0

Anders Torstensson

SHARK4R: Accessing and Validating Marine Environmental Data from 'SHARK' and Related Databases

Provides functions to retrieve, process, analyze, and quality-control marine physical, chemical, and biological data. The main focus is on Swedish monitoring data available through the 'SHARK' database <https://shark.smhi.se/en/>, with additional API support for 'Nordic Microalgae' <https://nordicmicroalgae.org/>, 'Dyntaxa' <https://artfakta.se/>, World Register of Marine Species ('WoRMS') <https://www.marinespecies.org>, 'AlgaeBase' <https://www.algaebase.org>, OBIS 'xylookup' web service <https://iobis.github.io/xylookup/> and Intergovernmental Oceanographic Commission (IOC) - UNESCO databases on harmful algae <https://www.marinespecies.org/hab/> and toxins <https://toxins.hais.ioc-unesco.org/>.

Authors:Markus Lindh [aut], Anders Torstensson [aut, cre], Mikael Hedblom [ctb], Bengt Karlson [ctb], Peter Thor [ctb], Marie Johansen [ctb], SHARK [cph], SBDI [fnd]

SHARK4R_1.2.0.tar.gz
SHARK4R_1.2.0.tar.gz(r-4.7-any)SHARK4R_1.2.0.tar.gz(r-4.6-any)
SHARK4R_1.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
SHARK4R/json (API)
NEWS

# Install 'SHARK4R' in R:
install.packages('SHARK4R', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/sharksmhi/shark4r/issues

Pkgdown/docs site:https://sharksmhi.github.io

On CRAN:

Conda:

4.60 score 40 scripts 181 downloads 160 exports 100 dependencies

Last updated from:4c7c9fc16f. Checks:4 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK271
source / vignettesOK376
linux-release-x86_64OK251
wasm-releaseOK183

Exports:add_worms_taxonomyassign_phytoplankton_groupcalc_zooplankton_biomasscalc_zooplankton_dry_weightcheck_bacterial_carboncheck_bacterial_concentrationcheck_bacterial_productioncheck_Bacterioplanktoncheck_Chlorophyllcheck_chlorophyll_conccheck_code_projcheck_codescheck_datatypecheck_deliv_Bacterioplanktoncheck_deliv_Chlorophyllcheck_deliv_Epibenthoscheck_deliv_EpibenthosDropvideocheck_deliv_GreySealcheck_deliv_HarbourPorpoisecheck_deliv_HarbourSealcheck_deliv_PhysicalChemicalcheck_deliv_Phytoplanktoncheck_deliv_Picoplanktoncheck_deliv_PrimaryProductioncheck_deliv_RingedSealcheck_deliv_SealPathologycheck_deliv_Sedimentationcheck_deliv_Zoobenthoscheck_deliv_Zooplanktoncheck_depthcheck_Epibenthoscheck_epibenthos_abundclass_logicalcheck_epibenthos_countedcheck_epibenthos_cover_logicalcheck_epibenthos_coverclass_logicalcheck_epibenthos_coverpercent_logicalcheck_epibenthos_dryweightcheck_epibenthos_sedimentdepos_logicalcheck_epibenthos_specdistr_maxdepthcheck_epibenthos_specdistr_mindepthcheck_epibenthos_totcover_logicalcheck_EpibenthosDropvideocheck_fieldscheck_GreySealcheck_greyseal_countedcheck_HarbourPorpoisecheck_HarbourSealcheck_harbourseal_countedcheck_harbporp_positivemincheck_logical_parametercheck_nominal_stationcheck_onlandcheck_outlierscheck_parameter_rulescheck_PhysicalChemicalcheck_Phytoplanktoncheck_phytoplankton_abundcheck_phytoplankton_biovolcheck_phytoplankton_carboncheck_phytoplankton_countedcheck_Picoplanktoncheck_picoplankton_abundancecheck_picoplankton_biovolcheck_picoplankton_carboncheck_picoplankton_countedcheck_PrimaryProductioncheck_primaryproduction_carbonprodcheck_primaryproduction_carbonprod_hourcheck_primaryproduction_carbonprodlightcheck_RingedSealcheck_ringedseal_calccountedcheck_SealPathologycheck_Sedimentationcheck_setupcheck_station_distancecheck_value_logicalcheck_zero_positionscheck_zero_valuecheck_Zoobenthoscheck_zoobenthos_abundcheck_zoobenthos_BQImcheck_zoobenthos_BQIm_logicalcheck_zoobenthos_countedcheck_zoobenthos_wetweightcheck_zoobenthos_wetweight_logicalcheck_Zooplanktoncheck_zooplankton_abundcheck_zooplankton_carboncheck_zooplankton_countedcheck_zooplankton_length_meancheck_zooplankton_length_mediancheck_zooplankton_wetweightcheck_zooplankton_wetweight_areacheck_zooplankton_wetweight_volumeclean_shark4r_cacheconstruct_dyntaxa_tableconvert_ddmm_to_ddcreate_pie_mapfind_required_fieldsget_algaebase_genusget_algaebase_speciesget_delivery_templateget_dyntaxa_dwcaget_dyntaxa_parent_idsget_dyntaxa_recordsget_hab_listget_nomp_listget_nua_external_linksget_nua_harmfulnessget_nua_image_labeling_linksget_nua_image_labeling_metadataget_nua_media_linksget_nua_media_metadataget_nua_taxaget_peg_listget_shark_codesget_shark_dataget_shark_datasetsget_shark_optionsget_shark_statisticsget_shark_table_countsget_toxin_listget_worms_classificationget_worms_recordsget_worms_records_nameget_worms_taxonomy_treeifcb_is_near_landifcb_which_basinis_in_dyntaxaload_shark4r_fieldsload_shark4r_statslookup_xymatch_algaebasematch_algaebase_genusmatch_algaebase_speciesmatch_algaebase_taxamatch_dyntaxamatch_dyntaxa_taxamatch_stationmatch_taxon_namematch_worms_taxamatch_wormstaxanominal_stationparse_scientific_namesplot_map_leafletplot_map_leaflet_delivpositions_are_near_landread_ptbxread_sharkread_shark_delivrun_qc_appscatterplotshark_readshark_read_delivshark_read_deliv_xlsshark_read_ziptranslate_shark_datatypeupdate_dyntaxa_taxonomyupdate_worms_taxonomywhich_basin

Dependencies:askpassbase64encbitbit64bslibcachemcellrangerclassclassIntclicliprcpp11crayoncrosstalkcrulcurldata.tableDBIdigestdplyrDTe1071evaluatefarverfastmapfontawesomefsgenericsggplot2gluegtablehighrhmshtmltoolshtmlwidgetshttpcodehttrisobandjquerylibjsonliteKernSmoothknitrlabelinglaterlatticelazyevalleafletleaflet.providerslifecyclemagrittrMASSmemoisemimeopensslotelpillarpkgconfigpngprettyunitsprogresspromisesproxypurrrR6rappdirsrasterRColorBrewerRcppreadrreadxlrematchrlangrmarkdowns2S7sassscalessfspstringistringrsysterratibbletidyrtidyselecttinytextriebeardtzdbunitsurltoolsutf8vctrsviridisLitevroomwithrwkworrmsxfunyaml

Quality Control of SHARK Data

Rendered fromquality_control.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-03-12
Started: 2025-12-09

Retrieve Data From Nordic Microalgae

Rendered fromretrieve_nordic_microalgae_data.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-03-12
Started: 2025-12-09

Retrieve Data From SHARK

Rendered fromretrieve_shark_data.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-03-12
Started: 2025-12-09

Retrieve HAB Data From IOC-UNESCO Databases

Rendered fromretrieve_hab_data.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-06-08
Started: 2025-12-09

Retrieve Taxonomic Data From WoRMS

Rendered fromretrieve_worms_data.Rmdusingknitr::rmarkdownon Jun 08 2026.

Last update: 2026-03-12
Started: 2025-12-09

Readme and manuals

Help Manual

Help pageTopics
Add WoRMS taxonomy hierarchy to AphiaIDs or scientific namesadd_worms_taxonomy
Assign phytoplankton group to scientific namesassign_phytoplankton_group
Calculate zooplankton biomass from dry weight and abundancecalc_zooplankton_biomass
Calculate zooplankton dry weight from mean lengthcalc_zooplankton_dry_weight
Check matches of reported codes in SMHI's SHARK codelistcheck_codes
Validate SHARK system fields in a data framecheck_datatype
Validate depth values against bathymetry and logical constraintscheck_depth
Validate SHARK data fields for a given datatypecheck_fields
General checker for parameter-specific logical rulescheck_logical_parameter
Check if stations are reported as nominal positionscheck_nominal_station
Check whether points are located on landcheck_onland
General outlier check function for SHARK datacheck_outliers
Check parameter values against logical rulescheck_parameter_rules
Download and set up SHARK4R support filescheck_setup
Check station distances against SMHI station listcheck_station_distance
Identify non-numeric or non-logical values in measurement datacheck_value_logical
Identify samples with zero-valued station coordinatescheck_zero_positions
Identify records with zero-valued measurement datacheck_zero_value
Clean SHARK4R cache by file age and sessionclean_shark4r_cache
Construct a hierarchical taxonomy table from Dyntaxaconstruct_dyntaxa_table
Convert coordinates from DDMM format to decimal degreesconvert_ddmm_to_dd
Pie chart map with displacement and leader linescreate_pie_map
Find required fields in a SHARK delivery templatefind_required_fields
Get a delivery template for a SHARK datatypeget_delivery_template
Download and read Darwin Core Archive files from Dyntaxaget_dyntaxa_dwca
Get parent taxon IDs for specified taxon IDs from Dyntaxaget_dyntaxa_parent_ids
Get taxonomic information from Dyntaxa for specified taxon IDsget_dyntaxa_records
Download the IOC-UNESCO Taxonomic Reference List of Harmful Microalgaeget_hab_list
Get the latest NOMP biovolume Excel listget_nomp_list
Retrieve external links or facts for taxa from Nordic Microalgaeget_nua_external_links
Retrieve harmfulness for taxa from Nordic Microalgaeget_nua_harmfulness
Retrieve image labeling media links from Nordic Microalgaeget_nua_image_labeling_links
Retrieve image labeling metadata from Nordic Microalgaeget_nua_image_labeling_metadata
Retrieve and extract media URLs from Nordic Microalgaeget_nua_media_links
Retrieve media metadata from Nordic Microalgaeget_nua_media_metadata
Retrieve taxa information from Nordic Microalgaeget_nua_taxa
Get the latest EG-Phyto/PEG biovolume Excel listget_peg_list
Get SHARK codelist from SMHIget_shark_codes
Retrieve tabular data from SHARKget_shark_data
Download SHARK dataset zip archivesget_shark_datasets
Retrieve available search options from SHARKget_shark_options
Summarize numeric SHARK parameters with ranges and outlier thresholdsget_shark_statistics
Retrieve SHARK data table row countsget_shark_table_counts
Retrieve marine biotoxin data from IOC-UNESCO Toxins Databaseget_toxin_list
Retrieve hierarchical classification from WoRMSget_worms_classification
Retrieve WoRMS recordsget_worms_records
Retrieve hierarchical taxonomy data from WoRMSget_worms_taxonomy_tree
Check if taxon names exist in Dyntaxais_in_dyntaxa
Load SHARK4R fields from GitHubload_shark4r_fields
Load SHARK4R statistics from GitHubload_shark4r_stats
Lookup spatial information for geographic pointslookup_xy
Search AlgaeBase for information about a genus of algaematch_algaebase_genus
Search AlgaeBase for information about a species of algaematch_algaebase_species
Search AlgaeBase for taxonomic informationmatch_algaebase_taxa
Match Dyntaxa taxon namesmatch_dyntaxa_taxa
Match station names against SMHI station listmatch_station
Retrieve WoRMS records by taxonomic names with retry logicmatch_worms_taxa
Parse scientific names into genus and species components.parse_scientific_names
Create an interactive Leaflet map of sampling stationsplot_map_leaflet
Determine if positions are near landpositions_are_near_land
Read a Plankton Toolbox export fileread_ptbx
Read SHARK export files (tab- or semicolon-delimited, plain text or zipped)read_shark
Read SHARK Excel delivery files (.xls or .xlsx)read_shark_deliv
Launch the SHARK4R Bio-QC Toolrun_qc_app
Scatterplot with optional horizontal threshold linesscatterplot
Translate SHARK4R datatype namestranslate_shark_datatype
Update SHARK taxonomy records using Dyntaxaupdate_dyntaxa_taxonomy
Determine if points are in a specified sea basinwhich_basin