View source: R/arima-spike-multigeo.R
state_pct_change | R Documentation |
pct_change_state: Create a map of states based upon the percentage increase in searches before or after the interruption
state_pct_change( df, interrupt, beginperiod = NA, preperiod = NA, endperiod = NA, scaletitle = "Pct. Increase\nin Searches", scalelimits = NULL, linecol = "gray", lowcol = NA, midcol = NULL, highcol = NA, colorscheme = "red", save = T, width = 6, height = 4, bootstrap = T, outfn = "./output/fig.png", bootnum = 1000, alpha = 0.05, return_df = T )
df |
A dataframe including time as |
interrupt |
The date where things change. ARIMA will be predicted on all days before the interrupt. |
beginperiod |
How far back you want the "pre" period to go |
preperiod |
This creates a beginperiod but with a number of days instead of a date |
endperiod |
How far after the interruption you want to go |
scaletitle |
Title of the scale |
scalelimits |
vector of two values for min and max for the scale |
linecol |
Line color |
lowcol |
Color for low values |
midcol |
Color for mid values |
highcol |
Color for high values |
save |
Default is True, If False, don't save |
width |
Width of file in inches |
height |
Height of file in inches |
outfn |
Output filename |
pct_change_state( df = read.csv("./temp/data.csv", header = T, stringsAsFactor = F), interrupt = "2020-03-01", beginperiod = NA, preperiod = 90, endperiod = "2020-03-23", scaletitle = "Pct. Increase in Searches", linecol = "gray", lowcol = "red", midcol = "white", highcol = "dodgerblue4" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.