Skip to content

Commit 7768f5e

Browse files
committed
parameter harmonization name
1 parent 0f7a970 commit 7768f5e

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

R/get_location_info.R

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' location (e.g.
55
#' \url{https://deims.org/location/12b38f3f-7e72-425a-80c7-7cad35ce4c7b})
66
#' provided in \href{https://deims.org/}{DEIMS-SDR catalogue}.
7-
#' @param locationid A `character`. It is the DEIMS ID of location make from
7+
#' @param location_id A `character`. It is the DEIMS ID of location make from
88
#' DEIMS-SDR website. DEIMS ID information
99
#' \href{https://deims.org/docs/deimsid.html}{here}.
1010
#' The DEIMS.iD of activity is the URL for the location page.
@@ -35,39 +35,39 @@
3535
#' @examples
3636
#' # Sampling location multipolygon
3737
#' location <- ReLTER::get_location_info(
38-
#' locationid =
38+
#' location_id =
3939
#' "https://deims.org/location/85dc6019-9654-4ba0-8338-08c4ffe8fe47",
4040
#' show_map = TRUE
4141
#' )
4242
#' location
4343
#'
4444
#' # Sampling location polygon
4545
#' location <- ReLTER::get_location_info(
46-
#' locationid =
46+
#' location_id =
4747
#' "https://deims.org/location/12b38f3f-7e72-425a-80c7-7cad35ce4c7b",
4848
#' show_map = TRUE
4949
#' )
5050
#' location
5151
#'
5252
#' # Equipment location polygon
5353
#' location <- ReLTER::get_location_info(
54-
#' locationid =
54+
#' location_id =
5555
#' "https://deims.org/locations/04de8301-b481-4ed2-89ff-2f48562e2514",
5656
#' show_map = TRUE
5757
#' )
5858
#' location
5959
#'
6060
#' # Sampling location point
6161
#' location <- ReLTER::get_location_info(
62-
#' locationid =
62+
#' location_id =
6363
#' "https://deims.org/location/ec1a58f7-1aee-4e3f-bec3-4eb1516ee905",
6464
#' show_map = TRUE
6565
#' )
6666
#' location
6767
#'
6868
#' # Sampling location point with location type null
6969
#' location <- ReLTER::get_location_info(
70-
#' locationid =
70+
#' location_id =
7171
#' "https://deims.org/location/c3db70c3-5d2c-4905-801c-7b7a5c4d00d9",
7272
#' show_map = TRUE
7373
#' )
@@ -78,9 +78,9 @@
7878
#' Project area" location}
7979
#'
8080
### function get_location_info
81-
get_location_info <- function(locationid, show_map = FALSE) {
81+
get_location_info <- function(location_id, show_map = FALSE) {
8282
qo <- queries_jq_deims[[get_deims_API_version()]]$location_info_type
83-
jj <- get_id(locationid, qo$path)
83+
jj <- get_id(location_id, qo$path)
8484
if (is.na(attr(jj, "status"))) {
8585
invisible(
8686
utils::capture.output(
@@ -101,7 +101,7 @@ get_location_info <- function(locationid, show_map = FALSE) {
101101
locationType <- types$locationType.label
102102
if (geometryType == "Point") {
103103
qo <- queries_jq_deims[[get_deims_API_version()]]$location_info_point
104-
jj <- get_id(locationid, qo$path)
104+
jj <- get_id(location_id, qo$path)
105105
location <- dplyr::as_tibble(do_Q(qo$query, jj)) %>%
106106
dplyr::mutate(
107107
locationType.label = "not declared",
@@ -113,7 +113,7 @@ get_location_info <- function(locationid, show_map = FALSE) {
113113
))
114114
} else if (geometryType == "Polygon") {
115115
qo <- queries_jq_deims[[get_deims_API_version()]]$location_info_polygon
116-
jj <- get_id(locationid, qo$path)
116+
jj <- get_id(location_id, qo$path)
117117
location <- dplyr::as_tibble(do_Q(qo$query, jj)) %>%
118118
dplyr::mutate(
119119
locationType.label = "not declared",
@@ -125,7 +125,7 @@ get_location_info <- function(locationid, show_map = FALSE) {
125125
))
126126
} else if (geometryType == "MultiPolygon") {
127127
qo <- queries_jq_deims[[get_deims_API_version()]]$location_info_multiPolygon
128-
jj <- get_id(locationid, qo$path)
128+
jj <- get_id(location_id, qo$path)
129129
location <- dplyr::as_tibble(do_Q(qo$query, jj)) %>%
130130
dplyr::mutate(
131131
locationType.label = "not declared",
@@ -140,15 +140,15 @@ get_location_info <- function(locationid, show_map = FALSE) {
140140
locationType <- types$locationType.label
141141
if (geometryType == "Point") {
142142
qo <- queries_jq_deims[[get_deims_API_version()]]$location_info_point
143-
jj <- get_id(locationid, qo$path)
143+
jj <- get_id(location_id, qo$path)
144144
location <- dplyr::as_tibble(do_Q(qo$query, jj))
145145
} else if (geometryType == "Polygon") {
146146
qo <- queries_jq_deims[[get_deims_API_version()]]$location_info_polygon
147-
jj <- get_id(locationid, qo$path)
147+
jj <- get_id(location_id, qo$path)
148148
location <- dplyr::as_tibble(do_Q(qo$query, jj))
149149
} else if (geometryType == "MultiPolygon") {
150150
qo <- queries_jq_deims[[get_deims_API_version()]]$location_info_multiPolygon
151-
jj <- get_id(locationid, qo$path)
151+
jj <- get_id(location_id, qo$path)
152152
location <- dplyr::as_tibble(do_Q(qo$query, jj))
153153
}
154154
}

0 commit comments

Comments
 (0)