ropensci / ropenaq

Compare 6319fcb ... +5 ... 48da675

Coverage Reach

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -104,20 +104,26 @@
Loading
104 104
    # if no results
105 105
    if (nrow(tableOfResults) != 0){
106 106
107 -
    tableOfResults <- tableOfResults %>%
108 -
        addCityURL() %>%
109 -
        addLocationURL() %>%
110 -
        dplyr::rename(dateUTC = .data$date.utc) %>%
111 -
        dplyr::rename(dateLocal = .data$date.local) %>%
112 -
        dplyr::mutate(dateUTC = lubridate::ymd_hms(.data$dateUTC)) %>%
113 -
        dplyr::mutate(
114 -
            dateLocal = lubridate::ymd_hms(
115 -
                strftime(
116 -
                    .data$dateLocal, "%Y-%m-%dT%H:%M:%S"))
117 -
            )
107 +
        tableOfResults <- tableOfResults %>%
108 +
            addCityURL() %>%
109 +
            addLocationURL()
110 +
111 +
        tableOfResults <- dplyr::mutate(tableOfResults,
112 +
            dateUTC = lubridate::ymd_hms(.data$date.utc),
113 +
            data.utc = NULL
114 +
        )
118 115
119 -
    names(tableOfResults) <- gsub("coordinates\\.", "", names(tableOfResults))
116 +
        if (!is.null(tableOfResults[["date.local"]])) {
117 +
            tableOfResults <- dplyr::mutate(tableOfResults,
118 +
                dateLocal = lubridate::ymd_hms(
119 +
                    strftime(
120 +
                        .data$date.local, "%Y-%m-%dT%H:%M:%S")
121 +
                    ),
122 +
                date.local = NULL
123 +
            )
124 +
        }
120 125
126 +
        names(tableOfResults) <- gsub("coordinates\\.", "", names(tableOfResults))
121 127
    }
122 128
    ####################################################
123 129
    # DONE!

@@ -392,13 +392,10 @@
Loading
392 392
  averagingPeriod <- output$results$averagingPeriod
393 393
394 394
  if(!is.null(date)){
395 -
396 -
    date <- dplyr::rename(
397 -
      date,
398 -
      date.utc = .data$utc,
399 -
      date.local = .data$local
400 -
      )
401 -
395 +
    date <- dplyr::rename(date, date.utc = .data$utc)
396 +
    if (!is.null(date[["local"]])) {
397 +
      date <- dplyr::rename(date, date.local = .data$local)
398 +
    }
402 399
  }
403 400
  if(!is.null(averagingPeriod)){
404 401
@@ -424,14 +421,14 @@
Loading
424 421
  results <- dplyr::bind_cols(results, date)
425 422
  results <- dplyr::bind_cols(results, averagingPeriod)
426 423
427 -
  results <- dplyr::tbl_df(results)
424 +
  results <- dplyr::as_tibble(results)
428 425
429 426
430 427
  # get the meta
431 -
  meta <- dplyr::tbl_df(
428 +
  meta <- dplyr::as_tibble(
432 429
    as.data.frame(output$meta))
433 430
  #get the time stamps
434 -
  timestamp <- dplyr::tbl_df(data.frame(
431 +
  timestamp <- dplyr::as_tibble(data.frame(
435 432
    queriedAt = func_date_headers(res$response_headers$date)))
436 433
437 434
  attr(results, "meta") <- meta

Learn more Showing 1 files with coverage changes found.

Changes in R/utils.R
-5
+5
Loading file...
Files Coverage
R -0.26% 92.61%
Project Totals (6 files) 92.61%
Loading