This article explains the basics of creating tables and visualizations after you have imported your data. Jump to the section you are interested in.
- Creating a table using a summary table
- Creating a visualization
- Changing the appearance of a visualization
Creating a table using a summary table
If your data was imported directly as a table (e.g., it was copied and pasted directly onto the page), then the resulting table is already ready to use without the need to do anything else. Otherwise, the following steps will show you how to use a summary table in your Data Sources tree to create a table on a page.
- Select a summary table from the Data Sources tree and drag it onto the page. You will see the screen shown in the image below.
- To use the entire table, click the top left corner of the table. Alternatively, you can use just a sub-selection (partial range) of the summary table by either selecting the rows and columns, or the range of cells you want to use. If your data table has column or row names, use the red or blue controls on the right to include them.
- Once you are happy with the selection, click Save.
Example showing a full summary table vs a sub-selection
The table below is created using the full summary table (of Australian population data)
When the following sub-selection is made to the summary table
The resulting table looks like this:
Ways to create visualizations
There are multiple ways to create and change the appearance of visualizations in Data Stories. This article will discuss each method in detail.
- Convert a table into a visualization
- Select data and then insert a visualization
- Create a visualization then manually enter the data
- Using code
Convert a table into a visualization
Start by creating a table of your data then use the following steps to convert it to a visualization.
- Select the table.
- Click on the Visualization button at the top of the Object Inspector.
- Choose the type of visualization you want to use.
This method is best if you don't need to present the underlying table used to create the visualization as it won't be visible on the page.
Select data and then insert a visualization
Visualizations in Displayr can use other outputs (e.g., tables or calculations), variables from Data Sets, or Summary tables as input data. To do so:
- Select the input data (e.g., a summary table in the Data Sources tree or a range of cells on a table/calculation).
- Click on the Visualization icon in the toolbar.
- Choose the type of visualization you want to use.
- Drag the box on the page to set the size of the visualization's borders.
This method is best if the input data can be referenced directly from the Data Sources tree or is an object that lives elsewhere in your report.
Note: Selecting the input data before inserting the visualization automatically links the data to the visualization, making it faster than inserting the visualization and then selecting the input data.
Creating a visualization that references a summary in the Data Sources tree
Creating a visualization that references a single cell from a table on the page
Create a visualization by manually entering the data
- Click on the Visualization icon in the toolbar.
- Choose the type of visualization you want to use.
- Drag the box on the page to set the size of the visualization's borders.
- Go to the object inspector > Data > Data Sources and select Paste or type data.
- Paste or type your data into the spreadsheet and press OK.
This method is best if your data is relatively simple and doesn't need to be updated or it hasn't been imported into Displayr.
Using code
An infinite number of simple and advanced visualizations can be created using R. To use R to create a visualization:
- Click on the Calculation icon in the toolbar.
- Select Custom code and draw the output on the Page.
- Input your R code and press Calculate.
Example visualization created using R
Changing the appearance of a visualization
When a visualization is selected, you can modify the data (e.g., Sort Rows) using the options in the Data tab of the Object Inspector.
You can also modify its appearance (e.g., data labels, colors) using the options in the Appearance or Chart tabs of the object inspector.