opts_chunk$set(out.width="800px",out.height="400px",
    fig.width=10, fig.height=5)

National Plots, compare with http://apps.who.int/iris/bitstream/10665/136508/1/roadmapsitrep15Oct2014.pdf?ua=1

breakdown = c("Confirmed cases", "Probable cases", "Suspected cases")

ggplot(eb %>% filter(Country=="Liberia", Localite=="National", Category %in% breakdown) %>% arrange(Category), aes(x=ReportWeek,y=Value,fill=Category))+geom_bar(stat="identity")

ggplot(eb %>% filter(Country=="Sierra Leone", Localite=="National", Category %in% breakdown) %>% arrange(Category), aes(x=ReportWeek,y=Value,fill=Category))+geom_bar(stat="identity")

Plots for regions in one country

ggplot(eb %>% filter(Category=="Deaths", Country=="Sierra Leone", Localite!="National"), aes(x=Date, y=Value, group=Localite, col=Localite)) + geom_line()

or maybe

ggplot(eb %>% filter(Category %in% breakdown, Country=="Sierra Leone", Localite!="National"), aes(x=Date, y=Value, group=Localite, col=Localite)) + geom_line() + facet_wrap(~Category,ncol=1)

Time series for all countries:

ggplot(eb %>% filter(Category %in% breakdown, Localite=="National"), aes(x=Date, y=Value, group=Country, col=Country)) + geom_line() + facet_wrap(~Category,ncol=1)
main_countries = c("Guinea","Liberia","Sierra Leone")
ggplot(eb %>% filter(Country %in% main_countries,Category=="Deaths",  Localite!="National"), aes(x=Date, y=Value, group=Localite, col=Localite)) + geom_line() + facet_wrap(~Country,ncol=1)


barryrowlingson/ebola documentation built on May 11, 2019, 6:24 p.m.