Actions

Exportation des résultats

From LimeSurvey Manual

Revision as of 08:10, 4 October 2023 by Maren.fritz (talk | contribs) (Created page with "== Fichier VVExport version 2 {{NewIn|2.05}} == Cette nouvelle fonctionnalité autorise des noms de colonnes différents de ceux de la base de données. Si vos codes de questi...")
  Attention : La section suivante est obsolète. Pour des informations à jour, veuillez consulter :




Une fois votre enquête active, vous pouvez commencer à visualiser les réponses et les exporter. Pour accéder à l'aperçu des réponses à l'enquête, cliquez sur : Réponses -> Réponses et statistiques

Pour transférer les données de LimeSurvey vers votre logiciel de statistique préféré (R, SAS, SPSS, autre).

En haut de la page, plusieurs options d'exportation sont répertoriées.

Lors de l'exportation des résultats, il existe plusieurs options de filtre :

  • Général
    • Définissez une plage (par exemple, "exporter les enregistrements X vers Y")
    • Définissez pour exporter tous les enregistrements OU enregistrements complétés uniquement OU enregistrements incomplets uniquement
  • Questions
    • Déterminez comment le titre doit apparaître : titre abrégé OU titres complets OU codes de question
    • Convertissez les espaces dans le texte de la question en traits de soulignement
  • Réponses
    • Vous pouvez soit exporter les réponses complètes, soit convertir les codes de réponse Y et N en une variable définie
  • Format
    • Microsoft Word (jeu de caractères latin)
    • Microsoft Excel (tous les jeux de caractères)
    • Fichier CSV (tous les jeux de caractères)
    • HTML
    • PDF
  • 'Contrôle des colonnes'
    • Définissez les réponses qui doivent être exportées. Toutes les réponses de cette liste sont représentées par leur identifiant SGQA
    • Définissez quelles données de token doivent être exportées. Cette option n'est disponible que si votre enquête est non anonyme !

Exportation SPSS

Général

SPSS Statistics est un logiciel utilisé pour l'analyse statistique logique par lots et non par lots. Vous pouvez utiliser le package SPSS officiel ou utiliser le remplacement GNU PSPP du programme propriétaire SPSS.

Pour exporter vos données de réponse vers SPSS, allez dans la section « Réponses et statistiques » et cliquez sur l'icône pour exporter vers SPSS.

Exporter et filtrer les données

Vous obtenez ainsi, pour chaque question de votre enquête, un tableau statistique et un graphique présentant la distribution des réponses, en effectifs et en pourcentages, comme dans cet exemple tiré de l’enquête de Samuel Coavoux sur les joueurs de World of Warcraft :

Et si vous ne voulez pas tous les tris à plat, il vous suffit de ne pas cocher « Visualiser le résumé de tous les champs disponibles », mais seulement les questions qui vous intéressent. Cela dit, vous ne pourrez pas aller beaucoup plus loin. Par exemple, impossible apparemment de faire un tableau croisé…

Après avoir téléchargé ces fichiers, vous pouvez les ouvrir à l'aide d'un éditeur de texte brut tel que le Bloc-notes pour voir à quoi ressemblent les données exportées. Le fichier de syntaxe contient les commandes à exécuter pour importer les données. C'est comme un langage de programmation dans SPSS. Le fichier de données contient un fichier séparé par des virgules avec toutes les données. Si vous importez simplement ces données au format CSV via un assistant, vous perdez des informations sur les questions, les jeux d'étiquettes, etc., nous ne le faisons donc pas.

Importer des données dans SPSS

Placez les deux fichiers dans le même dossier sur votre disque (exemple : c:\data\survey_xxxx_SPSS_syntax_file.sps et c:\data\survey_xxxx_SPSS_data_file.dat)

Nous avons maintenant deux options :

1. Lorsque vous utilisez Windows, utilisez l'explorateur pour accéder au dossier utilisé ci-dessus. Si SPSS est connecté à l'extension de fichier .sps, vous pouvez simplement ouvrir le fichier en double-cliquant dessus :

Vous pouvez maintenant choisir Exécuter->Tout dans la fenêtre ouverte et, après un certain temps, obtenir votre ensemble de données de sortie que vous pourrez enregistrer en tant que fichier .sav normal.

