Skip to content

Releases: scholaempirica/reschola

reschola 0.5.6

31 May 20:08
bdf61d6
Compare
Choose a tag to compare

This release fixes a minor regression in schola_barplot() introduced by {ggplot2} 3.5.0+ and provides compatibility for older LimeSurvey installations.

Bugfixes

  • Legend keys in schola_barplot() are drawn for all response categories even if not present in the data by default. See the blogpost and the schola_barplot()'s show.legend argument documentation for more details.
  • ls_login() now works with older LimeSurvey versions (@petrbouchal, #103).

reschola 0.5.5

21 Jan 12:44
273010e
Compare
Choose a tag to compare

Bugfixes

  • attributes translation fixed

reschola 0.5.3

05 Feb 17:07
6b01217
Compare
Choose a tag to compare

Breaking changes

  • standard PDF .tex template was fixed and updated (with the default .Rmd skeleton), this may break projects using the default template
    • provides citaions using biblatex with a standard APA (v7) style
    • more control on logos (different main and client logos in the titlepage and in running header), new header logos height (11pt)

Changes

  • schola_barplot() puts the legend to the bottom by default now
  • theme_schola() now adds 1pt left and bottom margins, so the text is not cut
  • question label cleaning keeps right inner ] untouched
  • schola_barplot() gains a new argument fill_cols, so you can override the default palette (RColorBrewer::brewer.pal(5, "RdYlBu") , which is suitable only for 5point scales)
  • schola_barplot() now understands escape_level = FALSE in which case the grey color is not used as they are no escape level or category to mark
  • schola_barplot() now ignores NAs in a "pairwise" manner, without completely discarding the compromised row. Turn this behavior off with drop_na = FALSE.
  • schola_barplot() gains a new argument drop. When FALSE (the default), the levels that are actually not in the data are presented in the legend anyway.
  • default top margin of the theme_schola() plot enlarged from 1.5 pt to 4 pt to "include" Czech accents like in capital Ř
  • by default, theme_schola() now dictates that the title, subtitle, and caption is rendered via ggtext::element_textbox_simple() - this provides automatic wrapping to the actual with of the viewport (NOTE: under R 4.2.0, you need gridtext of version > 0.1.4, or the text will be ill-rendered; see this PR), the caption will be in condensed typeface and in grey
  • theme_schola() puts 6 pt bottom-margins on title and subtitle
  • in schola_barplot() item (facet) label text is slightly bigger, default wrap-width is wider (this does not support auto-wrapping due to some bugs in ggplot2)
  • schola_labeller() understands width = NULL

Bugfixes

  • over-plotting of text-based geoms is fixed in plot_lollipop()
  • group argument is now respected in the whole schola_barplot()
  • typo in the default font name fixed
  • absent logos paths should not result in render fail, but in missing logos
  • ls_get_attrs() no longer fails (even if unexpected output is returned by LS)

reschola 0.5.2

02 May 17:38
Compare
Choose a tag to compare

Changes

  • package logo slightly updated
  • recover_labs() has relaxed assumptions about old and new dataframes column names and number of columns. From now on, only a warning is issued.
  • fct_nanify() will not abort when the factor to NAnify is not present in the data and will return the original input with a warning
  • user .Rprofile is now sourced in project's .Rprofile, so you may still use functions or values defined in the user-scoped version

New features

  • extract_schola_barplot_info() for easy access to a data underlying schola_barplot() output

Bugfixes

  • fct_nanify() no longer fails when there are NAs in the match vector
  • czech_date_interval() is hopefully finally fixed...

reschola 0.5.1 (Welcome, Ubuntu)

16 Mar 10:42
Compare
Choose a tag to compare

This is a minor patch solving the following two issues:

Bugfixes

  • fct_nanify() no longer warns about level order each time it is called
  • recover_labs() does not check the number of rows of dataframes (too restrictive & not intended originally)

reschola 0.5.0 (Welcome, Ubuntu)

13 Mar 12:10
Compare
Choose a tag to compare

This release is focused on the new SCHOLA EMPIRICA visual style and replaces Roboto with Ubuntu font. It also adds wrappers for creating the Schola-styled lollipop and barplot plots to be used in our reports. These come with a bunch of utils, such as custom labeller which is useful for labeling plots' facets, tightly tied with dict_from_data() that you'll use for extracting labeling specifications from the labels that come from LimeSurvey via our API. In case of labels being stripped from the dataframe, the new recover_labs() function may be handy. As usual many bugs were fixed and a few utils functions were added. Take a look:

Changes

  • {reschola} now adheres to SCHOLA EMPIRICA visual style by adopting Ubuntu and Ubuntu Condensed fonts
  • gd_download_folder() now overwrites existing content by default
  • all files created at project start-up are now committed in the initial "Repo set-up" commit
  • Google Drive URL saved in .Rprofile at project set-up is now automatically trimmed and all queries that might boggle {googledrive} are removed
  • fct_nanify() now matches using a regular expression, friendly message displaying only once per session
  • Google Drive URL inside share.R is removed for future projects, as it is now governed by a feature introduced in {reschola} 0.4.0

