Skip to content

Commit

Permalink
documentation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oggioniale committed Oct 18, 2021
1 parent ea9d97e commit 1ec5cba
Show file tree
Hide file tree
Showing 49 changed files with 454 additions and 223 deletions.
4 changes: 4 additions & 0 deletions R/getActivity.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#' @export
#' @examples
#' activities <- getActivity(activityid = "https://deims.org/activity/8786fc6d-5d70-495c-b901-42f480182845")
#' map <- leaflet::leaflet(activities) %>%
#' leaflet::addTiles() %>%
#' leaflet::addPolygons()
#' print(map)
#' activities
#'
### function getActivity
Expand Down
4 changes: 4 additions & 0 deletions R/getDataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#' @export
#' @examples
#' tDataset <- getDataset(datasetid = "https://deims.org/dataset/38d604ef-decb-4d67-8ac3-cc843d10d3ef")
#' map <- leaflet::leaflet(tDataset) %>%
#' leaflet::addTiles() %>%
#' leaflet::addPolygons()
#' print(map)
#' tDataset
#'
### function getDataset
Expand Down
3 changes: 2 additions & 1 deletion R/getNetworkRelatedResources.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ getNetworkRelatedResources <- function(networkDEIMSID) {
relatedResourcesNetworkList <- uniteSiteRelatedResources$relatedResources
relatedResourcesNetworkDF <- dplyr::bind_rows(relatedResourcesNetworkList)
relatedResourcesNetworkDF$uri <- paste0(relatedResourcesNetworkDF$relatedResourcesId$prefix, relatedResourcesNetworkDF$relatedResourcesId$suffix)
relatedResourcesNetworkDF <- relatedResourcesNetworkDF %>% dplyr::select(relatedResourcesTitle, uri, relatedResourcesChanged)
relatedResourcesNetworkDF <- relatedResourcesNetworkDF %>%
dplyr::select(relatedResourcesTitle, uri, relatedResourcesChanged)
uniqueSiteRelatedResources <- dplyr::as_tibble(
dplyr::distinct(
relatedResourcesNetworkDF
Expand Down
12 changes: 10 additions & 2 deletions R/getSiteBoundaries.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@
#' tSiteBoundaries <- getSiteBoundaries(
#' deimsid = "https://deims.org/f30007c4-8a6e-4f11-ab87-569db54638fe"
#' )
#' mapA <- leaflet::leaflet(tSiteBoundaries) %>%
#' leaflet::addTiles() %>%
#' leaflet::addPolygons()
#' print(mapA)
#' tSiteBoundaries
#'
#' eisenwurzen <- getSiteBoundaries(
#' deimsid = "https://deims.org/d0a8da18-0881-4ebe-bccf-bc4cb4e25701"
#' )
#' mapB <- leaflet::leaflet(eisenwurzen) %>%
#' leaflet::addTiles() %>%
#' leaflet::addPolygons()
#' print(mapB)
#' eisenwurzen
#'
### function getSiteBoundaries
Expand Down Expand Up @@ -102,6 +110,8 @@ getSiteBoundaries <- function(deimsid) {
# file = paste0("sites_", gsub(" ", "_", boundaries$title), ".png"),
# append = FALSE
# )
print(map)
geoBoundaries
}
} else {
warning(
Expand All @@ -118,6 +128,4 @@ getSiteBoundaries <- function(deimsid) {
geoBoundaries <- NULL
map <- NULL
}
print(map)
geoBoundaries
}
8 changes: 6 additions & 2 deletions R/getSiteRelatedResources.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @title eLTER getSiteRelatedResources function
#' @description This function allows to obtain the list of related resources
#' collected in the eLTER site througth the DEIMS-SDR sites API.
#' collected in the eLTER site through the DEIMS-SDR sites API.
#' @param deimsid A `character`. It is the DEIMS iD of network make from
#' DEIMS-SDR website. More information about DEIMS iD in this
#' \href{https://deims.org/docs/deimsid.html}{page}.
Expand Down Expand Up @@ -53,6 +53,10 @@ getSiteRelatedResources <- function(deimsid) {
"relatedResourcesTitle",
"relatedResourcesChanged"
)
relatedResources$relatedResources[[1]]$uri <- paste0(relatedResources$relatedResources[[1]]$relatedResourcesId$prefix, relatedResources$relatedResources[[1]]$relatedResourcesId$suffix)
relatedResources$relatedResources[[1]] <- relatedResources$relatedResources[[1]] %>%
dplyr::select(relatedResourcesTitle, relatedResourcesChanged, uri)
relatedResources
} else {
relatedResourcesId <- NA
relatedResourcesTitle <- NA
Expand All @@ -64,10 +68,10 @@ getSiteRelatedResources <- function(deimsid) {
relatedResourcesChanged
)
)
relatedResources
}
} else {
message("\n---- The requested page could not be found. Please check again the DEIMS.iD ----\n")
relatedResources <- NULL
}
relatedResources
}
Loading

0 comments on commit 1ec5cba

Please sign in to comment.