Release 0.5.2#36
Merged
Merged
Conversation
…ce_0s and .replace_nas across table functions
Previously, calling statgl_crosstable() on a data frame without a `value` column produced an opaque dplyr error about quosures. We now check up-front and stop with a message that names the missing column and lists what is available, e.g. Error: Column `value` not found in `df`. Pass `.value = <column>` to choose the cell-value column. Available columns: ... Two offline tests cover the default and explicit-typo paths. An end-to-end test on a non-PXWeb data frame (ggplot2::mpg) is deferred to the upcoming .value auto-fallback commit.
…ows, stable legend order
…r ungrouped bar/column
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 0.5.2
Bumps version 0.5.1 → 0.5.2. Substantial release — main theme is unifying
the
statgl_table()/statgl_crosstable()argument surface and givingboth first-class htmlwidget integration on par with
statgl_plot().Highlights
Tables
statgl_table()andstatgl_crosstable()now share a common stylingsurface:
.caption,.bottom_rule,.bold_rows,.digits,.hide_mobilework on both.htmlwidgetby default — opens in the RStudio Viewer,renders in knitr / Quarto, substitutes into shortcode params.
.as_html = TRUEretained as an escape hatch.statgl_crosstable()produces nested column headers for 3+ groupingvariables (instead of dash-uniting labels into one row).
.valuedefaults to auto-detect: uses avaluecolumn when present,falls back to
dplyr::n()row counts otherwise — sostatgl_crosstable(ggplot2::mpg, manufacturer)now Just Works.Plot
pyramidargument for population-pyramid layouts.highlightargument — emphasises matched series / bars in accentorange, everything else neutral grey.
legend_positionargument ("top"/"bottom"/"left"/"right"; anything else hides the legend)....now forwards tohighcharter::hchart().yvalues (skipped for pyramid input).Fetch
gender = "*",time = "*0"now workwithout explicit
px_all()..lang,.api_url,.dry_runarguments.top()exported as a short alias forpx_top().statgl_api_url()now exported.Heads-up — behavior changes
statgl_plot()'sshow_last_valuedefault flips fromTRUEtoFALSE(was noisy on grouped / bar charts)..replace_0s = TRUEinstatgl_table()now produces an en-dash;pass
.replace_0s = "[-]{}"to keep the old Quarto-shortcode output.statgl_crosstable()with a single grouping variable no longeremits the redundant spanning header row above
col.names..drop/.value/.replace_nasvalidation tightened — malformedinputs warn or error clearly instead of silently no-op'ing.
Deprecations
statgl_crosstable():.secondary→.drop(filter; warn).statgl_table():.secondary→.hide_mobile(CSS hide; warn).statgl_fetch():urlargument now errors (was warn since 0.2.0).statgl_fetch():.chunk_sizeremoved (was a non-functionalplaceholder).
statgl_crosstable():.replace_nas = TRUEdeprecated — pass.replace_nas = "."to keep prior behavior.Bug fixes
statgl_url("bexst1")now matchesstatgl_url("BEXST1")(no moremalformed search IDs from mixed-case input).
Internal
statgl_fetch(); logic extracted into single-purpose testable helpers.chunk_large_query()no longer double-POSTs the first chunk.purrrfromImports.See
NEWS.mdfor the full list.Checks
devtools::check()passesNEWS.mdupdatedDESCRIPTION