The goal of {apyramid} is to provide a quick method for visualizing census data stratified by age and one or two categorical variables (e.g. gender and health status). This is a product of the R4EPIs project; learn more at https://r4epis.netlify.app/.
You can install {apyramid} from CRAN:
install.packages("apyramid")
Click here for alternative installation options
If there is a bugfix or feature that is not yet on CRAN, you can install it via the {drat} package:
# install.packages("drat") drat::addRepo("R4EPI") install.packages("apyramid")
You can also install the in-development version from GitHub using the {remotes} package (but there's no guarantee that it will be stable):
# install.packages("remotes") remotes::install_github("R4EPI/apyramid")
The {apyramid} package was primarily designed for quick visualisation of un-aggregated linelist data in field epidemiological situations. It has one available function:
age_pyramid()
returns age pyramid visualizations of linelist, survey, or
pre-aggregated census data as a ggplot
object.library("apyramid") library("ggplot2") # load ggplot2 to control plot aesthetics library("outbreaks") # load the outbreaks package for linelist data old_theme <- theme_set(theme_classic(base_size = 18))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.