Skip to content

Commit

Permalink
Document
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Apr 11, 2024
1 parent d2dcbda commit 16beed1
Show file tree
Hide file tree
Showing 40 changed files with 124 additions and 126 deletions.
1 change: 0 additions & 1 deletion .github/workflows/roscron-check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: any::rcmdcheck
needs: check

Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/rostemplate-gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- main
- master
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: rostemplate-gh-pages

Expand All @@ -11,6 +14,7 @@ jobs:
runs-on: windows-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

Expand All @@ -19,11 +23,11 @@ jobs:
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
install-r: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages:
extra-packages: |
local::.
any::pkgdown
ropenspain/rostemplate
Expand All @@ -33,5 +37,5 @@ jobs:
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = TRUE, run_dont_run = TRUE, clean = TRUE)'
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, run_dont_run = TRUE)'
1 change: 0 additions & 1 deletion .github/workflows/update-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: |
local::.
any::cli
Expand Down
17 changes: 11 additions & 6 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------
# CITATION file created with {cffr} R package, v0.5.0
# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# -----------------------------------------------------------
# --------------------------------------------

cff-version: 1.2.0
message: 'To cite package "CatastRoNav" in publications use:'
Expand Down Expand Up @@ -54,11 +54,10 @@ references:
url: https://www.R-project.org/
authors:
- name: R Core Team
location:
name: Vienna, Austria
year: '2024'
institution:
name: R Foundation for Statistical Computing
address: Vienna, Austria
year: '2024'
version: '>= 3.6'
- type: software
title: rappdirs
Expand Down Expand Up @@ -97,6 +96,7 @@ references:
authors:
- family-names: Gagolewski
given-names: Marek
orcid: https://orcid.org/0000-0003-0637-6028
- family-names: Tartanus
given-names: Bartek
- family-names: Unicode
Expand Down Expand Up @@ -208,6 +208,10 @@ references:
- family-names: Dunnington
given-names: Dewey
orcid: https://orcid.org/0000-0002-9415-4582
- family-names: Brand
given-names: Teun
name-particle: van den
orcid: https://orcid.org/0000-0002-9335-7468
year: '2024'
- type: software
title: knitr
Expand Down Expand Up @@ -289,3 +293,4 @@ references:
email: hadley@posit.co
year: '2024'
version: '>= 3.0.0'

