tidy_Hanwell: Tidy Hanwell EMS Data

View source: R/tidy_Hanwell.R

tidy_HanwellR Documentation

Tidy Hanwell EMS Data

Description

This function tidies Hanwell Environmental Monitoring System (EMS) data from either Excel sheets or CSV files.

- Default mode (MinMax = FALSE): Reads raw date, temperature, and humidity data. - Min-Max mode (MinMax = TRUE): Under development to read min-max average data (CSV only).

Usage

tidy_Hanwell(
  EMS_datapath,
  Site = "Site",
  MinMax = FALSE,
  sheet = "Hanwell",
  ...
)

Arguments

EMS_datapath

Character string specifying the file path to the Hanwell EMS data file.

Site

Character string specifying site name to add as a column. Default is "Site".

MinMax

Logical flag; if TRUE, reads Min-Max format, otherwise reads raw data. Default is FALSE.

sheet

Optional, Excel sheet name for reading Excel files. The default is "Hanwell"

...

Additional arguments passed to readxl::read_excel for Excel reading.

Value

A tibble containing tidied Hanwell EMS data, with columns including:

Site

Character, site name as specified by Site argument.

Sensor

Character, sensor identifier extracted from the file or metadata.

Date

POSIXct datetime of the measurement.

Temp

Numeric temperature measurement in °C (average for MinMax).

RH

Numeric relative humidity measurement in % (average for MinMax).

TempMin, TempMax, RHMin, RHMax

(Only for MinMax reports) Numeric min/max values of Temp and RH.

Examples



# Example usage: hanwell_data <- tidy_Hanwell("path/to/your/hanwell_data.csv")


# mydata file
filepath <- data_file_path("mydata.xlsx")

tidy_Hanwell(filepath, sheet = "Hanwell", Site = "London") |> head()



ConSciR documentation built on Nov. 5, 2025, 5:25 p.m.