2. Parfois, la solution simple ci-dessus ne fonctionne pas. Ensuite, vous pouvez procéder comme suit :

  • Ouvrez SPSS
  • Choisissez Fichier->Ouvrir->Syntaxe
  • Choisissez le fichier approprié : c:\data\survey_xxxx_SPSS_syntax_file.sps
  • La syntaxe s'ouvre maintenant. .
  • Modifiez la ligne qui lit /FILE='survey_xxxx_SPSS_data_file.dat' pour inclure le chemin où se trouvent les fichiers : /FILE='c:\data\survey_xxxx_SPSS_data_file.dat' , pour utilisateur mac : /FILE='HD/Users/username/survey_xxxx_SPSS_data_file.dat'
  • Maintenant, marquez tout le texte de la commande et choisissez Exécuter->Tout dans le menu et après un moment (soyez patient), vous avoir l'ensemble de données avec toutes les informations telles que des questions, des étiquettes, etc.

Transférer les réponses vers R

N'hésitez pas à ajouter plus d'informations si vous en avez !

Le logiciel gratuit R est une alternative à SPSS. Il s’agit d’un export vers une application dans Limesurvey.

Instructions sur la façon d'importer votre ensemble de données dans R:

  1. Téléchargez à la fois le fichier de syntaxe et le fichier de données.
  2. Stockez les deux fichiers dans le répertoire de travail R (utilisez getwd() et setwd() dans une fenêtre de commande R pour obtenir et définir).
  3. Dans votre code entrez source("Surveydata_syntax.R", encoding = "UTF-8") dans la fenêtre de commande R qui importera les données au format correct dans une trame de données appelée « données ».


Les réponses avec des options limitées seront prises en compte avec les niveaux correspondant au code de la question et les étiquettes correspondant aux options.

Les questions avec autre en option auront le champ de question avec _Autre ajouté comme nouvelle colonne pour les autres données.

NB : R-export est un plugin dans Limesurvey. Si vous ne trouvez pas les options R-export (« R (fichier de syntaxe) », « R (fichier de données) ») sous « Exporter les résultats vers l'application », assurez-vous que le plugin R-export est activé dans le menu des plugins.

Exportation STATA-xml

Cette option est disponible à partir de la version 2.05

STATA est un progiciel commercial d'analyse de données et de statistiques.

Cette routine d'exportation a été créée pour faciliter l'analyse rapide des données collectées avec LimeSurvey. Il crée un fichier XML au format propriétaire de STATA, qui peut être importé indépendamment de la plate-forme sur laquelle STATA est exécuté. L'utilisation de ce format offre plusieurs avantages par rapport à l'importation de fichiers CSV simples :

  • Les ensembles de données sont entièrement étiquetés, y compris les étiquettes de variables (question, sous-question) et les étiquettes de valeurs (réponses, le cas échéant).
  • Les dates sont déjà transformées en STATA internes. format de date et peut ainsi être directement utilisé pour calculer la différence entre les jours, etc.
  • Les noms des variables sont, si nécessaire, convertis dans un format compatible STATA.
  • Formats de données des variables (chaîne, entier, flottant, etc. ) sont déjà définis en fonction des données sous-jacentes. (Plus de chiffres codés sous forme de chaînes !).

Comment charger le fichier dans STATA : Dans le menu de STATA, cliquez sur Fichier, Importer, xml-data. Choisissez Parcourir pour accéder à votre fichier exporté et cliquez sur « OK ». Cela devrait être tout. Si vous préférez les fichiers binaires .dta de STATA, vous pouvez simplement sauvegarder à nouveau vos données dans ce format.

