As introduced in Automatic Updating, Duplicate & Modify, and Extensibility, this article describes how to replace an existing data set or data source in Displayr with updated data to have all of the outputs in your document update automatically. Keep in mind that the new data set should contain all respondents that you want included in the report, so it may be necessary to Combine Data Files by Adding New Records.
Requirements
- A Displayr document with an imported data file in your Data Sources tree.
Method
1. Select the data set you wish to update in your Data Sources tree.
2. Press the Update button in the object inspector.
3. For most data sources, you will be presented with a Where is your data screen. Select the appropriate option to load your updated file.
You can follow the same steps as when you first imported the data set:
- Data files (.sav, .zsav, .xml, .sss, .mdd, .xls, .xlsx, .csv) stored on your computer or local drive.
- Data files saved in Cloud storage (Displayr Cloud Drive, Google Drive, OneDrive, Dropbox, Box).
- Data files made available as a URL.
Otherwise, for sources below, you will be taken directly to the code/API login interface used to import the data:
- API Integrations (Qualtrics, Forsta (formerly Decipher), SurveyMonkey)
- SQL databases
- Custom R code
4. Optional: It is possible to change the import method of the data source among the above options. That is, you can replace a data set imported from your computer with one saved as a URL by selecting URL. However, special care should be taken to ensure the new data set is structured the same with the same meta data as the old data set in order for Displayr to match and update the variables accordingly. Also, for API sources and those using code, Contact Support to switch the data source in the underlying document code.
Technical Details
Displayr will use the variable names to map the new data file to the data file currently loaded. All steps performed on the previous data set, such as table modifications, relabeling, constructing variables, creating tables, charts, analyses, etc, will be updated with the new data. If there are changes in the new data set, Displayr may not be able to automatically update everything and will alert you to the errors. Also note, if there are any R-based outputs or calculations, they will only automatically update if the Calculate automatically checkbox in the Object Inspector is checked. Otherwise, you will need to click the Calculate button for the output to update with the new data. Any specific ids (based on the Unique Identifier variable selected) that had manual edits or deletions will be automatically applied to the new data set, so you don't need to worry about losing any manual edits when updating.
Displayr will alert you in situations where a variable that has been constructed in Displayr has been broken due to removal or change of a variable used to construct the variable. A Data Difference Warning window will open with these alerts. Note that if the variable set was not used to create other variables or was not previously modified, you will not be alerted to any changes in the coded values.
If you are happy to proceed with importing the updated data, press Accept. Otherwise, you can click on Remind Me Later to see this message again the next time you open the document.
Any outputs that become invalid due to a data change will be identified in red in the Data Sources and Report tree. If there are discrepancies between the data file used to create the document and the updated data file, it may result in work being lost. For example, if a code frame has been revised, it may “break” any filters created using the variable set with the revised code frame and ruin any merging and renaming of categories in tables using the variable set with the revised code frame. This is by design. That is, while painful, it is better to lose work than to continue working without being aware that the code frame has been revised. Displayr gives warnings when this is about to occur.
Next
How to Import Data into Displayr
How to Combine Data Files by Adding New Records
How to Combine Data Files by Adding New Variables
How to Merge Data Sets with Different Cases/Records via the Displayr Cloud Drive Using R