portal Tool user Guide:
The Reshape Wide tool allows you to transform data tables which are in a long format – a format where each row of data does not have a unique geometry, into a wide format where each row should have a unique geometry. Common example of long format data tables are unfiltered temporal dataset, where for example a row may be a representation of the same location at a different time. You may want to use this tool in situations where you would like to avoid geometries within datasets stacking above of one another.
For this worked example we will transform a theoretical wide format data table into a long format data table. A theoretical table with limited dimensions has been used to allow for ease of visualisation, this tool would work for any similarly formatted table of much larger dimensions.
The following is the table we will be working on:
|1||2015-01-04T13:00:00.000+0000||Angaston Power Station||85.259999|
|2||2015-01-05T13:00:00.000+0000||Angaston Power Station||565.340002|
|3||2015-01-04T13:00:00.000+0000||Bogong / Mckay Power Station||21.675|
|4||2015-01-05T13:00:00.000+0000||Bogong / Mckay Power Station||7016.8399|
You can download a CSV of this table here
First we begin by importing the CSV into the AURIN Portal – To do this:
- Click Import in the Data side bar
- Browse to the location of your local copy of the CSV file
- Input the following:
- Title: Name of your dataset
- Abstract: Description of your dataset
- Aggregation Level: The aggregation level of the geometry of your dataset, in this case this should be set to: Non Spatial
- Key: The primary key of the dataset, this can be any column you view as containing the values which identifies each row.
- Click Add & Display
Once you have added the datasets, you are ready to use the Reshape Wide tool – follow on to learn about the input options.
We are now ready to run the Reshape Wide tool
To do this click the Tools button in the Analyse panel, click Dataset and Table Processing and then Reshape Wide. Enter your parameters as shown in the image below and click the Run Tool button. These parameters are also explained below
Reshape Wide tool Parameters
[INSERT RESHAPE WIDE TOOL SCREEN HERE]
- Dataset Input: This is the dataset that you would like to run the Reshape Wide tool on
- Identifier Column: This represents the identity of each of the features – the column which contains the values identifying each unique feature. In our case this is the station_name column
- Subgroup Column: This represent the repeating instance of each identity – the column which contains values representing a specific instance of each of the identified features. In our case this is the timestamp column
Once all of the parameters are input, click the Run Tool button to begin processing your table.
Once the tool has completed, a pop up box will appear in the AURIN Portal asking you to display your results, click Display to open the output table.
You will see that there has been an entirely new table created in you Data side panel, which now has been transformed into a wide format. In our case the table should now be similar to:
|Angaston Power Station||1||85.259999||2||565.340002|
|Bogong / Mckay Power Station||3||21.675||4||7016.8399|
On the AURIN Portal you are now then able to download the data table in a CSV format by clicking the wrench icon and navigating to the Download CSV option.