Attention :

  • En raison d'une limitation dans le format de données de STATA, la longueur des variables de chaîne (texte) a un maximum de 244 caractères (versions Stata 8-12) et 2045 caractères (version Stata 13 et ci-dessus). Merci d'indiquer votre version de Stata dans les paramètres du plugin d'export.
  • STATA prend uniquement en charge l'association d'étiquettes de valeur à des valeurs numériques. Ainsi, pour obtenir des réponses courtes (généralement un ou deux chiffres) et les étiqueter correctement, il faut utiliser des codes de réponse numériques dans LimeSurvey (1 = Tout à fait d'accord).cSi des codes de réponse non numériques sont utilisés (A = Tout à fait d'accord), alors le texte complet de la réponse sera utilisé comme réponse (par exemple : « Tout à fait d'accord »).

VVExport et VVImport

 Hint: This feature changed with version 2.05


Une fois que vous avez commencé à collecter des réponses, il peut arriver que vous ayez besoin de pouvoir éditer et modifier directement de grandes quantités de données à partir de votre tableau de réponses, où un tableur peut s'avérer plus utile.

VVExport (le "VV" signifie vérification verticale) vous permet d'exporter votre tableau de réponses dans un fichier .csv. Tant que la structure générale du fichier reste intacte, vous pouvez alors modifier les valeurs qu'il contient, puis réimporter le fichier dans votre tableau de réponses à l'aide de la fonctionnalité "VVImport".

Choses dont vous devez être conscient :

  • Si vous souhaitez importer des réponses à l'aide de "VVImport", assurez-vous de vérifier si les réponses doivent être ajoutées aux réponses existantes ou si toutes les réponses doivent être écrasées.
  • Si vous essayez pour importer des réponses d'une enquête différente mais identique (par exemple des questions/réponses identiques d'une autre enquête), assurez-vous que vous utilisez le bon fichier vv et que les deux premières lignes du fichier .csv sont correctes.
  • Si vous importez un à votre installation LimeSurvey, le SID ne changera (si possible) pas. L'identifiant du groupe et l'identifiant de la question peuvent cependant changer. Vous devrez donc peut-être ajuster les deux premières lignes de titre pour qu'elles correspondent au nouvel identifiant de groupe/identifiant de question. Voir Ajustement des en-têtes de fichiers vv

Fichier VVExport version 2 (New in 2.05 )

Cette nouvelle fonctionnalité autorise des noms de colonnes différents de ceux de la base de données. Si vos codes de questions sont uniques, alors la nouvelle version est sélectionnée. Dans la nouvelle version, chaque nom de colonne utilise le Qcode Variable Naming. Par exemple, cela permet de mettre à jour plus facilement une enquête existante dans différentes installations.

Exporting a VV survey file

File:LimesurveyExportVVen.jpg

When you choose to export responses using VVExport you will be given the option to choose which survey to be exported, whether you want to export all responses or complete responses only or incomplete responses only. The file extension allows you to choose which extension the exported file will have. For easy use .csv should be chosen.

A 'vv survey file' allows you to import the responses to a survey when the question/answer combinations have changed. Effectively this allows you to add or remove questions in an active survey.

Clicking on "Export a VV survey file" will then produce a tab delimited file that can be opened by Excel or similar style spreadsheet program. The first two rows of the spreadsheet are the column labels. The first row is a "human readable" column heading that details the name of the question/answer field. The second row is the internal PHP/database column name for that response.

You should not modify the first two rows of this spreadsheet if you want to be able to "import" the data back into LimeSurvey at a later point.

Exporting a VV survey file (New in 2.05 )

 Hint: This features is available starting in version 2.05


  • Export survey : The survey ID to be exported (read-only)
  • Export : The completion state of the responses to be exported
  • File extension : The file extension. The file is a TSV (Tab-separated values) file. For easy opening in MS-Excel set the extension to .txt, with LibreOffice, OpenOffice or other spreadsheet program you can leave it to .csv.
  • VV export version : The 1.0 version uses database column headers, version 2.0 uses Qcode Variable Naming. Version 2.0 is selected by default if all of your question code are unique.

The first two rows of the spreadsheet are the column labels. The first row is a "human readable" column heading that details the name of the question. The second row is the real column name (Internal DB- or Qcode-name) for that response.

Editing a VV survey file

When a .vv file has been successfully exported you can use a spreadsheet tool to open and edit the file. If you have to choose a column separator when opening the file please use the "Tab" character. If you are using non-ASCII characters make sure you set "UTF-8" as character set.

  If you are using Microsoft Excel to edit the exported vv file, you should know that excel destroys the original data structure of the file. This causes an error when you try to re-import the edited .vv file.


