|
|
|
@ -140,7 +140,7 @@ server <- function(input, output) { |
|
|
|
databaseID <- "IFS" |
|
|
|
startdate = min(new.data()$report_date) |
|
|
|
enddate = max(new.data()$report_date) |
|
|
|
country = countries[countries$Country == input$country, ]$Alpha.2.code |
|
|
|
country = countries[countries$Country == input$country,]$Alpha.2.code |
|
|
|
withProgress(message = "Extracting data from IMF", |
|
|
|
detail = "Hope their server is up!", |
|
|
|
value = 0, |
|
|
|
@ -210,7 +210,7 @@ server <- function(input, output) { |
|
|
|
# removing rows with no macroeconomic data |
|
|
|
dataset_eco <- |
|
|
|
dataset_with_eco[!is.na(dataset_with_eco$gdp_lag) & |
|
|
|
!is.na(dataset_with_eco$prices_lag),] |
|
|
|
!is.na(dataset_with_eco$prices_lag), ] |
|
|
|
setProgress(value = 2, message = "working..") |
|
|
|
}) |
|
|
|
|
|
|
|
@ -325,8 +325,7 @@ server <- function(input, output) { |
|
|
|
|
|
|
|
# Model Selection. Using functions. In production these are to be converted to APIs |
|
|
|
selected_model <- reactive({ |
|
|
|
req(input$start_model_selection, |
|
|
|
!is.null(dataset_with_eco())) |
|
|
|
req(input$start_model_selection,!is.null(dataset_with_eco())) |
|
|
|
model_sel(dff = dataset_with_eco()) |
|
|
|
}) |
|
|
|
|
|
|
|
@ -646,7 +645,7 @@ server <- function(input, output) { |
|
|
|
}) |
|
|
|
|
|
|
|
output$cumprob <- renderText({ |
|
|
|
req(!is.null(input$sim_res_sel),!is.null(simresdata())) |
|
|
|
req(!is.null(input$sim_res_sel), !is.null(simresdata())) |
|
|
|
hist.pro <- simresdata() |
|
|
|
pro_dens <- data.frame(hist.pro$x, hist.pro$y) |
|
|
|
res <- brushedPoints(pro_dens, input$sim_res_sel) |
|
|
|
|