Defines functions plotPeakPer

Documented in plotPeakPer

#' A Peak Percentage Plot Function
#' This function allows you to plot Peak Percentage Predictions
#' @param dat Expects a data csv in the form of a CDC fluview submission see \code{FluSight} package for a minimal submission
#' @param region Specifies the region to be plotted
#' @keywords Peak Percentage Prediction Plot
#' @export
#' @examples
#' plotPeakPer()

plotPeakPer <- function(dat, region){
  d <- subset(dat, location==region & target=="Season peak percentage" & type=="Bin")
  ggplot(data=d, aes(x=as.numeric(as.character(bin_start_incl)), y=value)) + 
    geom_point() + labs(title = "Season Peak Percentage", x="Percent", y="Prob")
nulloa/FluViz documentation built on Oct. 17, 2017, 8:20 a.m.