New features

  • schola_barplot() for Likert-type items, displaying grouped data per variable for straightforward comparison
  • prepare_lollipop_data() and plot_lollipop() for creating lollipop plots
  • dict_from_data() extracts named character vector of item code-label pairs
  • schola_labeller() is a labeller for {ggplot2} facets that utilizes item labels, with wrapping
  • with_clr() creates text with color as a span HTML tag, especially useful shortcut when you use ggtext::geom_richtext() or ggtext::element_markdown() richtext
  • build_all.R script now comes with a few lines that'll process all scripts inside data directory
  • new utils functions:
    • recover_labs() for recovering lost variable labels (such as those coming from ls_*() export functions); with infix operator available: %labs_from%
    • get_labs_df() for quick labels check (the most user-friendly is to use View() in RStudio, though)
    • remove_empty_at() to drop observations that are completely empty at specified variables; note tidyr::drop_na() have a similar usage, but it drops rows containing any missing values, not those with all missings

Bugfixes

  • cropping of PDF figures was silently in charge for users with working pdfcrop and ghostscript. It is now off by default.
  • project set-up error claiming directories does not exist fixed
  • theme_schola() now uses 1.5pt top margin, so diacritics of certain letters doesn't get cut.
  • clean_labels = FALSE in ls_responses() (and fellows) does not fail anymore
  • czech_date_interval() now returns correct class (should have always been czech_date_interval not character; furthemore, if start and end dates were identical, it even returned POSIXct/POSIXt, which produced hard-to-debug issues when used inside {dplyr}'s summarise)
  • fixed missing attributes were not recognized in ls_*() functions (those are coded NA in recent LimeSurvey); more verbose info

Documentation

  • gd_get_proj() now provides instruction for those who want to use the feature but created their {reschola} project before version 0.4.0

reschola 0.4.0 (New Beginnings)

14 Dec 17:18
Compare
Choose a tag to compare

In this release, we have changed a standard project structure to be more organised keeping in mind not to clutter the project's root directory with too many files. Next, font installation and usage backend was completely revamped and should now work straight out of the box on any machine – without any dependencies needed. Last, but not least, our default {ggplot2} theme has been report-first tailored and cropping utilities are not needed anymore. And as usual, many bugs were fixed.

Breaking changes

  • default project structure changes and cleanup
  • schola project options cleanup
  • new font installation and registration routines for Windows, see install_reschola_fonts() and register_reschola_fonts()
  • updated theme_schola()
    • no margins by default (argument margin supersedes margin_side and margin_bottom)
    • axis titles on by default (+ axis.title renamed to axis_title)
  • figure cropping with ghostscript and pdfcrop is defunct, so those are no longer needed (see above)
  • new Google Drive handling -- URL is set in .Rprofile as a hidden object that can be accessed by gd_get_proj()

Changes

  • current logos added
  • new draft_pdf()
  • startup message
  • project setup exceptions better handled
  • set_reschola_ggplot_fonts() without dependencies and more customisable (although changes are not recommended); new geoms covered
  • new fct_nanify() for recoding a factor level to NA
  • new functions for quick RDS data manipulation:
    • get_input_data()
    • get_intermediate_data()
    • get_processed_data()
    • write_input_data()
    • write_intermediate_data()
    • write_processed_data()
  • new function gd_upload_file() for quick file uploads
  • gd_download_folder() now uses project's Google Drive URL stored in .Rprofile as folder_url argument by default

Bugfixes

  • ls_participants() runs properly when there are no attributes to translate and translate_attrs = TRUE

Documentation

  • {pkgdown} online documentation leverages Bootstrap 5
  • info about babel TeX package hyphenation warning mitigation in schola_pdf() (using tinytex::tlmgr_install("hyphen-czech"))
  • ?theme_schola enumerates ... arguments that theme() understands

reschola 0.3.3 (Save the Fonts)

10 Oct 20:44
Compare
Choose a tag to compare

Breaking changes

  • redoc reversible Word format is now completely removed from the package; from now on, use schola_pdf() primarily (schola_word() is still available)

Changes

  • PDF template now handles footnotes better
  • czech_date_interval() now raises an error when you try to supply more than one entry
  • ls_call() gives an error when you try to provide another sSessionKey in params
  • ls_call() passes error message to the user when there is one
  • ls_call() replaces NULLs with NAs (thus more API responses can be turned into a tibble)
  • ls_call() messaging is less disruptive
  • the documentation is more verbose on some topics
  • fonts registration is now more verbose and import_fonts() checks that everything went well; solutions are provided otherwise

New features

  • ls_responses() (and thus ls_export()) strips out the tibble-wide variable.labels attribute and spreads it among the individual variables, which enables you to modify the tibble without messing the labels positions and/or producing length incompatibilities
  • ls_export() gains new argument clean_labels which by default cleans up repeating parts of labels of subquestions (i.e., those outside square brackets)
  • new function ls_set_participant_properties() enabling you to set or edit participant table
  • new function copy_schola_template() which copies the template (pdf by default) into the active project directory

Bug fixes

  • czech_date_interval() now correctly suppresses redundant information
  • you are now informed about a solution when font registration fails, this concerns a bug in recent version of Rttf2pt1 utility that the process rely on

Full Changelog: v0.3.2...v0.3.3

reschola 0.3.2

03 Jun 12:55
Compare
Choose a tag to compare

reschola 0.3.1

26 May 16:17
Compare
Choose a tag to compare

A minor patch.