Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
beansrowning committed Mar 9, 2022
2 parents fd6e2c3 + ba9ea11 commit 5d06e0b
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions R/viz_maps.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,19 @@ map_template <- function(df, category_color_labels = "None", category_color_valu
drop = F,
na.translate = T
) +
ggplot2::theme(
plot.title = ggplot2::element_text(size = 15, face = "bold", family = "Calibri"),
plot.subtitle = ggplot2::element_text(size = 10, family = "Calibri", margin = margin(0, 0, 5, 0)),
plot.caption = ggplot2::element_text(size = 8, family = "Calibri", hjust = 0),
plot.caption.position = "plot",
legend.position = c(0.01, 0.00),
legend.justification = c("left", "bottom"),
legend.box.just = "left",
legend.key.size = unit(0.5, "cm"),
legend.margin = ggplot2::margin(3, 3, 3, 3),
legend.title = ggplot2::element_text(size = 10, family = "Calibri"),
legend.text = ggplot2::element_text(size = 8, family = "Calibri")
ggplot2::theme(
plot.title = ggplot2::element_text(size = 15, face = "bold", family = "Calibri"),
plot.subtitle = ggplot2::element_text(size = 8, family = "Calibri", margin = margin(0, 0, 5, 0)),
plot.caption = ggplot2::element_text(size = 6, family = "Calibri", hjust = 0, vjust = 2),
plot.caption.position = "plot",
legend.position = c(0.01, 0),
legend.justification = c("left", "bottom"),
legend.box.just = "left",
legend.key.size = unit(0.5, "cm"),
legend.margin = ggplot2::margin(2, 2, 2, 2),
legend.title = ggplot2::element_text(size = 8, family = "Calibri"),
legend.text = ggplot2::element_text(size = 6, family = "Calibri"),
legend.background = element_rect(fill = "white", colour = "white")
)
} else {
ggplot2::ggplot(df) + # Param
Expand All @@ -73,19 +74,20 @@ map_template <- function(df, category_color_labels = "None", category_color_valu
drop = F,
labels = category_color_labels, # Param
na.translate = T
) +
) +
ggplot2::theme(
plot.title = ggplot2::element_text(size = 15, face = "bold", family = "Calibri"),
plot.subtitle = ggplot2::element_text(size = 10, family = "Calibri", margin = margin(0, 0, 5, 0)),
plot.caption = ggplot2::element_text(size = 8, family = "Calibri", hjust = 0),
plot.subtitle = ggplot2::element_text(size = 8, family = "Calibri", margin = margin(0, 0, 5, 0)),
plot.caption = ggplot2::element_text(size = 6, family = "Calibri", hjust = 0, vjust = 2),
plot.caption.position = "plot",
legend.position = c(0.01, 0.00),
legend.position = c(0.01, 0),
legend.justification = c("left", "bottom"),
legend.box.just = "left",
legend.key.size = unit(0.5, "cm"),
legend.margin = ggplot2::margin(3, 3, 3, 3),
legend.title = ggplot2::element_text(size = 10, family = "Calibri"),
legend.text = ggplot2::element_text(size = 8, family = "Calibri")
legend.margin = ggplot2::margin(2, 2, 2, 2),
legend.title = ggplot2::element_text(size = 8, family = "Calibri"),
legend.text = ggplot2::element_text(size = 6, family = "Calibri"),
legend.background = element_rect(fill = "white", colour = "white")
)
}

Expand Down Expand Up @@ -261,7 +263,8 @@ map_vaccinations <- function(df, region = "WHO Region", vac_type = c("People", "
caption = "Note:
-Countries in white do not have data reported for fully vaccinated
-Vaccine data are incomplete and data may be out of date
-People vaccinated per 100 people represents total population (all ages)"
-People vaccinated per 100 people represents total population (all ages)
-Fully vaccinated means a person has received all recommended doses in their primary series of COVID-19 vaccine"
) +
guides(fill = guide_legend(title = "People \nFully \nVaccinated \nper 100 \nPeople")) +
ggplot2::coord_sf(
Expand Down

0 comments on commit 5d06e0b

Please sign in to comment.