Skip to contents

Other archive contents are not extracted. Retains source ZIPs and raw CSV bytes. A manifest records archive and CSV SHA-256, row count and original member path. ZIP traversal paths are refused. Previously extracted CSVs are hash-checked.

Usage

sl_archive_snapshot(dir = sl_cache_dir(), months = NULL, forces = NULL)

Arguments

dir

Cache containing archive ZIPs and optionally a download manifest.

months

Optional YYYY-MM filter; defaults to the download request.

forces

Optional force filter; defaults to the download request.

Value

A tibble of CSV versions. Writes snapshots and their manifest in dir.

Examples

sl_list_versions(system.file("extdata", "sample", package = "searchlight"))
#> # A tibble: 3 × 11
#>   force_id       month archive_file snapshot_month csv_path csv_sha256 n_records
#>   <chr>          <chr> <chr>        <chr>          <chr>    <chr>          <int>
#> 1 west-yorkshire 2026… 2026-07.zip  2026-07        2026-05… aa07c0933…      1659
#> 2 west-yorkshire 2026… 2026-07.zip  2026-07        2026-06… a302977a9…      1466
#> 3 west-yorkshire 2026… 2026-07.zip  2026-07        2026-07… c72a1a84f…      1532
#> # ℹ 4 more variables: archive_sha256 <chr>, downloaded_at <dttm>, url <chr>,
#> #   source_csv_sha256 <chr>