1 Input and format data

1.1 Processing Set Up

Specify directories and load libraries Smooth scatter plot example code from https://rstudio-pubs-static.s3.amazonaws.com/151690_ac65a180e03641e2adc3cb2ecf6306c3.html

## Loading required package: data.table
## Warning: package 'data.table' was built under R version 3.1.3
## Loading required package: RColorBrewer
## Warning: package 'RColorBrewer' was built under R version 3.1.2
## Loading required package: RSQLite
## Warning: package 'RSQLite' was built under R version 3.1.2
## Loading required package: DBI
## Warning: package 'DBI' was built under R version 3.1.2

1.2 Input data from the SQlite database

## [1] "channel"     "measurement"
## [1] TRUE

1.3 Assign column names and types and summarise the results

## $timestampStr
## [1] "character"
## 
## $timestampUnix
## [1] "integer"
## 
## $StationID
## [1] "character"
## 
## $PktID
## [1] "integer"
## 
## $Rawrssi
## [1] "integer"
## 
## $NoiseFloor
## [1] "integer"
## 
## $SignalToNoiseRatio
## [1] "integer"
## 
## $Timestamp
## [1] "POSIXct" "POSIXt"
## $timestampStr
## [1] "character"
## 
## $timestampUnix
## [1] "integer"
## 
## $StationID
## [1] "character"
## 
## $SensorID
## [1] "integer"
## 
## $WaterContent
## [1] "numeric"
## 
## $Temperature
## [1] "numeric"
## 
## $Timestamp
## [1] "POSIXct" "POSIXt"

2 Data cleaning

2.1 Cleaning process

  1. adjust RSSI reading for SNR according to datasheet Remove rows with illegal values as follows:
  2. Remove pre-deployment RSSIs (> -50 = MAXRSSI)
  3. StationID is 1 to 5 (sensors from 1 to 8 are in the columns)
  4. Soil moisture is volumetric water content as a percentage
  5. Temperature from MINTEMP = -5 to MAXTEMP = 60 in soil
## [1] "49248 channel rows after data cleaning.  Removed 203 rows with illegal values"
## [1] "218733 measurement rows after data cleaning.  Removed 11250 rows with illegal values"

2.2 Save a copy of the cleaned data

3 Data summary and Visualisation

3.1 General Stats

## [1] 49248     9
## [1] "2018-09-09 08:44:45 WST" "2018-12-05 11:57:55 WST"

3.2 Transmission Summaries

## KernSmooth 2.23 loaded
## Copyright M. P. Wand 1997-2009