#| label: init #| include: false knitr::opts_knit$set(root.dir = getwd()) library(rlang, include.only = "%|%") library(magrittr, include.only = c("%>%", "%<>%", "%T>%", "%!>%", "%$%"))
r pal::desc_value("Package")
#| label: pkg-desc #| results: asis #| echo: false pal::cat_lines(paste0("[, ")](https://cran.r-project.org/package=", pal::desc_value(key = "Package"), "){.pkgdown-release}"), "", pal::desc_value("Description"))
Porting all the functionality from the legacy fokus_aargau
repository to this R package and the separate
fokus_reports
Quarto project is still work in progress.
#| label: pkg-doc #| eval: !expr '!isTRUE(getOption("pal.build_readme.is_pkgdown"))' #| results: asis #| echo: false pkgsnip::md_snip(id = "pkgdown_site") %>% paste0("## Documentation\n\n", "[]", "(https://app.netlify.com/sites/fokus-rpkg-dev/deploys)\n\n", .) |> pal::cat_lines()
#| label: pkg-instl-dev #| child: !expr pkgsnip::snip_path("pkg-instl-dev-gitlab.Rmd")
#| label: pkg-usage #| eval: !expr isTRUE(getOption("pal.build_readme.is_pkgdown")) #| results: asis #| echo: false pkgsnip::md_snip(id = "pkg_usage") %>% paste0("## Usage\n\n", .) |> pal::cat_lines()
#| label: pkg-config #| child: !expr pkgsnip::snip_path("pkg-config.Rmd")
Generated survey questionnaires are automatically deployed to qstnr.fokus.ag/{ballot_date}_{canton}.{ext}
, where {ext}
is one of html
, md
, csv
or
xlsx
. The following questionnaires are available:
#| label: qstnrs #| echo: false #| results: "asis" fokus::all_ballot_dates |> purrr::map_chr(\(ballot_date) { fokus::cantons(ballot_date = ballot_date) |> purrr::map_chr(\(canton) { url_start <- glue::glue(fokus:::url_qstnr[[canton]], "/{ballot_date}_{canton}") glue::glue("- {ballot_date} {stringr::str_to_title(canton)}: ", "[{fontawesome::fa(name = 'fab fa-html5')}]({url_start}.html) | ", "[{fontawesome::fa(name = 'fab fa-markdown')}]({url_start}.md) | ", "[{fontawesome::fa(name = 'fas fa-file-csv')}]({url_start}.csv) | ", "[{fontawesome::fa(name = 'fas fa-file-excel')}]({url_start}.xlsx)") }) |> paste0(collapse = "\n") }) |> paste0(collapse = "\n") |> cat()
#| label: fokus-private-desc #| child: "data-raw/snippets/fokus_private_description.Rmd"
#| label: fokus-private-schema #| echo: false #| results: "asis" fokus:::print_private_repo_structure()
#| label: pkgpurl #| child: !expr pkgsnip::snip_path("pkgpurl.Rmd")
#| label: pkg-code-style #| child: !expr pkgsnip::snip_path("pkg-code-style.Rmd")
The abbreviations used to name things (function and parameter names etc.) in this package include:
#| label: abbrs #| echo: false fokus:::abbrs() |> # flatten list col to comma-separted char col in order to avoid weird whitespacing before (some) commas (apparently `pal::pipe_table()` has flaws) dplyr::mutate(full_expressions = purrr::map_chr(full_expressions, \(x) cli::ansi_collapse(x = x, sep2 = ", ", last = ", "))) |> dplyr::rename("Full expression(s)" = full_expressions, "Abbreviation" = abbreviation) |> pal::pipe_table()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.