R/googletrends.R

# Generated by LaTeX DogWagger Version 4.0.5 from file <NCTLL_904.tex>
# Date: [2020-9-17 13:16:5] 
# Do NOT edit this file. Edit the LaTeX source!!

# - <Section 25> - 
#' Plot Google Trends data for searches involving the word 'coronavirus'. 
#' 
#'   Just plot the lines. 
#' 
#' @param pdf default FALSE will *not* print the PDF file
#' @keywords corona coronavirus Google Trends
#' @export 
#' @import ggplot2 
#' @examples
#' corona_trends ( ) 

corona_trends <- function ( pdf=FALSE ) 
{ PlotFilename = 'google_trends_world.pdf';
  corona_pdf(PlotFilename, 11, 7, pdf); 
  myplot <- ggplot( gt, aes(x=.data$Date, y=.data$coronavirus)) + 
    geom_line() + 
    labs(title='Google Searches', x='Date', y='Percent maximum')  
  myplot; 
  corona_print(myplot); 
  corona_pdf_off(PlotFilename, pdf); 
} 
# -END OF FILE- 

Try the corona package in your browser

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

corona documentation built on Oct. 23, 2020, 7:15 p.m.