The goal of vauryou is to provide utilities, tools and shortcuts to work in our environment:
in Czech using Czech-specific formatting of numbers etc.
- see the
scale_*_cz()andlabel_*_cz()functions
in ÚV, using ÚV colours and fonts
- see
theme_vau()and set the right fonts - use
load_cols()to get the right colours from acolours.jsonfile - use the
uv_*colours from this package (directly or fromuv_cols) - fonts can be installed or copied from the
vauvaurepo, see below
in VAÚ, using VAÚ house style for charts
- see
theme_vau() - use
contrast()to easily set text in charts to contrasting colour
in Azure, helping with paths and other specifics
- export graphs via
save_png() - use config and
config.ymlto help with file paths - export data with documentation to Excel using
- exporting data to Excel with documentation using
write_nice_xlsx().
It also provides a bunch of other utilities e.g.
-
upset_join_plot()to understand observation overlap between tables you are joining -
write_nice_excel()to produce a sharing-ready excel file with documentation
Installation
You can install the development version of vauryou like so:
if(!requireNamespace("remotes")) install.packages("remotes")
remotes::install_git("git@code.gov.cz:vladni-analyticky-utvar/vauryou.git")Example
Test the theme:
ggplot(mtcars, aes(mpg, wt/mean(wt) - 1, colour = factor(vs))) +
geom_point() +
theme_vau("scatter", title_family = "Martel") +
scale_y_percent_cz(plus_sign = TRUE) +
scale_colour_manual(values = c(uv_cervena, uv_svetlemodra)) +
labs(title = "Some random numbers")
What is here and what is not
This package only contains things that work in R. More general standard tools and resources are in other repositories. Colours and a standard config
-
Tools that are either needed or could be useful in every project are available from the
templaterepository at https://code.gov.cz/vladni-analyticky-utvar/vauryou. This should be used as the template for every project; it provides:- a basic config.yml file
- a standard .Rprofile file
- a standard
uvsetup for Python - ÚV colours in a standard JSON file that can be used for storing other colours
-
Other resources are contained in
vauvau, the general resource repository- e.g. font files for direct use
- Quarto setup and brand spec
- ÚV logos
- document templates
- this should be cloned to the code/shared directory in each workspace and then accessible under
~/cloudfiles/code/shared/vauvau/ - otherwise available from https://code.gov.cz/vladni-analyticky-utvar/vauvau
You can use the following functions to copy files from these places quickly into the working directory or any other place as needed:
