Validates the fixed CSV schema, checksum and row count, preserving every event (including identical rows) and raw ethnicity strings. Timestamps retain their supplied UTC offsets and are displayed in Europe/London. Absent or refused ethnicity is Unknown. Missing outcome measures remain NA, not negative outcomes. The filename defines the submission month. Offset conversion can cross a month boundary; date_month_crossing records this without moving the event into another source file. A timestamp must match the filename in either its supplied clock or the London clock.
Usage
sl_read_records(dir = sl_cache_dir(), versions = NULL)See also
sl_contract(), sl_select_version(), sl_sample()
Other ingest:
sl_archive_download(),
sl_archive_index(),
sl_archive_snapshot(),
sl_assign_geography(),
sl_boundaries(),
sl_cache_clear(),
sl_cache_dir(),
sl_contract(),
sl_exposure(),
sl_list_versions(),
sl_population(),
sl_population_crosstab(),
sl_sample(),
sl_select_version()
Examples
d <- system.file("extdata", "sample", package = "searchlight")
v <- sl_select_version(sl_list_versions(d))
records <- sl_read_records(d, v[1, ])
summary(sl_contract(records))
#> # A tibble: 6 × 5
#> force_id month status n_records changelog_note
#> <chr> <chr> <chr> <int> <chr>
#> 1 west-yorkshire 2026-05 submitted 1659 NA
#> 2 dyfed-powys 2026-05 missing NA NA
#> 3 west-yorkshire 2026-06 missing NA NA
#> 4 dyfed-powys 2026-06 missing NA NA
#> 5 west-yorkshire 2026-07 missing NA NA
#> 6 dyfed-powys 2026-07 missing NA NA