From local files. This requires a manual download, but that's more efficient that downloading every time (and also the API is quite slow)
Tables could be kept separately (i.e. list of tables cf. Read_ESAS_Tables in #1) or immediately joined into a single dataframe, which is likely the easiest to work with.
# PSEUDO CODE
@return dataframe
read_esas <- function(directory)
if (observations.csv missing) {
cli::cli_abort(
"{.file observations.csv} not found.",
class = "esas_error_observations_not_found"
)
}
# repeat error for other tables
df <- campaigns %>%
left_join() %>%
left_join() %>%
df
}
Create a function to read the 4 ESAS tables:
Read_ESAS_Tables
in #1) or immediately joined into a single dataframe, which is likely the easiest to work with.