Skip to contents

Fetches and parses the publisher's changelog, which records when a force re-supplied months ("data refresh") or failed to supply a month ("not provided"). lamp_coverage() and lamp_panel() use it to mark force-months as refreshed and to annotate gaps. The page is fetched once and cached; pass refresh = TRUE to fetch it again.

Usage

lamp_changelog(refresh = FALSE, dir = lamp_cache_dir())

Arguments

refresh

Fetch the page again even if a cached copy exists.

dir

Cache directory; see lamp_cache_dir().

Value

A tibble with columns entry_month (the changelog heading, a Date), force_name, force_id, file_type (street, outcomes, stop-and-search, a semicolon-separated combination, or all), action (refresh or not_provided), from, to (Dates, NA when the entry covers all months) and text (the entry as published). Entries that do not follow the refresh or gap patterns are kept with action = NA.

Examples

if (FALSE) {
# Requires network access
cl <- lamp_changelog()
cl[cl$force_id == "west-yorkshire", ]
}