Creates an observational data frame from a WACZ web archive.
A WACZ (Web Archive Collection Zipped) file is an open package format for storing and exchanging web archive collections. A WACZ archive is a ZIP container that combines one or more WARC files containing captured web resources with indexes, page metadata, and package metadata needed to locate, describe, validate, and replay the archived content.
Unlike a standalone WARC file, which primarily stores captured HTTP
requests and responses and their payloads, a WACZ archive provides
additional structure around those captures. Typical components include
WARC files, a CDX index, a page list, and a datapackage.json manifest.
observe_wacz() extracts this structural information, combines
page-level information with WARC index metadata, and returns one
observational row for each archived web page.
The resulting object represents observations only. It intentionally
avoids making semantic assertions about Records, Record Parts,
Instantiations, or other archival entities. Such interpretation can
be added later with wacz_to_recordset_df() or downstream semantic
enrichment workflows.
Value
A tibble containing observations extracted from the archive.
The returned object carries two attributes:
datapackage, containing the parseddatapackage.jsonmetadata supplied by the WACZ archive;wacz, containing the normalized path to the source archive.
Typical variables include:
page identifiers;
resource locators (URLs);
page titles;
timestamps;
extracted text;
text signatures;
MIME types;
WARC digests;
archive offsets;
version counts.
Details
A WACZ archive commonly contains several complementary sources of
observational information. pages/pages.jsonl describes archived
pages, while indexes/index.cdx indexes captured resources stored in
the WARC files. The datapackage.json manifest describes the package
itself and its constituent resources.
The function currently performs the following steps:
extracts the WACZ archive into a temporary directory;
reads the archive
datapackage.json;parses page metadata from
pages/pages.jsonl;parses WARC index metadata from
indexes/index.cdx;collapses multiple archived entries for the same resource;
joins page observations with archive metadata.
The resulting observations preserve evidence supplied by the archive without interpreting its archival semantics. The underlying WARC, index, page, and package structures may therefore support richer observational analysis than is exposed by the current page-level representation.
References
Webrecorder WACZ format specification: https://specs.webrecorder.net/wacz/1.1.1/
Examples
wacz <- system.file(
"testdata", "fscontext_020.wacz",
package = "fscontext"
)
observe_wacz(wacz)
#> # A tibble: 6 × 23
#> format page_id title has_text resource_locator size timestamp favicon text
#> <chr> <chr> <chr> <lgl> <chr> <int> <chr> <chr> <chr>
#> 1 NA 08w4vi6… Pack… NA https://fsconte… 1.01e6 2026-06-… https:… "Pac…
#> 2 NA 7bi5e13… Intr… NA https://fsconte… 1.17e6 2026-06-… https:… "Int…
#> 3 NA 7yvylsx… Arti… NA https://fsconte… 9.77e5 2026-06-… https:… "Art…
#> 4 NA 839varp… Chan… NA https://fsconte… 9.98e5 2026-06-… https:… "Cha…
#> 5 NA da663zi… Hand… NA https://fsconte… 1.17e6 2026-06-… https:… "Han…
#> 6 NA org76u2… File… NA https://fsconte… 1.18e6 2026-06-… https:… "Fil…
#> # ℹ 14 more variables: text_length <int>, quick_sig_text <chr>, urlkey <chr>,
#> # cdx_timestamp <chr>, digest <chr>, mime <chr>, offset <int>, length <int>,
#> # record_digest <chr>, status <int>, warc_filename <chr>, n_versions <int>,
#> # archive <chr>, full_path <chr>
