plot_dists | R Documentation |
This function prepares a quick plot comparing subnational nutrient intake distributions. It is provided a dataframe generated from the get_dists() function.
plot_dists(dists)
dists |
A data frame of nutrient distributions |
A plot
# A one nutrient example
dists_usa_iron <- get_dists(isos="USA", nutrients="Iron")
plot_dists(dists_usa_iron)
# A two nutrient example
dists_usa_iron_vitB <- get_dists(isos="USA", nutrients=c("Iron", "Vitamin B12"))
plot_dists(dists_usa_iron_vitB)
# A two nutrient-two country example
dists_usa_bgd_iron_vitB <- get_dists(isos=c("USA", "BGD"), nutrients=c("Iron", "Vitamin B12"))
plot_dists(dists_usa_bgd_iron_vitB)
# A whole countries data
dists_bfa <- get_dists(isos=c("BFA"))
plot_dists(dists_bfa)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.