зеркало из https://github.com/Azure/covid19model.git
fix merge
This commit is contained in:
Коммит
7355752370
2
base.r
2
base.r
|
@ -271,5 +271,3 @@ verify_result <- system(paste0("Rscript web-verify-output.r ", filename,'.Rdata'
|
|||
if(verify_result != 0){
|
||||
stop("Verification of web output failed!")
|
||||
}
|
||||
system("Rscript web-fix-fonts.r")
|
||||
|
||||
|
|
|
@ -41,7 +41,9 @@ x_lim[2] <- x_lim[2] + 0.05 * x_range
|
|||
layer_vertical_line <- if (0 > x_lim[1] && 0 < x_lim[2]) {
|
||||
vline_0(color = "gray90", size = 0.5)
|
||||
} else {
|
||||
geom_ignore()
|
||||
geom_blank(
|
||||
mapping = NULL, data = NULL,
|
||||
show.legend = FALSE, inherit.aes = FALSE)
|
||||
}
|
||||
args_outer <- list(mapping = aes_(x = ~ll, xend = ~hh, y = ~parameter,
|
||||
yend = ~parameter)) #, color = bayesplot::get_color("mid"))
|
||||
|
|
|
@ -47,7 +47,11 @@ make_three_pannel_plot <- function(){
|
|||
|
||||
all_data <- data.frame()
|
||||
intervention_data <- data.frame()
|
||||
<<<<<<< HEAD
|
||||
for(i in 1:14){
|
||||
=======
|
||||
for(i in 1:length(countries)){
|
||||
>>>>>>> eaef0e1a56c534abf7e89b8ca7aa6c21841b9f57
|
||||
print(i)
|
||||
N <- length(dates[[i]])
|
||||
country <- countries[[i]]
|
||||
|
|
|
@ -22,7 +22,7 @@ make_forecast_plot <- function(){
|
|||
|
||||
load(paste0("results/", filename))
|
||||
|
||||
for(i in 1:14){
|
||||
for(i in 1:length(countries)){
|
||||
N <- length(dates[[i]])
|
||||
N2 <- N + 7
|
||||
country <- countries[[i]]
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
system("Rscript data/fetch-ecdc.r")
|
||||
system("Rscript base.r base")
|
|
@ -1,10 +0,0 @@
|
|||
filenames <- list.files("web/figures/", recursive = TRUE, full.names=TRUE)
|
||||
|
||||
for( f in filenames ){
|
||||
|
||||
x <- readLines(f)
|
||||
y <- gsub( "Aerial", "Arial, Helvetica, sans-serif", x )
|
||||
y <- gsub( "Arimo", "Arial, Helvetica, sans-serif", x )
|
||||
cat(y, file=f, sep="\n")
|
||||
|
||||
}
|
|
@ -16,6 +16,14 @@ countries <- c(
|
|||
"Portugal",
|
||||
"Netherlands"
|
||||
)
|
||||
|
||||
web_fix_fonts <- function(path){
|
||||
x <- readLines(path)
|
||||
y <- gsub( "Aerial", "Arial, Helvetica, sans-serif", x )
|
||||
y <- gsub( "Arimo", "Arial, Helvetica, sans-serif", y )
|
||||
cat(y, file=path, sep="\n")
|
||||
}
|
||||
|
||||
verify_web_output <- function(){
|
||||
plot_names <- c("deaths", "forecast", "infections", "rt")
|
||||
plot_versions <- c("mobile", "desktop")
|
||||
|
@ -34,6 +42,9 @@ verify_web_output <- function(){
|
|||
if (! file.exists(path)) {
|
||||
stop(sprintf("Missing web output during verification: %s", path))
|
||||
}
|
||||
|
||||
# Fix wrong fonts
|
||||
web_fix_fonts(path)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +54,10 @@ verify_web_output <- function(){
|
|||
date_results[[country]] = latest_date
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Fix fonts for covariate change estimates
|
||||
web_fix_fonts("web/figures/desktop/covars-alpha-reduction.svg")
|
||||
web_fix_fonts("web/figures/mobile/covars-alpha-reduction.svg")
|
||||
|
||||
dir.create("web/data/", showWarnings = FALSE, recursive = TRUE)
|
||||
write_json(date_results, "web/data/latest-updates.json", auto_unbox=TRUE)
|
||||
|
|
Загрузка…
Ссылка в новой задаче