5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ Suggests:
testthat (>= 3.0.0)
VignetteBuilder:
knitr
Config/Needs/website: ropenspain/rostemplate, devtools, sessioninfo,
remotes, sfheaders, rapidjsonr, jsonify, geometries, tidyverse
Config/testthat/edition: 3
Config/testthat/parallel: true
Copyright: Data Source: SITNA – Catastro de Navarra
<https://geoportal.navarra.es/es/inspire>
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.0
RoxygenNote: 7.3.1
7 changes: 3 additions & 4 deletions R/atom_cp.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' ATOM INSPIRE: Download all the Cadastral Parcels of a Municipality
#'
#' ATOM INSPIRE: Download all the cadastral parcels of a municipality
#'
#' @description
#' Get the spatial data of all the cadastral parcels belonging to a single
#' municipality using the INSPIRE ATOM service.
#'
Expand All @@ -11,7 +11,7 @@
#' @family parcels
#'
#' @export
#' @return A \CRANpkg{sf} object.
#' @return A [`sf`][sf::st_sf] object.
#'
#' @inheritParams catrnav_atom_get_parcels_db_all
#' @param munic Municipality to extract, It can be a part of a string or the
Expand All @@ -30,7 +30,6 @@
#' subtitle = "Pamplona / Iruña"
#' )
#' }
#'
catrnav_atom_get_parcels <- function(munic,
cache = TRUE,
update_cache = FALSE,
Expand Down
6 changes: 2 additions & 4 deletions R/atom_cp_db.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#' ATOM INSPIRE: Reference Database for ATOM Cadastral Parcels
#' ATOM INSPIRE: Reference database for ATOM cadastral parcels
#'
#' @description
#'
#'
#' Create a database containing the urls provided in the INSPIRE ATOM service
#' for extracting Cadastral Parcels.
#'
Expand All @@ -24,7 +22,7 @@
#' @export
#'
#' @return
#' A tibble with the information requested.
#' A [tibble][tibble::tibble] with the information requested:
#' - `munic`: Name of the municipality.
#' - `url`: url for downloading information of the corresponding municipality.
#' - `date`: Reference date of the data.
Expand Down
8 changes: 4 additions & 4 deletions R/cache_clear.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Clear your **CatastRoNav** cache dir
#' Clear your \pkg{CatastRoNav} cache dir
#'
#' @family cache utilities
#'
Expand All @@ -8,20 +8,20 @@
#' **Use this function with caution**. This function would clear your cached
#' data and configuration, specifically:
#'
#' * Deletes the **CatastRoNav** config directory
#' * Deletes the \pkg{CatastRoNav} config directory
#' (`rappdirs::user_config_dir("CatastRoNav", "R")`).
#' * Deletes the `cache_dir` directory.
#' * Deletes the values on stored on `Sys.getenv("CATASTRONAV_CACHE_DIR")`.
#'
#' @param config if `TRUE`, will delete the configuration folder of
#' **CatastRoNav**.
#' \pkg{CatastRoNav}.
#' @param cached_data If this is set to `TRUE`, it will delete your
#' `cache_dir` and all its content.
#' @inheritParams catrnav_set_cache_dir
#'
#' @details
#' This is an overkill function that is intended to reset your status
#' as it you would never have installed and/or used **CatastRoNav**.
#' as it you would never have installed and/or used \pkg{CatastRoNav}.
#'
#' @examples
#'
Expand Down
4 changes: 2 additions & 2 deletions R/cache_set.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Set your **CatastRoNav** cache dir
#' Set your \pkg{CatastRoNav} cache dir
#'
#' @family cache utilities
#' @seealso [rappdirs::user_config_dir()]
Expand All @@ -13,7 +13,7 @@
#' options:
#' * Run `Sys.setenv(CATASTRONAV_CACHE_DIR = "cache_dir")`. You would need to
#' run this command on each session (Similar to `install = FALSE`).
#' * Write this line on your .Renviron file:
#' * Write this line on your `.Renviron` file:
#' `CATASTRONAV_CACHE_DIR = "value_for_cache_dir"` (same behavior than
#' `install = TRUE`). This would store your `cache_dir` permanently.
#'
Expand Down
15 changes: 4 additions & 11 deletions R/wfs_ad.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Download Addresses of Navarre
#' Download addresses of Navarre in spatial format
#'
#' @description
#' Get the spatial data of addresses by bounding box.
Expand All @@ -7,21 +7,14 @@
#'
#' @seealso [sf::st_bbox()]
#'
#' @return A \CRANpkg{sf} object.
#' @return A [`sf`][sf::st_sf] object.
#' @source
#' [SITNA – Catastro de Navarra](https://geoportal.navarra.es/es/inspire)
#'
#' @details
#'
#' When `x` is a numeric vector, make sure that the `srs` matches the
#' coordinate values. Additionally, when the `srs` correspond to a geographic
#' reference system (4326, 4258), the function queries the bounding box on
#' [EPSG:25830](https://epsg.io/25830) - ETRS89 / UTM zone 30N. The result is
#' provided always in the SRS provided in `srs`.
#'
#' When `x` is a \CRANpkg{sf} object, the value `srs` is ignored. The query is
#' performed using [EPSG:25830](https://epsg.io/25830) (ETRS89 / UTM zone 30N)
#' and the spatial object is projected back to the SRS of the initial object.
#' ```{r child = "man/chunks/spatdet.Rmd"}
#' ```
#'
#' @export
#'
Expand Down
19 changes: 6 additions & 13 deletions R/wfs_bu.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#' Download Buildings of Navarre
#' Download buildings of Navarre in spatial format
#'
#' @description
#' Get the spatial data of buildings by bounding box.
#'
#' @param x See **Details**. It could be:
#' - A numeric vector of length 4 with the coordinates that defines
#' the bounding box: `c(xmin, ymin, xmax, ymax)`
#' - A `sf/sfc` object, as provided by the **sf** package.
#' the bounding box: `c(xmin, ymin, xmax, ymax)`.
#' - A `sf/sfc` object, as provided by the \CRANpkg{sf} package.
#' @param srs SRS/CRS to use on the query. See **Details**.
#' @param verbose Logical, displays information. Useful for debugging, default
#' is `FALSE`.
Expand All @@ -17,21 +17,14 @@
#'
#' @seealso [sf::st_bbox()]
#'
#' @return A \CRANpkg{sf} object.
#' @return A [`sf`][sf::st_sf] object.
#' @source
#' [SITNA – Catastro de Navarra](https://geoportal.navarra.es/es/inspire)
#'
#' @details
#'
#' When `x` is a numeric vector, make sure that the `srs` matches the
#' coordinate values. Additionally, when the `srs` correspond to a geographic
#' reference system (4326, 4258), the function queries the bounding box on
#' [EPSG:25830](https://epsg.io/25830) - ETRS89 / UTM zone 30N. The result is
#' provided always in the SRS provided in `srs`.
#'
#' When `x` is a \CRANpkg{sf} object, the value `srs` is ignored. The query is
#' performed using [EPSG:25830](https://epsg.io/25830) (ETRS89 / UTM zone 30N)
#' and the spatial object is projected back to the SRS of the initial object.
#' ```{r child = "man/chunks/spatdet.Rmd"}
#' ```
#'
#' @export
#'
Expand Down
15 changes: 4 additions & 11 deletions R/wfs_cp.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Download Cadastral Parcels of Navarre
#' Download cadastral parcels of Navarre in spatial format
#'
#' @description
#' Get the spatial data of cadastral parcels by bounding box.
Expand All @@ -9,21 +9,14 @@
#'
#' @family parcels
#'
#' @return A \CRANpkg{sf} object.
#' @return A [`sf`][sf::st_sf] object.
#' @source
#' [SITNA – Catastro de Navarra](https://geoportal.navarra.es/es/inspire)
#'
#' @details
#'
#' When `x` is a numeric vector, make sure that the `srs` matches the
#' coordinate values. Additionally, when the `srs` correspond to a geographic
#' reference system (4326, 4258), the function queries the bounding box on
#' [EPSG:25830](https://epsg.io/25830) - ETRS89 / UTM zone 30N. The result is
#' provided always in the SRS provided in `srs`.
#'
#' When `x` is a \CRANpkg{sf} object, the value `srs` is ignored. The query is
#' performed using [EPSG:25830](https://epsg.io/25830) (ETRS89 / UTM zone 30N)
#' and the spatial object is projected back to the SRS of the initial object.
#' ```{r child = "man/chunks/spatdet.Rmd"}
#' ```
#'
#' @export
#'
Expand Down
7 changes: 4 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ knitr::opts_chunk$set(
message = FALSE,
warning = FALSE,
dev = "ragg_png",
dpi = 300,
tidy = "styler",
comment = "#>",
fig.path = "man/figures/README-",
Expand Down Expand Up @@ -55,14 +56,14 @@ install.packages("CatastRoNav",
Alternatively, you can install the developing version of **CatastRoNav** with:

```{r, eval = FALSE}
library(remotes)
install_github("rOpenSpain/CatastRoNav", dependencies = TRUE)
remotes::install_github("rOpenSpain/CatastRoNav", dependencies = TRUE)
```

## Usage

The WFS service allows to download vector objects of specific cadastral
elements. The result is provided as \CRANpkg{sf} objects (See **sf** package).
elements. The result is provided as `sf` objects (See [**sf**
package](https://r-spatial.github.io/sf/)).

```{r wfs}
library(CatastRoNav)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ Alternatively, you can install the developing version of **CatastRoNav**
with:

``` r
library(remotes)
install_github("rOpenSpain/CatastRoNav", dependencies = TRUE)
remotes::install_github("rOpenSpain/CatastRoNav", dependencies = TRUE)
```

## Usage

The WFS service allows to download vector objects of specific cadastral
elements. The result is provided as objects (See **sf** package).
elements. The result is provided as `sf` objects (See [**sf**
package](https://r-spatial.github.io/sf/)).

``` r
library(CatastRoNav)
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.3.2 (2023-10-31)",
"runtimePlatform": "R version 4.3.3 (2024-02-29)",
"author": [
{
"@type": "Person",
Expand Down Expand Up @@ -190,7 +190,7 @@
},
"SystemRequirements": null
},
"fileSize": "350.019KB",
"fileSize": "947.524KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
2 changes: 0 additions & 2 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Navarra
ORCID
Olite
Pamplona
Renviron
Royé
SITNA
SRS
Expand All @@ -29,4 +28,3 @@ organisations
pre
rOS
rappdirs
tibble
2 changes: 1 addition & 1 deletion inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.3.2 (2023-10-31)",
"runtimePlatform": "R version 4.3.3 (2024-02-29)",
"version": "0.0.2.9000"
},
{
Expand Down
Loading

0 comments on commit 16beed1

Please sign in to comment.