The following tutorial will walk you through taking the SPSS (.sav) files currently being used and converting them into a format where analysis and visualization can be preformed within Tableau through the use of Tableau Prep.
You will need the following programs: PSPP, Tableau Prep, and Tableau Desktop. Instructions to download are included in the wiki page "Software Installation Guides." The tutorial is broken down by the program used.
The following will be done for each dataset (.sav file):
1. Convert .sav to .csv
This is done so the SPSS files can be read by Tableau Prep
Open the file in PSPP
File, Open
Open a New Syntax Window
File, New, Syntax
Paste the following syntax into the New Syntax Window:
SAVE TRANSLATE /OUTFILE="[file location]\[file_name].csv" /TYPE=CSV /FIELDNAMES /CELLS=LABELS. |
/OUTFILE=
:[file_location]
to the location you would like the file to be saved and the [file_name]
to what you want the resulting file to be namedRun, All
Steps 1-3 will be done for each dataset (.csv file):
1. Connect to datasets
Connections, Text File
2. Extract data into Tableau Prep
This step is not necessary, but can speed up Tableau Prep by taking the data from the .csv files and packaging it with Tableau Prep.
File, Export Packaged Flow
3. Cleaning the Datasets
Add a Step to the dataset by clicking the plus sign to the right of the dataset, then Add Step
Plus sign, Add Step
Click on the step you just created
Remove SPSSID
This is done because of the large number of entries in the SPSSID field, which can greatly slow down the processing of Tableau Prep
Right Click field, Remove Field
Rename ID and other fields
This is done so once fields are joined one can easily tell what dataset the fields originally came from. It is recommended that you rename other fields with common names, such as "date."
Right Click field, Rename Field
4. Joining the Datasets
Step 4 will be done every time you wish to join a dataset to another, or when you want to join additional datasets to an existing join. You will join all datasets that you wish to analyze together. It is recommended you only join the data you will be reviewing.
An explanation of Joins can be found in the wiki page "Joins Explained."
Plus sign, Add Join
4. Outputting and Viewing Flow
At anypoint you can view your flow in Tableau Desktop by right clicking a step and selecting "preview in Tableau Desktop"
Right click step, Preview in Tableau Desktop
You can add an output by clicking the plus icon and selecting "Add Output" at anytime, which extracts the data contained at the step an output is added. -Click Plus Icon, Click Add Output
You may also want to use visual panels to communicate related information, tips or things users need to be aware of. |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.
|