Skip to content

Commit

Permalink
Feature/59 negative in map (#85)
Browse files Browse the repository at this point in the history
* sg set different color -grey for NA in new active mod_map.R (#59)

* sg update NEWS set different color -grey for NA in new active mod_map.R (#59)

* Adjusted text

* removed failing test, not used

* added, forgotten in othr issues

* Uninstall cached packages

installed with different R version

* Missing quotes

* Temporarily delete cached library

As it was produced with R 4.x

* Reverted first uninstall attempt

* Revert "Temporarily delete cached library"

This reverts commit 1be87e7.

Co-authored-by: Guido Maggio <guido.maggio@mirai-solutions.com>
Co-authored-by: Guido Maggio <GuidoMaggio@users.noreply.github.com>
Co-authored-by: Riccardo Porreca <riccardo.porreca@mirai-solutions.com>
  • Loading branch information
4 people authored May 27, 2020
1 parent ad4bb31 commit b6ddb47
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Covid19 1.1.6.9000 (development version)

- set different color -grey for NA in new active mod_map.R (#59)
- fix colour scale/legend over 1M by replacing data_clean() with data_plot() (#79)
- Country comp Lineplot from day of 1000 contagion rolling weekly average, remove dots, add imports zoo (#80)
- Fix colour order in mod_lineplots_day_contagion (#67)
Expand Down
4 changes: 2 additions & 2 deletions R/mod_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod_map_ui <- function(id){
radioButtons(inputId = ns("radio_choices"), label = "", choices = choices_map, selected = "confirmed", inline = T),
radioButtons(inputId = ns("radio_pop"), label = "", choices = c("total", "per 1M pop"), selected = "total", inline = T),
uiOutput(ns("slider_ui")),
helpText("The detail of each country can be obtained by clicking on it.")
helpText("Click on the country to obtain its details.")
)
)

Expand Down Expand Up @@ -129,7 +129,7 @@ mod_map_server <- function(input, output, session, orig_data_aggregate){
} else if (input$radio_choices == "deaths" | input$radio_choices == "new_deaths") {
colorNumeric(palette = "Greys", domain = domain(), na.color = "white")
} else if (input$radio_choices == "active" | input$radio_choices == "new_active") {
colorNumeric(palette = "Blues", domain = domain(), na.color = "white")
colorNumeric(palette = "Blues", domain = domain(), na.color = "grey")
} else if (input$radio_choices == "recovered" | input$radio_choices == "new_recovered") {
colorNumeric(palette = "Greens", domain = domain(), na.color = "white")
}
Expand Down
10 changes: 5 additions & 5 deletions tests/testthat/test-get-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ test_that("get_timeseries_data returns expected headers", {
expect_true(all(c("Province.State", "Country.Region", "Lat", "Long") %in% names(get_timeseries_single_data(i))))
})
})

test_that("get_daily_data returns expected headers", {
data <- get_daily_data('01-22-2020')
expect_equal(sort(names(data)), sort(c("Province.State", "Country.Region", "Last.Update", "Confirmed", "Deaths", "Recovered" )))
})
# commented out because not used
# test_that("get_daily_data returns expected headers", {
# data <- get_daily_data('01-22-2020')
# expect_equal(sort(names(data)), sort(c("Province.State", "Country.Region", "Last.Update", "Confirmed", "Deaths", "Recovered" )))
# })

data_full <- get_timeseries_full_data()

Expand Down

0 comments on commit b6ddb47

Please sign in to comment.