library(readr)
library(dplyr)
# 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 = 8, show_col_types = FALSE)
} else {
# Generate representative mock data for compilation/GitHub Pages rendering
week_df <- tibble(
btnamej = c("socs043", "socs018", "socs012", "socs043", "socs031", "socs018", "socs009", "socs012"),
btnamei = c("socs018", "socs012", "socs043", "socs031", "socs009", "socs009", "socs018", "socs031"),
episode = c(1, 1, 2, 1, 1, 2, 1, 2),
freq = c(15, 8, 22, 5, 14, 11, 7, 19),
avg_RSSI = c(-74.5, -82.1, -68.4, -88.0, -79.2, -75.0, -84.3, -71.1),
sd_RSSI = c(4.2, 5.1, 3.8, 6.0, 4.5, 3.9, 5.2, 4.1),
s_timestamp = c(1315483200, 1315483600, 1315484000, 1315484600, 1315485000, 1315485500, 1315486000, 1315486500),
e_timestamp = c(1315483500, 1315483900, 1315484500, 1315484800, 1315485400, 1315485900, 1315486200, 1315487000),
dur = c(300, 300, 500, 200, 400, 400, 200, 500),
waitingtime = c(2.4, 1.1, 0.5, 3.2, 1.8, 0.9, 4.0, 1.2)
)
}
knitr::kable(week_df, caption = "Sample Bluetooth Proximity Episodes (Week 8)")