4
4
# ' location (e.g.
5
5
# ' \url{https://deims.org/location/12b38f3f-7e72-425a-80c7-7cad35ce4c7b})
6
6
# ' 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
8
8
# ' DEIMS-SDR website. DEIMS ID information
9
9
# ' \href{https://deims.org/docs/deimsid.html}{here}.
10
10
# ' The DEIMS.iD of activity is the URL for the location page.
35
35
# ' @examples
36
36
# ' # Sampling location multipolygon
37
37
# ' location <- ReLTER::get_location_info(
38
- # ' locationid =
38
+ # ' location_id =
39
39
# ' "https://deims.org/location/85dc6019-9654-4ba0-8338-08c4ffe8fe47",
40
40
# ' show_map = TRUE
41
41
# ' )
42
42
# ' location
43
43
# '
44
44
# ' # Sampling location polygon
45
45
# ' location <- ReLTER::get_location_info(
46
- # ' locationid =
46
+ # ' location_id =
47
47
# ' "https://deims.org/location/12b38f3f-7e72-425a-80c7-7cad35ce4c7b",
48
48
# ' show_map = TRUE
49
49
# ' )
50
50
# ' location
51
51
# '
52
52
# ' # Equipment location polygon
53
53
# ' location <- ReLTER::get_location_info(
54
- # ' locationid =
54
+ # ' location_id =
55
55
# ' "https://deims.org/locations/04de8301-b481-4ed2-89ff-2f48562e2514",
56
56
# ' show_map = TRUE
57
57
# ' )
58
58
# ' location
59
59
# '
60
60
# ' # Sampling location point
61
61
# ' location <- ReLTER::get_location_info(
62
- # ' locationid =
62
+ # ' location_id =
63
63
# ' "https://deims.org/location/ec1a58f7-1aee-4e3f-bec3-4eb1516ee905",
64
64
# ' show_map = TRUE
65
65
# ' )
66
66
# ' location
67
67
# '
68
68
# ' # Sampling location point with location type null
69
69
# ' location <- ReLTER::get_location_info(
70
- # ' locationid =
70
+ # ' location_id =
71
71
# ' "https://deims.org/location/c3db70c3-5d2c-4905-801c-7b7a5c4d00d9",
72
72
# ' show_map = TRUE
73
73
# ' )
78
78
# ' Project area" location}
79
79
# '
80
80
# ## function get_location_info
81
- get_location_info <- function (locationid , show_map = FALSE ) {
81
+ get_location_info <- function (location_id , show_map = FALSE ) {
82
82
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 )
84
84
if (is.na(attr(jj , " status" ))) {
85
85
invisible (
86
86
utils :: capture.output(
@@ -101,7 +101,7 @@ get_location_info <- function(locationid, show_map = FALSE) {
101
101
locationType <- types $ locationType.label
102
102
if (geometryType == " Point" ) {
103
103
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 )
105
105
location <- dplyr :: as_tibble(do_Q(qo $ query , jj )) %> %
106
106
dplyr :: mutate(
107
107
locationType.label = " not declared" ,
@@ -113,7 +113,7 @@ get_location_info <- function(locationid, show_map = FALSE) {
113
113
))
114
114
} else if (geometryType == " Polygon" ) {
115
115
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 )
117
117
location <- dplyr :: as_tibble(do_Q(qo $ query , jj )) %> %
118
118
dplyr :: mutate(
119
119
locationType.label = " not declared" ,
@@ -125,7 +125,7 @@ get_location_info <- function(locationid, show_map = FALSE) {
125
125
))
126
126
} else if (geometryType == " MultiPolygon" ) {
127
127
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 )
129
129
location <- dplyr :: as_tibble(do_Q(qo $ query , jj )) %> %
130
130
dplyr :: mutate(
131
131
locationType.label = " not declared" ,
@@ -140,15 +140,15 @@ get_location_info <- function(locationid, show_map = FALSE) {
140
140
locationType <- types $ locationType.label
141
141
if (geometryType == " Point" ) {
142
142
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 )
144
144
location <- dplyr :: as_tibble(do_Q(qo $ query , jj ))
145
145
} else if (geometryType == " Polygon" ) {
146
146
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 )
148
148
location <- dplyr :: as_tibble(do_Q(qo $ query , jj ))
149
149
} else if (geometryType == " MultiPolygon" ) {
150
150
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 )
152
152
location <- dplyr :: as_tibble(do_Q(qo $ query , jj ))
153
153
}
154
154
}
0 commit comments