Changelog
Source:NEWS.md
pxmake (development version)
Bug fixes and minor improvements
-
px_elimination()
,px_map()
, andpx_domain()
now only sets value for STUB/HEADING variables if value is character. (#325)
pxmake 0.12.1
New features
-
px()
andpx_save()
can write and read to and from.parquet
files. - Change default value for all mandatory keywords to be descriptive rather than empty string ““. This was done because PxWin does not allow empty strings in mandatory keywords. (#320)
- Improve implementation and fix bugs in
px_cellnote()
andpx_cellnotex()
. (#289)
Bug fixes and minor improvements
- Keyword UNITS is now placed after CONTVARIABLE and VALUES in the px file. (#308)
- Add default values for mandatory keywords in all languages. (#219)
- Bugfix
px_language()
stops removing previously defined languages. (#297) - Change sorting order of px-file, so variables within keywords are in stub/heading order instead of alphabetic. (#264)
- Throw error if any value contains quotation marks (“). (#238)
- Allow minimal px object to be created even if no input is provided. (#234)
- Bugfix
px_micro()
used undefined function. (#290) - Changing figures removes previous figures variable form cells1 and cells2. (#300)
- Add validation check that CONTVARIABLE and TIMEVAL has to be STUB or HEADING variables. (#305)
- Add pxmake logo.
- Keyword MAP is now stored in variables2 instead of table2. (#295)
pxmake 0.12.0
Breaking changes
- Change argument ‘variable’ and ‘variables’ to ‘value’ in
px_stub()
,px_heading()
,px_figures()
,px_timeval()
,px_add_totals()
, to align with all other modifying functions. (#296)
New features
- Add modifying functions:
px_values()
,px_variable_label()
,px_data()
,px_source()
. (#291) - Add pkgdown version of documentation on: https://statisticsgreenland.github.io/pxmake/
- Add example data sets
population_gl
andgreenlanders
. (#282) -
px_micro()
support multilingualkeyword_values
arguments. (#306) - Add example section to most help pages.
Bug fixes and minor improvements
- Update
px_micro()
documentation. - Bugfix:
px_add_totals()
now uses default value ‘Total’ ifx$variables2$elimination
isNA
. (#284) - Add
na.rm
argument topx_add_totalts()
. -
px()
can now take an Excel workbook without a ‘Data’ sheet, without requiring that argument ‘data’ is supplied. - Remove unused functions.
- Add three vigenttes. (#277, #278, #280)
- Increase test coverage.
- Move px keywords to internal data set.
- Add link to Statstics Sweden’s documentation in help page for all px keywords.
- Add Statistics Greenland vignette.
pxmake 0.11.0
This release contains a lot of breaking changes. This was done because a few functions had name clashes with popular packages. The prefix ‘px_’ was added to almost all functions to avoid this.
Because of this massive breaking change, a few other breaking changes were made as well, to create more intuitive naming and make the package more consistent.
How to update code from before version 0.11.0
- Rename functions
- Change all modifying functions by adding the prefix
px_
. E.g. changestub()
topx_stub()
,heading()
topx_heading()
, etc. - Change
pxsave()
topx_save()
. - Change
micromake()
topx_micro()
.
- Change all modifying functions by adding the prefix
- Remove functions
- These functions have been deprecated and can no longer be used:
metamake()
,pxmake()
,make_template()
.
- These functions have been deprecated and can no longer be used:
- px-object changes
- Change
x$codelists1
andx$codelists2
tox$cells1
andx$cells2
. - Change
x$acrosscell
tox$acrosscells
. - Change
x$variables1$type
tox$variables1$variable-type
.
- Change
- Excel changes
- Change sheet ‘Codelists1’ and ‘Codelists2’ to ‘Cells1’ and ‘Cells2’.
- Change sheet ‘Acrosscell’ to ‘Acrosscells’.
- In ‘Variables1’ sheet change column ‘type’ to ‘variable-type’ .
- To set a variable as TIMEVAL add a new column ‘timeval’ in ‘Variables1’ and set it to ‘TRUE’. TIMEVAL can no longer be set with
type="TIME"
in Variables1.
Breaking changes
- Rename ‘codelists’ to ‘cells’ in px-object and Excel workbooks. (#256)
- Deprecate ‘metamake’, ‘pxmake’ and ‘make_template’. (#198)
- Change name of all modifying functions by adding the prefix ‘px_’. (#254)
- Rename ‘acrosscell’ to ‘acrosscells’. (#271)
- Rename
type
tovariable-type
in variables1. (#261) - Move TIMEVAL to its own column in variables1, instead of having it as part of
variable-type
. (#265) - Rename ‘pxsave’ to ‘px_save’. (#273)
- Rename ‘figures’ to ‘px_figures’, ‘order’ to ‘px_order’, ‘add_totals’ to ‘px_add_totals’. (#274)
- Rename ‘micromake’ to ‘px_mircro’.
New features
- Add modifying functions:
map()
,baseperiod()
,domain()
,elimination()
,descriptiondefault()
,order()
,precision()
,cellnote()
,cellnotex()
,cfprices()
,stockfa()
,variable_type()
,contvariable()
. (#246) (#125) (#223) -
micromake()
use furrr package to run in parallel. (#248) -
micromake()
removes headings if all figures are NA. (#250)
pxmake 0.10.1
New features
- Change all modifying functions to also be getters, so e.g.
stub(x)
returns current STUB variables. -
pxsave()
automatically adds values if they aren’t defined in codelists2. - Add argument
save_data
topxsave()
to supress saving of ‘Data’ sheet in Excel. (#204) - Add arugment
data_path
topxsave()
to save data table as an .rds file. (#204) - Add micromake arguments to control keywords for invidual tables. (#239)
- Add possibility for micromake to control output filenames. (#242)
- Add new modifying functions:
last_updated()
,next_update()
,language()
,languages()
,valuenote()
,valuenotex()
,contents()
,description()
,subject_area()
,subject_code()
,title()
,units()
,aggregallowed()
,autopen()
,axis_version()
,codepage()
,confidential()
,copyright()
,showdecimals()
,tableid()
,update-frequency()
,contact()
,link()
,note()
,notex()
,infofile()
.
Bug fixes and minor improvements
- Throw error if trying to remove mandatory keyword. (#208)
- Validate px after using modifying functions.
- validate_px checks that keywords in table1 and table2 are in the right table.
- Check that arguments to micromake are valid.
- Sort data before creating codelist from data frame. (#197)
- Add priority and complexity to list of unimplemented keywords.
- Add check if keywords are in correct table.
- Remove ‘micro’ prefix from filenames created by micromake().
- Use documentation functions for table1 and table2 functions, so they are and very easy to change.
- Add test coverage badge to README.md.
- Check that all defined variable-codes are in data.
- Add check that data columns are defined.
- In
micromake()
used preserve HEADING variables, and produces px files for all other variables. - Bugfix:
heading()
,stub()
andfigures()
no longer modify order of other variables. (#225) - Remove duplication in documentaiton of pivot modifying functions.
- Bugfix:
last_updated()
created wrong keyword (#233) - Remove ‘micro’ prefix from filenames created by micromake().
- Bugfix: wrong error message (#243)
- Bugfix:
last_updated()
modified wrong table. - Bugfix: Remove NA values when creating px file (#205).
- Bugfix:
px(input)
can be a path to an.rds
file.
pxmake 0.10.0
New features
- The function
px()
creates a px object. This is a major change to the way package works.pxmake
andmetamake
are soft deprecated. Usepx()
andpxsave()
instead. (#197) - To modify the px object, a number of modifying functions have been added:
charset()
,creation_date()
,decimals()
,matrix()
,stub()
,heading()
,timeval()
,add_totals()
andfigures()
. Many more need to be added in the future, to cover all px keywords.
Breaking changes
- The ‘rds’ version of the px file is completly gone. Neither
pxmake()
normetamake()
can create them. pxmake() and metamake() can convert between Excel and px files, and they return a px object invisibly.pxmake()
andmetamake()
will be deprecated in the future. -
make_template()
will be deprecated in the future -px()
automatically creates a metadata template if none is provided. -
micromake()
now takes a px object as input. -
add_totals()
now takes a px object as input.
Bug fixes and minor improvements
-
README.md
has been rewritten, and includes a list of all keywords with modifying functions. All vignettes have been removed. -
README.md
is now created fromREADME.Rmd
usingknitr::knit()
.
pxmake 0.9.1
Bug fixes and minor improvements
- Add import of pipe. (Reverses commit #d59866c)
- Add vignette about creating px file and multilingual px file.
- Fix edge case in list mergeing.
- Use latin1 to default encoding, but add CODEPAGE=utf-8.
- Set maximum column width in Excel.
- Add
create_data
argument tometamake
that can supress generation of data.
pxmake 0.9.0
New features
- Let
metamake
accept a data frame as input and create a minimal metadata template for the data.
Bug fixes and minor improvements
- Handle px-files with either zero heading variables or zero stub variables. (#95)
- Fix edge case in list sorting caused by px-files with no codes.
- Use values as codes if no code is given for add_totals variable.
pxmake 0.8.0
Breaking changes
- Split sheet ‘Table’ into two sheets by language dependency. (#65)
- Split column ‘position’ in ‘Variables’ sheet into ‘pivot’ and ‘order’. (#159)
- Check for illegal values in columns ‘pivot’ and ‘type’ in ’Variables sheet.
- Rename ‘variable’ and ‘long_name’ to ‘variable-code’ and ‘variable-label’. (#144)
- Add check for language-dependent mandatory variables in Excel metadata.
Bug fixes and minor improvements
- Rename all internal functions from ‘source_data’ to ‘data’. (#151)
- Print error message without the name of the function that threw the error.
- Sort metadata before saving.
pxmake 0.7.0
Bug fixes and minor improvements
- Validate arguments to
pxmake
andmetamake
and give helpful error messages. - Support px-files without LANGUAGES keyword. (#143)
- Remove dependencies between test and run them in parallel. (#112)
- Split tests into more files to run them faster in parallel. (#149)
- GitHub actions cancels build if a newer commit is pushed.
- Lots of documentation improvements.
pxmake 0.5.2
Bug fixes and minor improvements
- Remove need for awkward quoting in metadata with multiple languages. Previously this has to be written as
en","da","kl
, but can now been,da,kl
. - Remove VARIABLECODE for figures variables.
- Make
metamake
use value as code if code is missing. - Ignore NAs when summing in
add_totals
.
pxmake 0.5.0
Bug fixes and minor improvements
- Add formatting to Excel metadata workbook created by
metamake()
. (#100) - Add argument
rds_data_path
tometamake()
to save data as rds file. (#108) - Let
pxmake()
accept data frame as source data in addition to accepting a path. (#71) - Turn off
readLines()
warning for missing EOL character. (#113) - Rename
.figures
tofigures_
in metadata created bymetamake()
. (#104) - Allow forward slashes in variables names.
- Let
metamake()
support tables without time variables. (#120) - Use values as codes in there are no codes in metadata. (#102)
pxmake 0.4.0
New features
- Add metamake() which creates an Excel metadata workbook from a px-file. This is the inverse function of pxmake(). (#68)