miraisolutions / Covid19

Dashboard developed in r shiny to provide insight on COVID-19 pandemic, analyzing data from public, reliable sources.
https://mirai-solutions.ch/gallery/covid19
GNU General Public License v3.0
16 stars 3 forks source link

Fix plots x axis and stacked look / interactivity #33

Closed riccardoporreca closed 4 years ago

riccardoporreca commented 4 years ago

There are a few problems with the area plots by status. The most relevant ones are in bold.

The way we work around the issue with stacked log-scale by plotting the dodged cumulative sum of the data has some unwanted consequences

image

riccardoporreca commented 4 years ago

Switching to a different workaround for the stacked log-scale using geom_ribbon() fixing most of the related problems.

riccardoporreca commented 4 years ago

@fvitalini, you can go ahead in the same feature branch with fixing the x axis and the order of the statuses to "active, recovered, deaths" (bottom to top).

You can also check if the ggplotly() over the lineplots should also have an explicit tooltip argument, also given that the tooltip currently shows e.g. "Status: China"

fvitalini commented 4 years ago

tooltip fixed.

fvitalini commented 4 years ago

@riccardoporreca stacked plot issue not fixed by the right factor order when using geom_ribbon or geom_crossbar but ok when using geom_area

riccardoporreca commented 4 years ago

@riccardoporreca stacked plot issue not fixed by the right factor order when using geom_ribbon or geom_crossbar but ok when using geom_area

This was in fact not a sensible choice, since with the log plots it makes more sense to have closer to the x axis the data with smaller amounts. This logic has been now implemented