From aac093ac15f709e2d4077642d427be839c9cdc8f Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 29 Jul 2024 12:58:47 +0100 Subject: [PATCH] Update --- R/opsnap.R | 5 ++++- man/download_and_read.Rd | 5 ++++- man/get_cjs_codes.Rd | 21 +++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 man/get_cjs_codes.Rd diff --git a/R/opsnap.R b/R/opsnap.R index 295d80f..af797ac 100644 --- a/R/opsnap.R +++ b/R/opsnap.R @@ -7,7 +7,10 @@ #' @export #' @examples #' if (FALSE) { -#' u = "https://www.westyorkshire.police.uk/sites/default/files/2023-10/operation_snap_july-sept_2023.xlsx" +#' u = paste0( +#' "https://www.westyorkshire.police.uk/sites/default/files/", +#' "2023-10/operation_snap_july-sept_2023.xlsx" +#' ) #' download_and_read(, dir = ".") #' } download_and_read = function(u, remove_nas = FALSE, dir = "raw_data/west-yorkshire") { diff --git a/man/download_and_read.Rd b/man/download_and_read.Rd index 58b6e00..e02a44a 100644 --- a/man/download_and_read.Rd +++ b/man/download_and_read.Rd @@ -21,7 +21,10 @@ Download and read data from opsnap project } \examples{ if (FALSE) { -u = "https://www.westyorkshire.police.uk/sites/default/files/2023-10/operation_snap_july-sept_2023.xlsx" +u = paste0( + "https://www.westyorkshire.police.uk/sites/default/files/", + "2023-10/operation_snap_july-sept_2023.xlsx" +) download_and_read(, dir = ".") } } diff --git a/man/get_cjs_codes.Rd b/man/get_cjs_codes.Rd new file mode 100644 index 0000000..5fda5a5 --- /dev/null +++ b/man/get_cjs_codes.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/get_cjs_codes.R +\name{get_cjs_codes} +\alias{get_cjs_codes} +\title{Get Criminal Justice Codes} +\usage{ +get_cjs_codes( + u = paste0("https://www.criminaljusticehub.org.uk/wp-content/uploads/", + "2022/10/cjs-offence-index-sept-2022.ods") +) +} +\arguments{ +\item{u}{The URL of the Criminal Justice Hub website.} +} +\description{ +This function gets the criminal justice codes from the Criminal Justice Hub website. +See \href{https://www.criminaljusticehub.org.uk/jargon-buster/cjs-offence-code/}{www.criminaljusticehub.org.uk} +} +\examples{ +get_cjs_codes() +}