R/PlotGeoReport.R

Defines functions PlotGeoReport

Documented in PlotGeoReport

# PlotGeoReport
#' A multi-plot wrapper to convert a list of SRA 'run_ids' into
#' a geographic world-map and timeline.
#'
#' @param run_ids character, vector of SRA run_id
#' @param con      pq-connection, use SerratusConnect()
#' @return A grid-table object. Dimension standard is 800 x 600 px.
#' @keywords palmid sql geo timeline Serratus Tantalus
#'
#' @import dplyr ggplot2
#' @export
PlotGeoReport <- function(run_ids, con = SerratusConnect()) {
  geo      <- ggplotify::as.grob(PlotGeo( run_ids, con))
  timeline <- ggplotify::as.grob(PlotTimeline( run_ids, con))

  GeoTime  <- gridExtra::arrangeGrob( geo, timeline,
                           layout_matrix = rbind(c(1, 1),
                                                 c(1, 1),
                                                 c(1, 1),
                                                 c(2, 2)) )

  return(GeoTime)
}

Try the palmid package in your browser

Any scripts or data that you put into this service are public.

palmid documentation built on Oct. 15, 2021, 9:06 a.m.