ropensci / ropenaq

@@ -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
Files Coverage
R 92.61%
Project Totals (6 files) 92.61%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading