Description Usage Arguments Value Examples
View source: R/afcov_heatmap.r
*in progress to show cases or deaths Initial ggplot code copied from https://github.com/VictimOfMaths/COVID-19/blob/master/Heatmaps/English%20LA%20Heatmaps.R
1 2 3 4 5 6 7 8 9 10 11 12 13 | afcov_heatmap(
country,
attribute = "CONTAMINES",
areanames = "namesgeob",
dates = "all",
language = "en",
legend.position = "top",
palette = "YlGnBu",
timeinterval = NULL,
date_legend = c("2020-04", "2020-05", "2020-06", "2020-07", "2020-08", "2020-09",
"2020-10", "2020-11", "2020-12", "2021-01", "2021-02", "2021-03", "2021-04",
"2021-05")
)
|
country |
a character vector of country names or iso3c character codes. |
attribute |
attribute to plot, from dfhera |
areanames |
name of column containing the area names ('namesgeob' added to match geoboundaries, 'REGION' is in raw data ) |
dates |
either 'all', 'last' or c(start,end) in format "2021-01-31" |
language |
'which admin level to return'en' or 'fr' for country name |
legend.position |
default "top", options "left","right","bottom" |
palette |
RColorBrewer palette options default="YlGnBu" |
timeinterval |
optional interval to sum over, options e.g. "5 days" "week" "month" |
date_legend |
axis breaks to appear in plots |
ggplot
1 2 3 | afcov_heatmap('Mali')
afcov_heatmap('senegal', dates=c("2021-01-01","2021-04-01"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.