From bcdc5afb97991807ede3aeba83eddcf783997e9b Mon Sep 17 00:00:00 2001 From: olivroy Date: Mon, 18 Sep 2023 13:01:22 -0400 Subject: [PATCH] Using advice from https://r-pkgs.org/data.html#sec-documenting-data for data documentation. --- R/data.R | 42 ++++++++++++++---------------------------- man/Shapes.Rd | 11 +++++++---- man/land.Rd | 6 +++++- man/metro.Rd | 8 ++++++-- man/rivers.Rd | 8 ++++++-- 5 files changed, 38 insertions(+), 37 deletions(-) diff --git a/R/data.R b/R/data.R index 19f92a37..e291ddb5 100644 --- a/R/data.R +++ b/R/data.R @@ -6,51 +6,40 @@ #' #' `World` World map. The default projection for this world map is Eckhart IV since area sizes are preserved, which is a very important property for choropleths. #' -#' `NLD_prov` and `NLD_muni`, maps of the Netherlands at province and municipality level of 2013. The used projection is the Rijksdriehoekstelsel projection. **Important:** publication of these maps is only allowed when cited to Statistics Netherlands (CBS) and Kadaster Nederland as source. +#' `NLD_prov` and `NLD_muni`, maps of the Netherlands at province and municipality level of 2013. The used projection is the Rijksdriehoekstelsel projection. +#' +#' **Important:** publication of these maps is only allowed when citing Statistics Netherlands (CBS) and Kadaster Nederland as source. #' -#' @usage data(World) -#' @name World #' @rdname Shapes -#' @docType data +#' @format NULL #' @source for `World` #' @source for `World` #' @source for `NLD_prov` and `NLD_muni`. #' @references Statistics Netherlands (2014), The Hague/Heerlen, Netherlands, . #' @references Kadaster, the Netherlands' Cadastre, Land Registry, and Mapping Agency (2014), Apeldoorn, Netherlands, . -NULL +"World" -#' @usage data(NLD_prov) -#' @name NLD_prov #' @rdname Shapes -#' @docType data -NULL +#' @format NULL + +"NLD_prov" -#' @usage data(NLD_muni) -#' @name NLD_muni #' @rdname Shapes -#' @docType data -NULL +#' @format NULL +"NLD_muni" #' Spatial data of rivers #' -#' Spatial data of rivers, of class [`sf`][`sf::sf`] -#' -#' @usage data(rivers) -#' @name rivers -#' @docType data #' @source -NULL +"rivers" #' Spatial data of metropolitan areas #' -#' Spatial data of metropolitan areas, of class [`sf`][`sf::sf`]. The data includes a population times series from 1950 to (forecasted) 2030. All metro areas with over 1 million inhabitants in 2010 are included. +#' `metro` includes a population time series from 1950 to (forecasted) 2030. All metro areas with over 1 million inhabitants in 2010 are included. #' -#' @usage data(metro) -#' @name metro -#' @docType data #' @references United Nations, Department of Economic and Social Affairs, Population Division (2014). World Urbanization Prospects: The 2014 Revision, CD-ROM Edition. #' @source -NULL +"metro" #' Spatial data of global land cover #' @@ -62,8 +51,5 @@ NULL #' #' **Important:** publication of these maps is only allowed when cited to Tateishi et al. (2014), and when "Geospatial Information Authority of Japan, Chiba University and collaborating organizations." is shown. #' -#' @usage data(land) -#' @name land -#' @docType data #' @references Production of Global Land Cover Data - GLCNMO2008, Tateishi, R., Thanh Hoan, N., Kobayashi, T., Alsaaideh, B., Tana, G., Xuan Phong, D. (2014), Journal of Geography and Geology, 6 (3). -NULL +"land" diff --git a/man/Shapes.Rd b/man/Shapes.Rd index 4ce69209..6b394423 100644 --- a/man/Shapes.Rd +++ b/man/Shapes.Rd @@ -14,11 +14,11 @@ \url{https://www.cbs.nl/} for \code{NLD_prov} and \code{NLD_muni}. } \usage{ -data(World) +World -data(NLD_prov) +NLD_prov -data(NLD_muni) +NLD_muni } \description{ Maps of the world and the Netherlands (province and municipality level), class \code{\link[sf:sf]{sf}} @@ -28,10 +28,13 @@ The default projections for these maps are Eckhart IV (World) and Rijksdriehoeks \code{World} World map. The default projection for this world map is Eckhart IV since area sizes are preserved, which is a very important property for choropleths. -\code{NLD_prov} and \code{NLD_muni}, maps of the Netherlands at province and municipality level of 2013. The used projection is the Rijksdriehoekstelsel projection. \strong{Important:} publication of these maps is only allowed when cited to Statistics Netherlands (CBS) and Kadaster Nederland as source. +\code{NLD_prov} and \code{NLD_muni}, maps of the Netherlands at province and municipality level of 2013. The used projection is the Rijksdriehoekstelsel projection. + +\strong{Important:} publication of these maps is only allowed when citing Statistics Netherlands (CBS) and Kadaster Nederland as source. } \references{ Statistics Netherlands (2014), The Hague/Heerlen, Netherlands, \url{https://www.cbs.nl/}. Kadaster, the Netherlands' Cadastre, Land Registry, and Mapping Agency (2014), Apeldoorn, Netherlands, \url{https://www.kadaster.nl/}. } +\keyword{datasets} diff --git a/man/land.Rd b/man/land.Rd index 66945975..1d5f24d8 100644 --- a/man/land.Rd +++ b/man/land.Rd @@ -4,8 +4,11 @@ \name{land} \alias{land} \title{Spatial data of global land cover} +\format{ +An object of class \code{stars} with 1080 rows and 540 columns. +} \usage{ -data(land) +land } \description{ Spatial data of global land cover, percent tree cover, and elevation of class \code{\link[stars:st_as_stars]{stars}}. @@ -20,3 +23,4 @@ Percent Tree Cover (trees) represents the density of trees on the ground, and th \references{ Production of Global Land Cover Data - GLCNMO2008, Tateishi, R., Thanh Hoan, N., Kobayashi, T., Alsaaideh, B., Tana, G., Xuan Phong, D. (2014), Journal of Geography and Geology, 6 (3). } +\keyword{datasets} diff --git a/man/metro.Rd b/man/metro.Rd index d20e86e2..a33d9dd2 100644 --- a/man/metro.Rd +++ b/man/metro.Rd @@ -4,15 +4,19 @@ \name{metro} \alias{metro} \title{Spatial data of metropolitan areas} +\format{ +An object of class \code{sf} (inherits from \code{data.frame}) with 436 rows and 13 columns. +} \source{ \url{https://population.un.org/wup/} } \usage{ -data(metro) +metro } \description{ -Spatial data of metropolitan areas, of class \code{\link[sf:sf]{sf}}. The data includes a population times series from 1950 to (forecasted) 2030. All metro areas with over 1 million inhabitants in 2010 are included. +\code{metro} includes a population time series from 1950 to (forecasted) 2030. All metro areas with over 1 million inhabitants in 2010 are included. } \references{ United Nations, Department of Economic and Social Affairs, Population Division (2014). World Urbanization Prospects: The 2014 Revision, CD-ROM Edition. } +\keyword{datasets} diff --git a/man/rivers.Rd b/man/rivers.Rd index 72c3f2fc..58382d57 100644 --- a/man/rivers.Rd +++ b/man/rivers.Rd @@ -4,12 +4,16 @@ \name{rivers} \alias{rivers} \title{Spatial data of rivers} +\format{ +An object of class \code{sf} (inherits from \code{data.frame}) with 1616 rows and 5 columns. +} \source{ \url{https://www.naturalearthdata.com} } \usage{ -data(rivers) +rivers } \description{ -Spatial data of rivers, of class \code{\link[sf:sf]{sf}} +Spatial data of rivers } +\keyword{datasets}