x <- "https://deims.org/dataset/36b505da-ad12-42ad-a661-242b8fec2078"
a <- ReLTER::get_dataset_info(x) %>%
dplyr::select(
dateRange.from
)
View(a)
datasets_resources <- related_resources %>%
dplyr::filter(type == "dataset")
datasets_info <- purrr::map_dfr(
as.list(
datasets_resources$uri[1:10]
),
function (x) {
ReLTER::get_dataset_info(x) %>%
dplyr::mutate(
ID = x,
title = title,
from = .[[6]],
to = .[[7]],
siteTitle = relatedSite[[1]]$title,
siteID = paste0(relatedSite[[1]]$id$prefix, relatedSite[[1]]$id$suffix),
DOI = doi,
geometry = boundaries
)
}
) %>%
dplyr::select(
ID, title, from, to, siteTitle, siteID, DOI, geometry
)
## Warning in if (!is.na(dataset$observationParameters)) {: the condition has
## length > 1 and only the first element will be used
## Warning in if (!is.na(dataset$observationSpecies)) {: the condition has length >
## 1 and only the first element will be used
## Warning in if (is.na(dataset$boundaries)) {: the condition has length > 1 and
## only the first element will be used
## Warning in if (sf::st_geometry_type(geoDataset) == "POINT") {: the condition has
## length > 1 and only the first element will be used
## Warning in if (sf::st_geometry_type(geoDataset) == "POLYGON") {: the condition
## has length > 1 and only the first element will be used
## Warning in if (!is.na(dataset$observationParameters)) {: the condition has
## length > 1 and only the first element will be used
## Warning in if (!is.na(dataset$observationSpecies)) {: the condition has length >
## 1 and only the first element will be used
## Warning in if (is.na(dataset$boundaries)) {: the condition has length > 1 and
## only the first element will be used
## Warning in if (sf::st_geometry_type(geoDataset) == "POINT") {: the condition has
## length > 1 and only the first element will be used
## Warning in if (sf::st_geometry_type(geoDataset) == "POLYGON") {: the condition
## has length > 1 and only the first element will be used
## Warning in if (!is.na(dataset$observationParameters)) {: the condition has
## length > 1 and only the first element will be used
## Warning in if (!is.na(dataset$observationSpecies)) {: the condition has length >
## 1 and only the first element will be used
## Warning in if (is.na(dataset$boundaries)) {: the condition has length > 1 and
## only the first element will be used
## Warning in if (sf::st_geometry_type(geoDataset) == "POINT") {: the condition has
## length > 1 and only the first element will be used
## Warning in if (sf::st_geometry_type(geoDataset) == "POLYGON") {: the condition
## has length > 1 and only the first element will be used
## Warning in if (!is.na(dataset$observationParameters)) {: the condition has
## length > 1 and only the first element will be used
## Warning in if (!is.na(dataset$observationSpecies)) {: the condition has length >
## 1 and only the first element will be used
## Warning in if (is.na(dataset$boundaries)) {: the condition has length > 1 and
## only the first element will be used
## Warning in if (sf::st_geometry_type(geoDataset) == "POINT") {: the condition has
## length > 1 and only the first element will be used
## Warning in if (sf::st_geometry_type(geoDataset) == "POLYGON") {: the condition
## has length > 1 and only the first element will be used
datasets_x_site <- datasets_info