Skip to content

Commit

Permalink
adding interactive.display flag to itrends() fn
Browse files Browse the repository at this point in the history
  • Loading branch information
mponce0 committed May 15, 2020
1 parent 497061b commit 3cca95f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
May 2020: XXXX _ ver 1.1.1
- covid19.Toronto.data(): can return original data as reported by the city in google-docs in a list format
- covid19.Toronto.data(): improved reading of Toronto data to protect possible variations in the reported data
- added new argument 'interactive.display' for functions that generate interactive figures, eg. live.map(), totals.plt(), plt.SIR.model(); for turning on/off the display of the figure
- added new argument 'interactive.display' for functions that generate interactive figures, eg. live.map(), totals.plt(), plt.SIR.model(), itrends(); for turning on/off the display of the figure


May 2020: Several new features _ ver 1.1
Expand Down
5 changes: 3 additions & 2 deletions R/covid19_trends.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@

##################################################################################

itrends <- function(ts.data=NULL, geo.loc=NULL, with.totals=FALSE, fileName=NULL) {
itrends <- function(ts.data=NULL, geo.loc=NULL, with.totals=FALSE, fileName=NULL, interactive.display=TRUE) {
#' function to visualize trends in daily changes in time series data interactively
#'
#' @param ts.data time series dataset to process
#' @param geo.loc geographical location, country/region or province/state to restrict the analysis to
#' @param with.totals a boolean flag to indicate whether the global totals should be displayed with the records for the specific location
#' @param fileName file where to save the HTML version of the interactive figure
#' @param interactive.display boolean flag to indicate whether the interactive plot will be displayed (pushed) to your browser
#'
#' @export
#'
Expand Down Expand Up @@ -227,7 +228,7 @@ itrends <- function(ts.data=NULL, geo.loc=NULL, with.totals=FALSE, fileName=NULL
htmlwidgets::saveWidget(as_widget(trends.ifig), FileName)
}

print(trends.ifig)
if (interactive.display) print(trends.ifig)
}


Expand Down

0 comments on commit 3cca95f

Please sign in to comment.