I have these piece of code to draw two line charts ( confirmed cases and death cases) How to show both curves in one chart with two dataframes (two ggplots)? Is it even possible or do I need to merge my two dataframes ( conf_data, dead_data ) into one data_frame ?
ggplot(conf_data, aes(x = date, y = confirmed)) +
geom_line(colour = "blue", size =1.1, aes(date, confirmed)) +
scale_y_continuous(labels = comma)
...
ggplot(dead_data, aes(x = date, y = deaths)) +
geom_line(colour = "red", size =1.1, aes(date, deaths)) +
scale_y_continuous(labels = comma)
Here is my current working example with just one chart http://webcovid19.online/