To answer this question we made three graphs, each graph can be used to analyze Covid-19 cases in 34 provinces in Indonesia. These three graphs display a 7-day rolling average of the number of positive Covid-19 cases in each province. The first and second graphs are replications of the dashboard created by Financial Times link. While the third graph is the heatmap replication of the account twitter @VictimOfMaths source. These three graphs complement each other, there are advantages and disadvantages in each graph. By displaying all three hopefully, conclusions can be drawn.
NOTE: In this first graph, we map the rolling-averages of one province in one time-series line so it is easier to do comparisons between provinces. In this graph, rolling averages begin when the number of cases has reached 4 or more cases.
heatmap_daily_indo %>% group_by(province) %>%
mutate(dott_y = if_else(seq_==max(seq_),casesroll_avg,NaN)) %>%
ungroup() %>%
ggplot(aes(x=seq_ ,group=province ))+
geom_line(aes( y = casesroll_avg))+
geom_point(aes(y = dott_y),size=1)+
gghighlight(use_direct_label = FALSE,unhighlighted_params = list(size=0.4))+
scale_y_continuous(trans='log2',
breaks=c(1,10,100,200,500,1000))+
facet_wrap(~province)+
labs(subtitle = "7 days rolling average positif cases, since # of positive cases above 4",
y = "Log Rolling Avg Positif Case",
x = "Number of days from since # of positive cases above 4",
caption = paste("Code by Dio Ariadi | www.datawizart.com. Graph inspired by twitter @jburnmurdoch\nData Source: kawalCOVID19 | covid19.go.id",date_variable))+
theme(panel.background = element_rect(fill = "#f5f5f5"),
text = element_text(family = "Proxima Nova"),
panel.grid.major = element_line(colour = "#f0f0f0"),
panel.grid.minor = element_blank(),
axis.ticks = element_blank(),
strip.background = element_rect(fill = "#f5f5f5"),
plot.background = element_rect(fill = "#f5f5f5"),
strip.text.x = element_text(hjust = 0),
plot.caption = element_text(hjust = 0))