View source: R/Standardization.R
format_data_for_plot | R Documentation |
Returns data in the appropriate format for the user-specified plot
format_data_for_plot(
data,
fy_var,
y_var,
share = FALSE,
start_fy = NA,
end_fy = NA,
color_var = "None",
facet_var = "None",
second_var = NULL,
alpha_var = NULL,
invert_bool = NULL,
labels_and_colors = NULL,
group = TRUE,
drop_missing_labels = TRUE,
add_ytextposition = FALSE,
suppress_x_var_newline = FALSE
)
data |
A data frame to format for the plot, as a tibble |
fy_var |
The fiscal year variable, as string |
y_var |
The variable to be plotted on the y-axis |
share |
If TRUE, calculates the share as a percentage |
start_fy |
Start fiscal year |
end_fy |
End fiscal Year |
color_var |
Coloration variable, as string |
facet_var |
Facet variable, as string |
second_var |
Facet variable, as string |
alpha_var |
Variable for setting the transparency of bars or line type of lines, coded to be used with year to ate. |
invert_bool |
Used to create population pyramid or import/export charts, specifies when to show data in the negative space of the y-axis. |
labels_and_colors |
A csis360 lookup data.frame with factor information |
group |
If TRUE aggregate |
drop_missing_labels |
If TRUE, drop levels to avoid residual levels from labels_and_colors. |
add_ytextposition |
If TRUE, add a ytextposition numerical position to aid in adding text to a graph |
suppress_x_var_newline |
For categorical x-axis variables, remove any new line from the character string |
Returns a tibble of formatted data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.