View source: R/arima-spikes-onegeo.R
| line_plot | R Documentation |
line_plot: Creates a simple line plot of searches over time
line_plot(
df,
geo = "US",
beginplot = T,
endplot = T,
interrupt,
linelabel = "Interruption",
linelabelpos = 0.02,
title = NULL,
xlab = "Date",
ylab = "Query Fraction\n(Per 10 Million Searches)",
lbreak = "1 year",
ylim = NULL,
hicol = NA,
locol = NA,
nucol = NA,
opcol = NA,
colorscheme = "red",
xfmt = date_format("%b %Y"),
lwd = 0.3,
extend = F,
width = 6,
height = 3,
save = T,
outfn
)
df |
The dataframe as outputted by |
geo |
The column name of the geography of searches that you want. |
beginplot |
The date you want the plot to start. Default is beginning of the time series. |
endplot |
The date you want the plot to end. Default is end of the time series. |
interrupt |
The date of the interruption (should be the same as |
linelabel |
Label next to the vertical interruption line |
title |
The title of the figure. The default is no title. |
xlab |
The label for the x axis |
ylab |
The label for the y axis |
lbreak |
The distance between tick marks in the x axis, i.e., "one year" or "3 month" |
lwd |
Line width |
width |
Width of the plot in inches |
height |
Height of the plot in inches |
save |
Default is True. If False, the plot is not saved. |
outfn |
Where to save the plot. |
line_plot(
df,
beginplot = T,
endplot = T,
interrupt = ymd("2019-12-19")
linelabel = "Interruption",
title = NULL,
xlab = "Date",
ylab = "Query Fraction (Per 10 Million Searches)",
lbreak = "1 year",
lwd = 0.3,
width = 6,
height = 3,
save = T,
outfn = './output/panA.png'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.