# Load a sample week or use mock data if file is missing (e.g. on GitHub Actions)
file_path <- "Weekly Data/week8.csv"
if (file.exists(file_path)) {
week_df <- read_csv(file_path, n_max = 6, show_col_types = FALSE)
} else {
week_df <- tibble(
btnamej = c("socs043", "socs018", "socs012", "socs043", "socs031", "socs018"),
btnamei = c("socs018", "socs012", "socs043", "socs031", "socs009", "socs009"),
episode = c(1, 1, 2, 1, 1, 2),
freq = c(15, 8, 22, 5, 14, 11),
avg_RSSI = c(-74.5, -82.1, -68.4, -88.0, -79.2, -75.0),
sd_RSSI = c(4.2, 5.1, 3.8, 6.0, 4.5, 3.9),
s_timestamp = c(1315483200, 1315483600, 1315484000, 1315484600, 1315485000, 1315485500),
e_timestamp = c(1315483500, 1315483900, 1315484500, 1315484800, 1315485400, 1315485900),
dur = c(300, 300, 500, 200, 400, 400),
waitingtime = c(2.4, 1.1, 0.5, 3.2, 1.8, 0.9)
)
}
kable(week_df, caption = "Sample Bluetooth Proximity Episodes (Week 8)")