Learn R Programming

snirh.lab (version 0.1.0)

parameters: Parameter conversion table for SNIRH format

Description

Dataset containing the mapping between laboratory parameter names/units and their equivalent SNIRH (Sistema Nacional de Informação de Recursos Hídricos) database format. It includes conversion factors for unit transformations and standardized symbols used in the SNIRH system.

Usage

parameters

Arguments

Format

A data.table with 7 variables and multiple rows covering water quality, sediment, and biota parameters:

param_lab

Character. Parameter name as provided by the laboratory. These are the original parameter names found in laboratory reports and may include special characters, accents, or laboratory-specific naming conventions.

unit_lab

Character. Unit of measurement as provided by the laboratory. These represent the original units used in laboratory measurements and may vary between laboratories or analytical methods.

symbol_snirh

Character. Standardized parameter symbol used in the SNIRH database. These symbols are unique identifiers that allow for consistent data storage and retrieval in the national database.

param_snirh

Character. Standardized parameter name used in SNIRH. These names follow SNIRH conventions and provide consistency across different data sources and time periods.

unit_snirh

Character. Standardized unit used in the SNIRH database. All measurements are converted to these standard units to ensure comparability and compliance with national monitoring standards.

factor

Numeric. Conversion factor to transform laboratory units to SNIRH units. The formula is: snirh_value = lab_value * factor. For example, if converting mg/L to µg/L, the factor would be 1000.

sample_type

Character. Type of sample matrix. Valid values are:

  • water: Surface water and groundwater samples

  • biota: Biological samples (fish, plants, etc.)

  • sediment: Sediment samples from aquatic environments

Parameter Categories

The parameters are organized by sample type:

Water parameters

Include physical properties (temperature, pH, conductivity), chemical parameters (nutrients, metals, organic compounds), and biological indicators.

Sediment parameters

Cover grain size distribution, chemical composition, contaminant levels, and organic matter content.

Biota parameters

Include bioaccumulation measurements, biological indices, and organism-specific parameters.

Data Quality

This dataset is maintained according to:

  • SNIRH technical specifications and data model requirements

  • Portuguese water quality monitoring standards (WFD implementation)

  • European Water Framework Directive requirements

  • Laboratory accreditation standards (ISO 17025)

Updates

This dataset should be updated when:

  • New parameters are added to SNIRH database

  • Laboratory methods change, requiring new unit conversions

  • SNIRH symbols or naming conventions are updated

  • New sample types are introduced to the monitoring program

Details

This dataset is essential for the convert_to_snirh function, which uses it to:

  • Validate that all laboratory parameters can be converted to SNIRH format

  • Apply appropriate unit conversions using the conversion factors

  • Map laboratory parameter names to standardized SNIRH symbols

  • Ensure data quality and consistency with national standards

The conversion factors are carefully calibrated to maintain measurement accuracy while ensuring compliance with SNIRH database requirements. Parameters without a direct SNIRH equivalent are not included in this table and will cause the conversion function to raise an error.

References

See Also

convert_to_snirh for the main conversion function that uses this data

Examples

Run this code
# View all available parameters for water samples
water_params <- parameters[sample_type == "water"]
print(water_params[, .(param_lab, unit_lab, param_snirh, unit_snirh)])

# Check conversion factor for a specific parameter
ph_conversion <- parameters[param_lab == "pH" & sample_type == "water"]
print(ph_conversion$factor)  # Should be 1 (no conversion needed)

# Find all parameters that require unit conversion
converted_params <- parameters[factor != 1]
print(converted_params[, .(param_lab, unit_lab, unit_snirh, factor)])

# Get SNIRH symbols for biota parameters
biota_symbols <- parameters[sample_type == "biota", unique(symbol_snirh)]
print(biota_symbols)

Run the code above in your browser using DataLab