View source: R/observe_universe.R
| observe_universe | R Documentation |
Aggregates repeated filesystem observations into a lightweight longitudinal observational universe.
observe_universe(
snapshot_dir,
max_aggregation_depth = 2,
by_storage = TRUE,
by_person = FALSE,
exclude_patterns = c("\\.gitignore$", "\\.Rbuildignore$", "\\.github$",
"\\.quarto$", "\\.Rcheck$", "\\.RDataTmp", "\\.Trash-1000",
"\\.cryptomator$", "\\.editorconfig$", "\\.gitattributes$",
"\\.webmanifest$")
)
snapshot_dir |
Directory containing snapshot |
max_aggregation_depth |
Integer giving the maximum filesystem path depth used to derive observational aggregation units. |
by_storage |
Logical.
If |
by_person |
Logical.
If |
exclude_patterns |
Character vector of regular expressions used to exclude operational artefacts from observational aggregation units. Defaults exclude common:
Exclusions are applied after aggregation-unit derivation and before longitudinal summarisation. |
The function operates on snapshot .rds files created by
scan_storage() and summarises repeated observations of
operational filesystem aggregation units across time.
The resulting table is intentionally observational and pre-interpretive:
no intellectual Record Sets are inferred;
no semantic reconciliation is performed;
no provenance assertions beyond observation are made.
Instead, the function provides a lightweight observational universe suitable for:
reconstruction workflows;
audit preparation;
preservation planning;
storage coverage analysis;
identifying candidate contextual Record Sets;
longitudinal filesystem observation.
Observational aggregation units are operationally approximated from observed file paths using configurable path truncation rules.
Aggregation units derived at different aggregation depths are not directly comparable.
Single files are never treated as aggregation units.
Aggregation may optionally preserve:
storage boundaries (storage_id);
person boundaries (person_id).
A tibble containing longitudinal observational summaries of filesystem aggregation units.
Variables include:
Operational filesystem aggregation unit derived from path truncation.
Actual observed filesystem depth of the aggregation unit.
Maximum filesystem path depth used during aggregation.
Number of snapshot observations in which the aggregation unit appeared.
Average number of files observed per snapshot for the aggregation unit.
Average observed size in bytes per snapshot for the aggregation unit.
Average observed size in megabytes per snapshot for the aggregation unit.
Average observed size in gigabytes per snapshot for the aggregation unit.
Total files observed for the aggregation unit across all snapshots.
Total bytes observed for the aggregation unit across all snapshots.
data("fscontextdemo_snapshot_01")
data("fscontextdemo_snapshot_02")
tmp <- tempfile()
dir.create(tmp)
saveRDS(
fscontextdemo_snapshot_01,
file.path(tmp, "snapshot_01.rds")
)
saveRDS(
fscontextdemo_snapshot_02,
file.path(tmp, "snapshot_02.rds")
)
observation_universe <- observe_universe(
snapshot_dir = tmp,
max_aggregation_depth = 2
)
head(observation_universe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.