Description Usage Arguments Examples
View source: R/PlotAgeHeapingScores.R
asdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | PlotAgeHeapingScores(
data,
name.disaggregations,
name.age,
name.sex,
name.males,
name.females,
name.population.year1,
name.population.year2,
name.year1,
name.month1,
name.day1,
name.year2,
name.month2,
name.day2,
show.population.counts = TRUE,
name.national = NULL,
show.size.population = TRUE,
roughness.age.min = NULL,
roughness.age.max = NULL,
Whipple.age.min = NULL,
Whipple.age.max = NULL,
Whipple.digit = NULL,
Myers.age.min = NULL,
Myers.age.max = NULL,
Noumbissi.age.min = NULL,
Noumbissi.age.max = NULL,
fig.nrow.Noumbissi = 2,
fig.ncol.Noumbissi = 1,
show.thresholds.Noumbissi = TRUE,
label.subnational.level = name.disaggregations,
base.size = 12,
fig.nrow = 1,
fig.ncol = 1,
save.name.plots = NULL,
plots.dir = ""
)
|
data |
data frame that contains at least seven columns representing: (1) single-year age, (2) sex, (3, 4) population counts collected at two different time points (typically adjacent Census years) (5, 6) dates of two different time points (7) the level of subnational disaggregation in addition to sex (e.g. a geographic unit such as a province/state, a sociodemographic category such as education level, or combinations thereof). |
name.disaggregations |
Character string providing the name of the variable in 'data' that represents the levels of subnational disaggregation |
name.age |
Character string providing the name of the variable in 'data' that represents age |
name.sex |
Character string providing the name of the variable in 'data' that represents sex |
name.males |
Character string providing the name of the value of 'name.sex' variable that represents males |
name.females |
Character string providing the name of the value of 'name.sex' variable that represents females |
name.population.year1 |
Character string providing the name of the variable in 'data' that represents the population count in the earlier time period |
name.population.year2 |
Character string providing the name of the variable in 'data' that represents the population count in the later time period |
name.year1 |
Character string providing the name of the variable in 'data' that represents the year of the earlier of the two time periods (e.g. year of the earlier Census) |
name.month1 |
Character string providing the name of the variable in 'data' that represents the month of the earlier of the two time periods (e.g. month of the earlier Census) |
name.day1 |
Character string providing the name of the variable in 'data' that represents the day of the earlier of the two time periods (e.g. day of the earlier Census) |
name.year2 |
Character string providing the name of the variable in 'data' that represents the year of the later of the two time periods (e.g. year of the later Census) |
name.month2 |
Character string providing the name of the variable in 'data' that represents the month of the later of the two time periods (e.g. month of the later Census) |
name.day2 |
Character string providing the name of the variable in 'data' that represents the day of the later of the two time periods (e.g. day of the later Census) |
name.national |
A character string providing the value of 'name.disaggregations' variable that indicates national-level results (e.g. "Overall" or "National"). Defaults to NULL, implying 'name.disaggregations' variable in 'data' only includes values for subnational levels. Defaults to NULL |
show.size.population |
A logical indixating whether the size of plotted points should vary according to the total population size in the second data year. Defaults to TRUE |
label.subnational.level |
A character label for the axis showing the level of subnational disaggregation present in the data. Defaults to 'name.disaggregations' |
base.size |
A numeric fed to 'ggplot2::theme_classic(base_size)' for the plot of point estimates. Defaults to 12 |
save.name.plots |
A character specifying a custom file name for the plots saved on the local file system. Defaults to NULL, which combines 'name.disaggregations' and the current date |
plots.dir |
A character specifying the directory where plots should be saved. Defaults to "", saving the plots in the working directory |
roughness.age.min=NULL |
Equivalent to the 'ageMin' argument of 'Demotools::check_heaping_roughness'. Defaults to NULL, which then uses the 'DemoTools' default of 20 |
roughness.age.max=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_roughness'. Defaults to NULL, which then uses the 'DemoTools' default of the highest age that is a multiple of 10 |
Whipple.age.min=NULL |
Equivalent to the 'ageMin' argument of 'Demotools::check_heaping_whipple'. Defaults to NULL, which then uses the 'DemoTools' default of 25 |
Whipple.age.max=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_whipple'. Defaults to NULL, which then uses the 'DemoTools' default of 65 |
Whipple.digit=NULL |
Equivalent to the 'digit' argument of 'Demotools::check_heaping_whipple'. Defaults to NULL, which then uses the 'DemoTools' default of c(0, 5) |
Myers.age.min=NULL |
Equivalent to the 'ageMin' argument of 'Demotools::check_heaping_myers'. Defaults to NULL, which then uses the 'DemoTools' default of 10 |
Myers.age.max=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_myers'. Defaults to NULL, which then uses the 'DemoTools' default of 89 |
Noumbissi.age.min=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_noumbissi'. Defaults to NULL, which then uses the 'DemoTools' default of 20 |
Noumbissi.age.max=NULL |
Equivalent to the 'ageMax' argument of 'Demotools::check_heaping_noumbissi'. Defaults to NULL, which then uses the 'DemoTools' default of 64 |
show.population.counts=TRUE |
A logical indicated whether the population in date2 should be displayed in national plots and disaggregated plots (for Noumbissi indices). Defaults to TRUE |
fig.nrow.Noumbissi=2 |
An integer fed to 'gridExtra::arrangeGrob(nrow)' to indicate how many rows on each page should be used to display the disaggregated plots of Noumbissi indices. Defaults to 2 |
fig.ncol.Noumbissi=1 |
An integer fed to 'gridExtra::arrangeGrob(ncol)' to indicate how many columns on each page should be used to display the disaggregated plots of Noumbissi indices. Defaults to 1 |
show.thresholds.Noumbissi=TRUE |
A logical indicating whether vertical lines at index values of 0.80 and 1.20 should be superimposed on the plots of indices plots. Defaults to TRUE |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | age_heaping_plotting <- PlotAgeHeapingScores(data=ecuador_single_year_ages
name.disaggregations="province_name",
name.males="m",
name.females="f",
name.age="age",
name.sex="sex",
name.population.year1="pop1",
name.population.year2="pop2",
name.year1="year1"
name.month1="month1",
name.day1="day1",
name.year2="year2",
name.month2="month2",
name.day2="day2"
plots.dir="Plots/")
head(age_heaping_plotting)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.