By default the first two rows of the .vv file are headers. If needed you can remove the first line to have a real TSV file. There are different use cases for importing a .vv file so we will differentiate between adding new responses to a survey and overwriting all responses of the survey.

Example structure of a .vv file:

VV version 1 TSV file

Response ID	Date submitted	Last page	Start language	Token	please vote from 1 to 6 (1 - super, 6 - worst)
id	submitdate	lastpage	startlanguage	token	46492X40X1991
183	09.11.11 11:44	3	de	jsfhusdgqfygqsy	4
184	09.11.11 11:53	3	de	sdfhsifgsyergze	2
190	09.11.11 11:44	3	de	qsdqshkfhkdsjhj	1

VV version 2 TSV file

Response ID	Date submitted	Last page	Start language	Token	please vote from 1 to 6 (1 - super, 6 - worst)
id	submitdate	lastpage	startlanguage	token	QCODE
183	09.11.11 11:44	3	de	jsfhusdgqfygqsy	4
184	09.11.11 11:53	3	de	sdfhsifgsyergze	2
190	09.11.11 11:44	3	de	qsdqshkfhkdsjhj	1


Here SQGA identifier are not used - instead Qcode variable naming QCODE is used in the second line.

Reserved names

.VV file uses left and right brackets for reserved names, when importing this string is replaced by :

  • {question_not_shown} : NULL value in database. LimeSurvey use [empty string] for not answered question, and NULL value for question not shown (by Expression manager or max step in survey).
  • {quote} : " (a double quote)
  • {cr} : Carriage return
  • {newline} : A new line
  • {lbrace} : Left bracket (for example, if you want to have {cr} in response : use {lbrace}cr} )

VV Version 1 editing

Adding new responses to the existing responses of a survey

This is not supported for version 1 of the format as it easily can lead to various problems including data being imported into the wrong columns. The version 1 of the .vv file was always meant for vertical verification of data in an external tool like Excel, not as a mean to pull together data from different source (like the same survey running on another server).

Modify all responses of a survey

If you want to modify responses of survey you can just add the edit the file.

Example:

Step 1: Open the file

Response ID	Date submitted	Last page	Start language	please vote from 1 to 6 (1 - super, 6 - worst)
id	submitdate	lastpage	startlanguage		46492X40X1991
183	09.11.11 11:44	3	de	4
184	09.11.11 11:53	3	de	2
190	09.11.11 11:44	3	de	1


Step 2: Modify responses

Response ID	Date submitted	Last page	Start language	please vote from 1 to 6 (1 - super, 6 - worst)
id	submitdate	lastpage	startlanguage		46492X40X1991
1000	09.11.11 11:44	3	de	3
1001	09.11.11 11:53	3	de	3
1002	09.11.11 11:44	3	de	3

You can then import the survey, make sure to override the existing responses (see "Importing a VV survey file").

Importing a VV survey file

File:LimeSurveyImportVVen.jpg

As long as the first two lines are intact, you can then import the data in your vv survey file back into an active LimeSurvey survey.

If you used Microsoft Excel to edit the exported vv file, the data structure of this file may be corrupted, so LimeSurvey is not able to import the edited file. You can try the following workaround to get the import working without an error:

  • Open your exported vv file in Excel and do your changes (I guess you already did that)
  • Save it as tab-separated text file (It creates a new file with the extension .txt)
  • Do another "clean" vv export from LimeSurvey
  • Open this new exported vv file with a texteditor like notepad or something else (I used textwrangler on mac)
  • Press CTRL + A to mark all of the content and delete it
  • Open the Excel edited vv file (the tab separated .txt file) with a texteditor and press CTRL + A to mark all of the content
  • Press CTRL + C to copy the content and paste it into the new (now empty) vv file
  • Press CTRL + S to save the file as it is (as .csv)
  • Now try to import this file

Then, from the browse screen, choose the "Import a VV Survey file" icon.

The "Import a VV Survey File" screen needs you to choose the "vvexport" file you are importing. If you choose to "Exclude Record IDs" the records will be imported and brand new Record ID's will be generated for them (use this option for the use case "Adding new responses to the existing responses of a survey"). If you un-check this box, then the original record id's will be imported (use this option for the use case "Overwriting all responses of the survey").

