====== Download Data ======

To download the collected data, go to the menu **Collected Data** and choose **Download data**.

**Tip:** You can always download data for backup or testing purposes while the survey is still running. The data saved on the server will not be affected - neither will it be deleted nor changed when being downloaded.

**Important:** It is likely that -- at some time -- you immediately need the original file as you have retrieved it from the survey server (e.g., for documentation purposes, or after important data have accidently been overwritten). Therefore, create a CD with the original files and keep it in a safe place. Then create a working copy of the original file and only work with this file. Never perform changes to the original file.

**Advice:** Every user opening the survey will be assigned a case number (CASE). If the visitor decides to leave the survey without starting it, the case will contain an "empty interview". Those empty interviews will by default be deleted by SoSci Survey (You may change this setting at **Project settings** -> **Privacy**). This is why the numbering of the cases in the dataset is usually __not__ consecutive. The same thing happens when opening the survey during development: The number of the first "real" interview usually is __not__ 1.


===== Statistical evaluation =====

SoSci Survey is a tool to //gather// data. To analyze this data, you will need additional software.

  * Spreadsheet software (OpenOffice Calc, Microsoft Excel, etc.)\\ You may already have this kind of software or you can download it at [[http://de.openoffice.org/|OpenOffice]] for free. This software is suitable to get a first glance at the data and simple calculations like frequencies or even simple correlations. For further analysis like significance tests you probably have to switch to more elaborate statistics software.
  * Statistics-Software (SPSS, GNU R, etc.)\\ These applications are made for statistical data analysis. The open software [[http://www.r-project.org/|GNU R]] has a steep learning curve, the SPSS is very expensive - though available at many universities. Inbetween are countless other Programs -- although at this stage SoSci Survey is only able to provide the data files edited for SPSS and GNU R. Other programs may use the CSV file format with the limitation of the variables and values not being labeled.
  * SQL-Databases (e.g. MySQL)\\ If you need the data as a database, you may download your dataset as a SQL-code-file. If possible, the value and variable labels will also be imported. Be aware that data//bases// are made for data saving purposes. To analyze the data you will still need additional software.


===== File format =====

Start with choosing the //File Format//. To do so, click on the corresponding tab.

{{:en:results:scr.download.format.png?nolink|Choosing the file format}}

The tab will show additional options. You probably can use the default settings. For details see the format specific explanations below.


==== CSV (Excel/OpenOffice) ====

CSV stands for "Character Separated Values". The values will be written consecutively and divided by a predefined character (e.g. comma, semicolon, tab). A CSV file can be opened with a common text editor to check the content. But you are not able to process the data.

Because the format is that simple, nearly every spreadsheet- or statistics-program can open it. The backdraw to this is that no labels for values or variables can be stored in CSV. This is why you should use the appropriate format when using SPSS or GNU R so you won't lose any labels. 

CSV-files can convey international characters correctly -- as opposed to older SPSS-versions. If evaluating open text entry fields using SPSS, you may have to download your dataset a second time as CSV and open it in OpenOffice Calc or Excel. Now your text entries in languages like chinese, japan or korean will be displayed correctly and may e.g. be encoded.

You can define the //delimiters// and //enclosures// for text to be used in the CSV-file. You probably won't have to change the default settings.

The option //shorten long texts// is for old SPSS versions (earlier than version 11.5), when it used to crash on importing long texts. Usually you won't have to use this option.

  * [[import-openoffice]]
  * [[import-excel]]


==== SPSS/PAWS ====

The commercial statistics software SPSS (an earlier version was called PAWS) is rather common. This is why SoSci Survey offers to download the data edited specifically for SPSS, including value- and variable labels. You can choose between two different ways to do so.

  * Complete import from file\\ This is the most comfortable way. SoSci Survey will create a SPS-file (SPSS Syntax) that contains all variables, data and labels. However, the complete import will create problems when using SPSS versions older than version 16 and variables that contain long texts. In this case you will have to use the following workaround:
  * Import via CSV file\\ Using this way, SoSciSurvey will create two files: The dataset as a CSV-file and the import syntax (containig the labels for variables and values) as an SPS-file.

**Important:** SPSS is not able to import international characters (japanese, chinese, korean, etc. ) correctly. In this case you will have to download the data as a CSV-file, too.

**Important:** Always download the dataset and the Import-Syntax at the same time to avoid errors with incompatibilities of the two (This may happen when new variables were added between the downloads or variables were not included before because they did not contain any data).

  * [[import-spss]] -- Default
  * [[import-spss-csv]] -- in case the default won't work due to overlong text responses
  * [[import_spss-man]] -- not recommended


==== GNU R ====

The open source software [[http://www.r-project.org/|GNU R]] can be used for free. The software often supports the latest statistical methods. However, using it is very hard to learn.

SoSciSurvey supports the export for GNU R. It will take into account the characteristics of GNU R. E.g. the fact that GNU R supports only one kind of missing values: There will be no difference between "question not answered" and "option 'I don't know'" after the export.

To import data to GNU R you will need two files. A script for the import and the dataset as a CSV-file. Be aware the CSV-file will be formatted slightly differently for GNU R export as it would be if the //CSV// standalone option was chosen for download.

**Important:** Always download the dataset and the script at the same time to avoid errors with incompatibilities of the two (This may happen when new variables were added between the downloads or variables were not included before because they did not contain any data).

  * [[import-gnu-r]]


==== SQL ====

In case you wish to import the collected data to an SQL-database, SoSci Survey will create the corresponding SQL-commands. If possible in SQL, the labels of values and variables will be carried over.

===== Additional settings =====

Further down on the download page you will find additional tabs where you can define the datasets and variables to be downloaded. Remember, the settings on these tabs will not be saved!

{{:en:results:scr.download.settings.png?nolink|Tabs for additional settings}}

==== Interview status ====

SoSci Survey saves all interviews -- regardless whether the dataset was created when testing the questionnaire, when the interview was half-completed or when it was fully completed. When downloading data, you can filter irrelevant datasets.

**Advice:** As the questionnaire is in the field, the standard setting for //Interview mode// switches from "include data from development and pretests" to "field interviews only". An interview will be registered as "development" if started from the project administration page ({{:button.run.gif?nolink|Test questionnaire}}) or if run in pretest mode.

  * Case selection by mode
    * //Field Interviews only//\\ This option will be set to standard when the survey is in the field. Data collected when developing and pretesting will no longer be downloaded.
    * //Include data from development and pretests//\\ Select this option to download all data regardless of context.
  * Case selection by completion status
    * //No filtering//\\ All data will be downloaded, regardless of data saved. This option is only available, if the project was set to //store data from empty interviews// at **Project Settings** -> **privacy**.
    * //No empty data//\\ Data from visitors who never clicked on "next" and so did not leave any data will not be downloaded.
    * //No incomplete questionnaire//\\ Only interviews that were completed will be downloaded. An interview is registered as complete if the visitor was shown the last page, regardless of the amount of questions actually answered.

==== Selection of variables ====

  * //Time spent per page and other time variables//\\ SoSci Survey stores the amount of time a user spent on a particular page. These variables ''TIME_001'' are downloaded by default. 
  * //Download information on browser and referer//\\ The data that is automatically being submitted by the user's browser. Remember, this data will be saved only if you activate this option at **Project Settings** -> **privacy**. 
  * //Download variables which have not been used in the questionnaire//\\ By default your dataset will only contain variables that have at least one answer -- the variables which do so are printed in black at the **variables listing**. It is not relevant whether this answer came from the questionnaire development/pretest or the field interviews. If you wish to download all variables regardless whether they have been answered or not (e.g. if you need a given data structure), activate this option. 
  * //Download data from deleted questions and items//\\ When deleting a question or item, you also delete the according variables. Already collected data will still be stored, however SoSci Survey is not able to allocate it to a variable. If you accidentally deleted a variable, you may activate this option to download the data anyways. Bear in mind, instead of variable names, the deleted variables have no ID but a number. If you have deleted several variables, you may have to guess the ID by the stored data.

==== Parts of Data ====

If you wish to download only a part of your survey data, you can define the download area by the case number or by interview date (start of the interview). 
This is particularly helpful e.g. if you wish to check the most current data of a very big dataset.

==== Language ====

In [[en:create:multilang|multilingual surveys]] you can choose the language to be used for variable and value labels. Bear in mind that the question term can be saved in only one language while the value labels may vary with the language.

===== File download =====

When you have chosen a file format, you will find one or several download buttons (depending on file format and settings). The file will be provided as a common download. Remember to save the file to the hard drive (rather than opening it directly from the download dialog).

**Important:** On clicking the download button, SoSci Survey will start to edit the dataset for download. This process may take a few minutes, especially with big datasets. When this happens, do not click the button again or the process will start over, taking up even more time.

Please refer to the chapters linked above on how to open/import the downloaded files in the respective software.