Quality control of data apply on a datatable with a conf variable path

qualityControlData(
  rawFileDatatable,
  confVariablePath,
  loggerType,
  columnVariableRef = "variables_icos"
)

Arguments

rawFileDatatable

datatable of the rawfile (output from readRawFileBM function)

confVariablePath

path and names of confVariable file

loggerType

character of code_logger (ex."L01","L02","sol")

columnVariableRef

string of column reference name of the confVariable file

Value

data.table with NA for values outside the min and max bounds definet in the configuration file (confVariablePath)

Examples

# Data rawFilePath <- system.file("extdata/bm-cent_L03-atm/0_rawdata/F01-30s/", "lqu_bm-cent_L03-atm_F01-30s_2021_05_17_0000.dat", package = "aigoual") #rawFilePath <- system.file("extdata/ec-int_L11-sol/0_rawdata/F01-60s/", #"lqu_ec-int_L11-sol_F01-60s_2021_05_30_0000.dat", #package = "aigoual") #confVariablePath <- "/home/jbparoissien/Nextcloud/data-lqu-urep/_config/bmVariablesMapping.csv" # Conf file confVariablePath <- system.file("extdata/_config/", "bmVariablesMapping.csv", package = "aigoual") decC <- "." skipRow <- c(1,2) timestampColumn <- "TIMESTAMP" timestampFormat <- "%Y-%m-%d %H:%M:%S" timestampTZ <- "Africa/Algiers" #1. Read data rawFileDatatable <- readRawFileBM(fileInput=TRUE, rawFilePath,decC, skipRow,timestampColumn, timestampFormat,timestampTZ) #2. Quality control qualityControlData(rawFileDatatable=rawFileDatatable, confVariablePath=confVariablePath, loggerType="L03", columnVariableRef="variables_logger")
#> TIMESTAMP RECORD Year Month DOM Hour Minute Second uSecond #> 1: 2021-05-17 14:01:30 1117129 2021 5 17 14 1 30 0 #> 2: 2021-05-17 14:02:00 1117130 2021 5 17 14 2 0 0 #> 3: 2021-05-17 14:02:30 1117131 2021 5 17 14 2 30 0 #> 4: 2021-05-17 14:03:00 1117132 2021 5 17 14 3 0 0 #> 5: 2021-05-17 14:03:30 1117133 2021 5 17 14 3 30 0 #> --- #> 1197: 2021-05-17 23:59:30 1118325 2021 5 17 23 59 30 0 #> 1198: 2021-05-18 00:00:00 1118326 2021 5 18 0 0 0 0 #> 1199: 2021-05-18 00:00:30 1118327 2021 5 18 0 0 30 0 #> 1200: 2021-05-18 00:01:00 1118328 2021 5 18 0 1 0 0 #> 1201: 2021-05-18 00:01:30 1118329 2021 5 18 0 1 30 0 #> WeekDay Day_of_Year Volt_Batterie Girouette_Wind_direction_WD_1_1_1 #> 1: 2 137 13.23 304.9 #> 2: 2 137 13.23 303.0 #> 3: 2 137 13.23 295.4 #> 4: 2 137 13.23 292.6 #> 5: 2 137 13.23 310.0 #> --- #> 1197: 2 137 13.32 282.3 #> 1198: 3 138 13.32 313.6 #> 1199: 3 138 13.32 294.8 #> 1200: 3 138 13.32 317.3 #> 1201: 3 138 13.32 284.8 #> Girouette_Wind_speed_WS_1_1_1_1 WindSonic_50_direction_WD_2_1_1 #> 1: 5.073 NA #> 2: 5.344 NA #> 3: 4.900 NA #> 4: 5.978 NA #> 5: 6.259 NA #> --- #> 1197: 3.535 NA #> 1198: 3.812 NA #> 1199: 3.685 NA #> 1200: 3.433 NA #> 1201: 3.753 NA #> WindSonic_50_speed_WS_2_1_1 WindSonic_200_direction_WD_2_2_1 #> 1: NA 276 #> 2: NA 280 #> 3: NA 261 #> 4: NA 267 #> 5: NA 295 #> --- #> 1197: NA 266 #> 1198: NA 291 #> 1199: NA 273 #> 1200: NA 307 #> 1201: NA 266 #> WindSonic_200_speed_WS_2_2_1 Pa_Laq_hPa Pa_Corr_hPa Pa_Laq_KPa #> 1: 5.29 898 1018 89.8 #> 2: 6.16 898 1018 89.8 #> 3: 4.06 898 1018 89.8 #> 4: 4.85 898 1018 89.8 #> 5: 4.54 898 1018 89.8 #> --- #> 1197: 3.90 900 1020 90.0 #> 1198: 3.79 900 1020 90.0 #> 1199: 4.36 900 1020 90.0 #> 1200: 4.87 900 1020 90.0 #> 1201: 4.64 900 1020 90.0 #> Pa_Corr_KPa Temp_reference Tair_50_Ta_1_1_1 Tair_200_Ta_1_2_1 #> 1: 101.8 10.270 6.3 6.3 #> 2: 101.8 10.250 6.3 6.3 #> 3: 101.8 10.240 6.3 6.3 #> 4: 101.8 10.220 6.3 6.3 #> 5: 101.8 10.210 6.4 6.4 #> --- #> 1197: 102.0 6.969 4.4 4.4 #> 1198: 102.0 6.968 4.4 4.4 #> 1199: 102.0 6.968 4.4 4.4 #> 1200: 102.0 6.966 4.4 4.4 #> 1201: 102.0 6.966 4.4 4.4 #> Hair_50_RH_1_1_1 Hair_200_RH_1_2_1 Temp_Corr_Distance_SR50 #> 1: 80.3 80.4 NA #> 2: 80.3 80.7 NA #> 3: 81.2 81.4 NA #> 4: 81.7 81.5 NA #> 5: 80.6 80.4 NA #> --- #> 1197: 96.7 96.7 NA #> 1198: 96.7 96.7 NA #> 1199: 96.7 96.8 NA #> 1200: 96.8 96.8 NA #> 1201: 96.8 96.8 NA #> Snow_Depth_cm_Corr_SNOWD Snow_Depth_cm_Estime Temp_corr_distance_fixe #> 1: NA NA 1.63 #> 2: NA NA 1.63 #> 3: NA NA 1.63 #> 4: NA NA 1.63 #> 5: NA NA 1.63 #> --- #> 1197: NA NA 1.62 #> 1198: NA NA 1.62 #> 1199: NA NA 1.62 #> 1200: NA NA 1.62 #> 1201: NA NA 1.62 #> Precipitation_P_Tot_Tot Evapo_saturee_Es Evapo_actuelle_Ea #> 1: 0.0 0.954 0.767 #> 2: 0.0 0.954 0.770 #> 3: 0.0 0.954 0.777 #> 4: 0.0 0.954 0.778 #> 5: 0.0 0.961 0.773 #> --- #> 1197: 0.0 0.836 0.809 #> 1198: 0.1 0.836 0.809 #> 1199: 0.0 0.836 0.810 #> 1200: 0.0 0.836 0.810 #> 1201: 0.0 0.836 0.810 #> Vapour_Pressure_Deficit_VPD PointRosee_Dewpoint_T_DP #> 1: 0.187 2.38 #> 2: 0.184 2.44 #> 3: 0.178 2.58 #> 4: 0.177 2.60 #> 5: 0.188 2.48 #> --- #> 1197: 0.028 3.74 #> 1198: 0.028 3.74 #> 1199: 0.027 3.76 #> 1200: 0.027 3.76 #> 1201: 0.027 3.76 #> en_une_minute_Pluviogravimetrique Poids_eau_Pluviogravimetrique #> 1: 0 0 #> 2: 0 0 #> 3: 0 0 #> 4: 0 0 #> 5: 0 0 #> --- #> 1197: 0 0 #> 1198: 0 0 #> 1199: 0 0 #> 1200: 0 0 #> 1201: 0 0 #> Somme_Pluviogravimetrique #> 1: -1477.47 #> 2: -1477.47 #> 3: -1477.47 #> 4: -1477.47 #> 5: -1477.47 #> --- #> 1197: -1477.47 #> 1198: -1477.47 #> 1199: -1477.47 #> 1200: -1477.47 #> 1201: -1477.47