There are a range of options you can choose that tell LimeSurvey how to deal with double or multiple entries.

  • Report an error (and skip the new record).
  • Renumber the new record
  • Replace the existing record (uses this for the use case "Overwriting all responses of the survey")

Importing a VV survey file (New in 2.05 )

File:VV2-import-en.png
  • File : Select the file to be uploaded. The file must be a TSV file: A text file with each column separated by TAB.
  • Exclude record IDs? : If 'id' column exist in the file you can exclude this line or not. If this setting is checked then a new record is added for each line of the .vv file. If unchecked you can choose:
  • When an imported record matches an existing record ID:
    • skip : Report and skip the new record. After upload you will see if the record already existed - if it existed it's not imported.
    • renumber : Renumber the new record. A new record is added to the response table with answer of the VV file.
    • replace : Replace the existing record. The old record is deleted and completely replaced by the record from the VV file
    • replaceanswer : Replace response details from the file in the existing record. The old record is updated with the new response from the VV file. This allow to replace only one question in the response table.
  • Import as not finalized response? : If checked the submitdate is set to NULL, so the response is set to not completed.
  • Character set of the file : You can choose the character set of the file - the default and recommended value is UTF-8 but some spreadsheet program don't allow to choose a character set.
  • First line contains question codes : By default VV file first line contain human readable question, the real column names are in the second line. This allow to use the first line as the real column names.
  • Force import : If the question codes are not found in the database name or in Qcode Variable Naming then columns are assigned depending of order. This can be used to import VV file from different LimeSurvey instance but each survey must be exactly the same. We strongly recommend to use this only if you know what you are doing. It can be very dangerous and lead to results ending up in the wrong column.

Other export options

Export a single response

If you want to export an individual response, you can do it in 3 ways:

1. Login to limesurvey admin backend, choose your survey, goto "Edit survey settings" -> "Notification and data management" and make sure you receive basic email notifications.

Every time someone has completed a survey, you will receive an email with a link: "Click the following link to see the individual response"

This will take you to a page with a button above the data saying "Export this response"

2. Login to limesurvey admin backend, choose your survey and "Browse responses for this survey". Click on "Display responses" and the id number you want to export in the left column. Then you can click on "Export this survey" above the data.

3. Login to limesurvey admin backend, choose your survey and "Export results to application". In the last field above "Export data" you can choose which entry you want to export.

Match responses from different surveys

If you want to track survey responses for particular individuals over time, LimeSurvey can help you do that. A possible use case is to track group responses before and after the group takes a particular seminar.

The steps to implementing this are as follows:

1. Create the survey

2. Make sure the survey is non-anonymous and uses tokens. To create a non-anonymous survey:

a - Click on the icon General settings.

b - Then under the Tokens tab select "No" for Anonymized responses.

3. Activate the survey.

When you activate the survey, click on the "switch to closed-access mode" button to create the token table:

4. Populate the tokens table with whatever method you wish (follow the instructions found at the Tokens page ).

5. Export the survey results and make sure you include the token information.

To export click browse results...

...and then export:

Remember to choose one or more elements from the token table to associate with the survey responses:

6. When you run the survey again, which can easily be done by copying the survey and tokens table using export/import, just repeat the steps, and make sure the same query is used to build the csv token import file.

Problems & Solutions

Excel

Modifying responses in Excel prior to Import

In order to make multiple changes to responses, you may choose to Export and open a file in Excel. Make changes to the data (other than the top lines) and then save as a .txt file. If you save as .csv, Excel uses comma-delimits which will not import into LimeSurvey. By saving as a .txt file, Excel saves as a tab-delimited file which imports back into LimeSurvey.

Edit .csv with Excel

In general we do not recommend to use Excel to edit the exported .csv files because Excel does some changes to the internal data structure which results in a failing import. If you nevertheless want to use Excel you have to set the seperator for Excel to a comma in System Control (Windows Systems):

System Control|Region- Languageoptions|Regional Settings, customize...|Tab Numbers|Digit grouping symbol| replace ; with ,

Workaround to edit .csv files with Excel

Using Excel for editing questions can prevent you from being able to re-import them. But editing is the way to go if you have more than 5 or so options or ranking options, want to use Excel capabilities like sorting, etc.

