diff --git a/R/data.R b/R/data.R index 02fe7b5..6f58144 100644 --- a/R/data.R +++ b/R/data.R @@ -9,8 +9,8 @@ #' @aliases si_centroids #' @examples #' si_zones -#' plot(si_zones$geometry) -#' plot(si_centroids$geometry, add = TRUE) +#' sf:::plot.sfg(si_zones$geometry) +#' sf:::plot.sfg(si_centroids$geometry, add = TRUE) NULL #' Example OD dataset @@ -70,7 +70,7 @@ NULL #' @name zones_york #' @examples #' head(zones_york) -#' plot(zones_york$geometry) +#' sf:::plot.sfg(zones_york$geometry) NULL #' Example destinations dataset: schools in York @@ -84,4 +84,39 @@ NULL #' @name destinations_york #' @examples #' head(destinations_york) +NULL + +#' Origin-Destination Data for Leeds +#' +#' This dataset contains origin-destination data for Leeds, including the number of trips between output areas (OAs) and workplace zones (WPZs). +#' +#' @docType data +#' @keywords datasets +#' @name si_oa_wpz +#' @examples +#' head(si_oa_wpz) +NULL + +#' Origin Data for Leeds +#' +#' This dataset contains the number of trips originating from each output area (OA) in Leeds. +#' +#' @docType data +#' @keywords datasets +#' @name si_oa_wpz_o +#' @examples +#' head(si_oa_wpz_o) +#' sf:::plot.sf(si_oa_wpz_o["n_o"]) +NULL + +#' Destination Data for Leeds +#' +#' This dataset contains the number of trips destined for each workplace zone (WPZ) in Leeds. +#' +#' @docType data +#' @keywords datasets +#' @name si_oa_wpz_d +#' @examples +#' head(si_oa_wpz_d) +#' sf:::plot.sf(si_oa_wpz_d["n_d"]) NULL \ No newline at end of file diff --git a/README.qmd b/README.qmd index 25b40ee..4febd99 100644 --- a/README.qmd +++ b/README.qmd @@ -193,4 +193,5 @@ bench::mark( usethis::use_github_action("check-standard") # Add pkgdown action: usethis::use_github_action("pkgdown") +usethis::use_data_raw("si_oa_wpz") ``` \ No newline at end of file diff --git a/man/si_oa_wpz.Rd b/man/si_oa_wpz.Rd new file mode 100644 index 0000000..1e441a6 --- /dev/null +++ b/man/si_oa_wpz.Rd @@ -0,0 +1,13 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{si_oa_wpz} +\alias{si_oa_wpz} +\title{Origin-Destination Data for Leeds} +\description{ +This dataset contains origin-destination data for Leeds, including the number of trips between output areas (OAs) and workplace zones (WPZs). +} +\examples{ +head(si_oa_wpz) +} +\keyword{datasets} diff --git a/man/si_oa_wpz_d.Rd b/man/si_oa_wpz_d.Rd new file mode 100644 index 0000000..2014c43 --- /dev/null +++ b/man/si_oa_wpz_d.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{si_oa_wpz_d} +\alias{si_oa_wpz_d} +\title{Destination Data for Leeds} +\description{ +This dataset contains the number of trips destined for each workplace zone (WPZ) in Leeds. +} +\examples{ +head(si_oa_wpz_d) +sf:::plot.sf(si_oa_wpz_d["n_d"]) +} +\keyword{datasets} diff --git a/man/si_oa_wpz_o.Rd b/man/si_oa_wpz_o.Rd new file mode 100644 index 0000000..a6b1e61 --- /dev/null +++ b/man/si_oa_wpz_o.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{si_oa_wpz_o} +\alias{si_oa_wpz_o} +\title{Origin Data for Leeds} +\description{ +This dataset contains the number of trips originating from each output area (OA) in Leeds. +} +\examples{ +head(si_oa_wpz_o) +sf:::plot.sf(si_oa_wpz_o["n_o"]) +} +\keyword{datasets} diff --git a/man/si_zones.Rd b/man/si_zones.Rd index 9f3491c..8eb978b 100644 --- a/man/si_zones.Rd +++ b/man/si_zones.Rd @@ -14,7 +14,7 @@ The schema data can be (re-)generated using code in \code{data-raw} } \examples{ si_zones -plot(si_zones$geometry) -plot(si_centroids$geometry, add = TRUE) +sf:::plot.sfg(si_zones$geometry) +sf:::plot.sfg(si_centroids$geometry, add = TRUE) } \keyword{datasets} diff --git a/man/zones_york.Rd b/man/zones_york.Rd index 7e51d3c..9142bfc 100644 --- a/man/zones_york.Rd +++ b/man/zones_york.Rd @@ -9,6 +9,6 @@ See data-raw/zones_york.qmd for details on the data source. } \examples{ head(zones_york) -plot(zones_york$geometry) +sf:::plot.sfg(zones_york$geometry) } \keyword{datasets}