Once you've created a document (see How to Create a New Document in Displayr), the next step is to add some data to analyze.
Adding data to the document
There are four basic ways of adding data to a document:
- Add as a data set in the Data Sources tree - for when you have a data file of raw data with variables that you want to work with. We also have sample data sets available.
- Import summary tables from Excel or by copy and paste - for when you have tables of aggregated data already calculated that you would like to include in your report or use to make visualizations.
- Use Code - load data in any shape, either to the Data Sources tree or as aggregated data that you want to manipulate with R in a separate R Calculation.
- Add miscellaneous data using a Widget
Add as a data set
Most data analyses in Displayr involve the use of a data set of observations or case-level data. For example, with surveys, data sets typically contain the responses from each person to complete a survey. To connect Displayr to a data set, from the Data Sources tree, press Add Data (bottom left of the screen).
You can then choose from the various ways of uploading or connecting to data.
Go to the Sample data section for some example data sets that you can use. If you have a data file saved on your computer, use the Upload file option. Displayr can also connect to a range of other cloud services, e.g., Google Drive and Dropbox, as well as connecting directly with some popular data collection platforms like Qualtrics. For full details on the different options, see How to Import Data into Displayr.
If you are relatively new to analyzing survey data, please read Find the Best Possible Data File before proceeding, as a lot of time can be saved by making sure you have the best possible file format.
Note about importing Excel/CSV data files
If you are importing an Excel or CSV file, Displayr can automatically detect the option best suited for your data, but you have the option to select one of the following options:
- As summary tables: your data will be imported as summary tables and can be used to create tables, calculations, and visualizations. This option is best for files that contain aggregated data tables. See How to Import Excel Tables into Displayr for more information.
- As a data set: your data will be imported as a data set where each column is a variable, and the variables can be used as inputs for further analyses, calculations, and visualizations. Note that only the first sheet in your Excel Workbook will be imported if there are multiple sheets.
By default, Displayr will automatically detect the best importing option. You can adjust the data format importing option from within the Where is your data? window. Expand the Advanced data file options section and update the Data format to your desired option. See Data Formats in Displayr for examples if you aren't sure which option is best suited for your data.
If you wish to change the data format after importing, you will need to follow these steps:
- In the Data Sources tree, right-click the data set name and select Delete.
- Still within the Data Sources tree, click + or + Add Data.
- Expand the Advanced data file options section.
- Select a different Data format.
- Upload your file via the Upload file button or one of the other importing options.
Copy and paste as a table
Tables of data can be copied and pasted from other apps (such as Excel) directly into Displayr. These can be tables of raw data (such as a data set), a table of aggregated data (such as a summary table), or any sort of information in table format. Note that when pasting in data, you are limited to 5,000 rows and 250 columns.
When data is pasted in as a table, you can use it in other outputs, but many standard analyses are not available (e.g., our built-in stat testing). Consequently, when importing an entire data set, it is usually preferable to do so by adding it as a data set, rather than a table - see the note about importing Excel/CSV files.
To paste in a standalone table, such as a summary table, see How to Import Excel Tables into Displayr. You can then drag the summary table onto a Page or into the Report tree to view the table. You may be prompted to select which cells to include when creating a summary table output.
Use code
You can write code to add data to your Displayr Document. There are a variety of ways of doing this, including:
- You can create a custom calculation and write code for importing aggregated or raw data into a calculation/output directly on the page, where you can manipulate it as any other table.
- You can add a data set, choose the R option, and then write code to import the data set into the Data Sources of the document.
- You can use the Displayr API.
Add miscellaneous data using a Widget
Currently, Displayr has a function to load stock prices. See How to Import and Analyze Stock Price Data for more on this.
Next
Once you have the data in Displayr, the next step is to Check Your Data.