library(tidyverse)
<- read_csv("compare_data/chamber_data.csv")
fluxes_eos_read
<- fluxes_eos_read |>
fluxes_eos mutate(
date = as.Date(`Julian Day`, origin = as.Date("2024-01-01")),
seconds = (`Julian Day` - floor(`Julian Day`)) * 24 * 3600,
time = hms::as_hms(seconds),
datetime = as_datetime(paste(date, time))
|>
) select(datetime, everything())
# View(fluxes_eos)
Comparison with eosAC-T/O
<- readRDS("compare_data/fluxible_df.rds")
fluxible_df
<- fluxes_eos |>
fluxes_eos_id # filter(
# datetime > ymd_hms("2024-12-12 00:00:01")
# ) |>
arrange(datetime) |>
rowid_to_column("id")
<- fluxible_df |>
fluxible_df_id # filter(
# f_datetime > ymd_hms("2024-12-12 00:03:01")
# ) |>
arrange(f_datetime) |>
rowid_to_column("id")
<- left_join(fluxible_df_id, fluxes_eos_id, by = "id") |>
comparison_fluxes rename(
eos_flux = `Flux CO2 (L) (umol/m^2/s)`,
eos_slope = `f (Linear Slope)`
)
<- full_join(fluxible_df, fluxes_eos, by = join_by("f_datetime" == "datetime")) |>
comparison_fluxes2 rename(
eos_flux = `Flux CO2 (L) (umol/m^2/s)`
|>
) select(f_datetime, fluxible_flux, eos_flux) |>
pivot_longer(!f_datetime, names_to = "method", values_to = "flux") |>
drop_na(flux) |>
arrange(f_datetime)
<- full_join(fluxible_df, fluxes_eos, by = join_by("f_datetime" == "datetime")) |>
comparison_fluxes3 rename(
eos_slope = `f (Linear Slope)`
|>
) select(f_datetime, fluxible_slope, eos_slope) |>
# pivot_longer(!f_datetime, names_to = "method", values_to = "slope") |>
# drop_na(slope) |>
arrange(f_datetime)
# View(comparison_fluxes3)

There are fluxes in the EOsense dataset that were not produced by fluxible. We identify them and remove them before pairing.
<- readRDS("compare_data/fluxible_df.rds")
fluxible_df
<- fluxes_eos |>
fluxes_eos_id arrange(datetime) |>
rowid_to_column("eos_id") |>
filter(
!(eos_id %in% c(12, 22, 52)) # those are "in between" fluxes in the fluxible dataset
|>
) rowid_to_column("id")
<- fluxible_df |>
fluxible_df_id arrange(f_datetime) |>
rowid_to_column("id")
<- left_join(fluxible_df_id, fluxes_eos_id, by = "id") |>
comparison_fluxes4 rename(
eos_flux = `Flux CO2 (L) (umol/m^2/s)`,
eos_slope = `f (Linear Slope)`
)
# View(comparison_fluxes4)
