Changelog
Source:NEWS.md
susometa 0.4.1
- Ensure that survey object extraction functions always return the same core columns. Previously, functions extracted data for the JSON keys that were present in the JSON fil. Now, functions create a column even for keys that are not present.
- Add overlooked question attributes:
- For single-select questions:
show_as_list_thresholdandcascade_from_question_id - For list questions,
max_answer_count
- For single-select questions:
susometa 0.4.0
Breaking changes
- Workflow changes. In previous versions, the workflow was two-step: first, parse the questionnaire JSON file into a data frame; then, extract target content from that questionnaire data frame. Now, the workflow is a single step: extract the target content from the JSON.
-
API changes. In line with the workflow changes, the argument
qnr_df, the questionnaire data frame, has now been changed tojson_path, the path to the questionnaire JSON.
Improvements
- Use a faster engine to parse JSON. In particular, move from
tidyjsontojqr, a wrapper aroundjq, a library for filtering and mutating JSON data. - Add functions to extract new content from the questionnaire JSON:
- Static texts:
get_static_texts() - Macros:
get_macros() - Categories:
get_categories() - Translations:
get_translations() - Attachments:
get_attachments() - Lookup tables:
get_lookup_tables() - Critical rules:
get_critical_rules() - Questionnaire-level metadata:
get_qnr_metadata()
- Static texts:
susometa 0.3.2
- Revert check that
varnameparameter inget_answer_optionsis a bare name, since not working correctly when called by other functions. - Add variable type attributes extracted for computed varaibles.
- Add variable type attributes to those exported
- Correct labels for variable types (e.g., Boolean, string, etc.)
- Apply labels to variable type
susometa 0.3.1
Export get_validations(), a critical step somehow overlooked in the last release.
susometa 0.3.0
- Add
get_validations()to return a data frame of validations and the objects to which they are associated. - Add fixed roster titles to the questionnaire attributes extracted by
parse_questionnaire() - Add fixed roster titles and values to the return value of
get_rosters()
susometa 0.2.0
- Improve
get_answer_options()in several user-facing ways:- Draw answers from both the questionnaire JSON and the reusable categories files.
- Check that user inputs are complete and correct.
- Issue informative error messages if not.
- Add attributes to the data for several questionnaire objects:
- Add
categories_idto questions data - Add
roster_variable_name,condition_expression, andhide_if_disabledto rosters data
- Add
- Perform tests
- Add testing infrastructure
- Add tests for recently touched functions
- Add text fixtures from the Resilient Futures questionnaire for current and future testing.
- Add LSMS Team as rights holder and funder.
susometa 0.1.0
Split get_answer_options() into two functions:
-
get_answer_options()returns a named numeric vector, where the values are answer codes and names are value labels. -
get_ms_answers_as_var_labels()serves a use case for labelling multi-select variables in exported data or display tables.
susometa 0.0.0.9000
Initial version. Preserved to lock in old functionality of get_answer_options() for reproducibility.