This is a partial workaround that seems to work in 1.82-essentially, only use Excel on the part of the file that is the data:

  • Export a question similar to what you would like to reuse as .csv file
  • Open the CSV file in a rawtext editor
  • Copy the part that has the answers to Excel, and parse it with Text to Columns or equivalent.
  • Use the talent of Excel to allow pasting text in columns to paste in 20, 50, 100 answers, as you wish
  • Save the file as Excel CSV, which will likely have no quotes.
  • Open this file in the editor, and Select All, Copy
  • Go back to the file you opened with the rawtext editor
  • Paste over the answers there
  • Save AS, with a different name, maybe one that you can remember for reuse
  • Import this file.

Excel - export limited to 255 columns

Due to limitations in Excel (versions lower and equal to 2003), LimeSurvey can export only 255 columns at the same time. Microsoft has proposed a workaround as a VB macro.

Although newer spreadsheets (Excel >= 2007, OpenOffice) can display more than 255 columns, the internal module used by LimeSurvey still can't export more than 255 columns.

Two workarounds are however possible, use one of the following solutions:

  • Either export to CSV and import in your spreadsheet
  • Or use multiple exports (selecting at most 250 columns at a time), then merge the exported results

Excel/.csv - export fails

If you are unable to export your data to excel or into a .csv file please try to clear your browser cache and cookies.

CSV

CSV defaults to 255 columns

When exporting large surveys the GUI by default limits the export to the first 255 columns. To work around this, simply mark all data sets for export.

SPSS export

General steps

To import the LimeSurvey response data please use the following steps:

  1. Click the 'Export to SPSS' icon.
  2. From the select boxes select which responses you want to export and your SPSS version.
  3. Download both files, the .sps (SPSS syntax command file) and .dat file (data file)
  4. Open the .sps file with SPSS by opening SPSS, then select 'Choose another type of file' and select the downloaded .sps file.
  5. Now an editor opens inside SPS where you can edit the commands in that file. Look for the line that starts with '/FILE=...'
  6. Edit that line and adjust the path so it points to your .dat file. Example: Your *.dat file is in c:\temp so set this line to  /FILE='c:\temp\survey_(xxxx)_SPSS_data_file.dat'
  7. Now select all commands inside the editor by pressing CTRL-A.
  8. From the SPSS menu select Run/All.
  9. Be patient, it will take some time to import all data and labels. Check the status bar for the progress.
  10. Done!

Possible error messages in SPSS

ERROR. command name:Get Data

If you receive the error message ERROR. command name:Get Data. 2267 Unexpected Token missing. please edit the forth line of your syntax file so it points to the absolute path of the data file like

C:\spss\Data\limesurvey\SPSS\survey_35276_SPSS_data_file.dat

Error: "Text value unmappable in the current server locale"

This error can happen if you try to open an exported syntax file in SPSS 16. The solution is to force SPSS to interpret the syntax file as unicode.

Open SPSS. Go to Edit > Options > Character encoding for data and syntax. Change the option to "unicode".

LimeSurvey data can now be exported to SPSS 16 without any problem.

Define the scale to use for your variable

It is possible to override the default scale used for a variable by setting the question attribute scale_export to the appropriate value.

VV Export/Import

VV - Problems with vv import

If you have difficulties importing a vv file, try a Tab-delimited file and it should work fine.

Other problems and solutions

Copying responses into a different survey (using tokens)

  1. Create new survey, add a dummy response, export the response file, open in Excel. This creates the format for the new import file.
  2. Export the responses from the old survey, including tokens, open in Excel.
  3. Use this data to create an Excel worksheet for the standard token file import (eg. Firstname, Lastname, Token, Email address, Email status (OK), Language (En)). Save as .csv and import tokens to the new survey in LimeSurvey.
  4. In Excel, copy the response fields from the old survey responses that you want in the new survey (including token) into the appropriate Excel column of the new survey format.
  5. Save as .txt file.
  6. Use VVImport to import the new data into the new survey.
  7. Possible import errors include date format - some system date fields do not allow a NULL value, some do. If the date looks okay but gives an error, use the Excel cell format "2009-12-01".