Skip to content

Commit

Permalink
Document
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Jul 1, 2024
1 parent 8f8027a commit 395bcdf
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions R/get_cjs_codes.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#' Get Criminal Justice Codes
#'
#' This function gets the criminal justice codes from the Criminal Justice Hub website.
#' See [www.criminaljusticehub.org.uk](https://www.criminaljusticehub.org.uk/jargon-buster/cjs-offence-code/)
#'
#' @export
#' @examples
#' get_cjs_codes()
get_cjs_codes = function(
u = paste0(
"https://www.criminaljusticehub.org.uk/wp-content/uploads/",
"2022/10/cjs-offence-index-sept-2022.ods"
)
) {
f = file.path(tempdir(), "cjs_codes.ods")
message("Downloading CJS codes from ", u, " to ", f)
utils::download.file(u, f, mode = "wb")
cjs_codes = readODS::read_ods(f, sheet = 1)
cjs_codes
}
Binary file added man/figures/README-fig-time-1.pdf
Binary file not shown.
Binary file added man/figures/README-fig-time-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/README-unnamed-chunk-20-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/README-unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 395bcdf

Please sign in to comment.