occupations-qualtrics

An implementation of select2 to capture occupations using Canadian NOC codes in Qualtrics

https://github.com/rafaelgottardo/occupations-qualtrics

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.7%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

An implementation of select2 to capture occupations using Canadian NOC codes in Qualtrics

Basic Info
  • Host: GitHub
  • Owner: RafaelGottardo
  • License: mit
  • Language: TeX
  • Default Branch: main
  • Size: 875 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 11 months ago · Last pushed 11 months ago
Metadata Files
Readme License Citation

README.md

(La version française suit)

Canadian Occupations in Qualtrics

This is an implementation of Select2 designed to caputre occupations and National Occupation Classification (NOC) Codes to be used in Canadian Public Opinion Research. A version of this implementation was included in the 2025 Canadian Election Study (CES) enabling a comparison of results from surveys to the CES.

You can preview this module in English or French.

For a full working example in English please see NOC-Select2.qsf.

If you have any issues or concerns please pull an issue on this repository.

Implementation in Qualtrics

  1. Edit the css in the custom header to include the following code to implement Select2:

``` <!-- Select2 CSS --> <!-- jQuery (required by Select2) --> <!-- Select2 JavaScript -->

```

  1. Edit the css in the custom footer to include the following code to load the data

<script src="https://rafaelgottardo.github.io/occupations-qualtrics/occupations.js"></script>

  1. Create a "Single line" "Text entry" question
  2. Edit the JavaScript in for the "Text entry" question Paste the contents of question_javascript into the question JavaScript for the "Text entry" question. The occupation names and NOC codes are drawn from occupations.js Make sure to change all instances of QID1 to the question ID for your occupation question in your survey.

To implement this method in French paste the code from questionjavascriptfr into your qualtrics Javascript. The occupation names and NOC codes for the French version are drawn from occuptions_fr.js.

  1. (Optional) Add a confirmation question following the occupation question

We include a confirmation question following the occupation question to ensure that we have acurately captured an individual's occupation and industry. The confirmation question allows respondents to see the occupation category that they were placed in to ensure that it accurately reflects their occupation. It also enables them to enter another occupation if their occupation was not listed.

``` You entered ${e://Field/occupation-name} which corresponds to ${e://Field/occupation-category}. Is this correct? If not go back to previous question.

If your occupation was not listed please enter it below: ```

  1. Download Data

Data from the occupation question will not appear in the default question responses in Qualtrics and will only appear in the embedded data on Qualtrics or when the data is downloaded.

Citiation

If you publish results using this question please cite:

Campos-Gottardo, R. & Kiss, S. (2025). Occupations Qualtrics Module for Canadian Political Science Surveys. GitHub repository: https://github.com/RafaelGottardo/occupations-qualtrics


Professions Canadiennes dans Qualtrics

Ceci est une implémentation de Select2 conçue pour recueillir les professions et les codes de la Classification nationale des professions (CNP), à utiliser dans la recherche sur l’opinion publique au Canada. Une version de cette implémentation a été incluse dans la Étude électorale canadienne de 2025 (EEC), permettant une comparaison entre les résultats des sondages et ceux de l’EEC.

Vous pouvez prévisualiser ce module en anglais ou en français.

Si vous rencontrez des problèmes ou avez des questions, veuillez soumettre une issue sur ce dépôt.

Implémentation dans Qualtrics

  1. Modifiez l’en-tête personnalisé pour inclure le code suivant afin d’activer Select2 :

html <!-- Select2 CSS --> <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" /> <!-- jQuery (requis par Select2) --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- JavaScript Select2 --> <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>

  1. Modifiez le pied de page personnalisé pour inclure le code suivant afin de charger les données.

<script src="https://rafaelgottardo.github.io/occupations-qualtrics/occupations.js"></script>

  1. Créez une question de type "Entrée de texte" à ligne unique
  2. Modifiez le JavaScript de la question "Entrée de texte" Collez le contenu de questionjavascriptfr dans le champ JavaScript de la question. Les noms de professions et les codes CNP sont tirés de occupations_fr.js. Assurez-vous de remplacer toutes les occurrences de QID1 par l’ID de la question sur les professions dans votre sondage.

Pour utiliser la méthode en anglais, utilisez plutôt le code de question_javascript, qui utilise occupations.js.

  1. (Optionnel) Ajouter une question de confirmation après la question sur la profession

Nous ajoutons une question de confirmation pour s’assurer que la profession et le secteur d’activité de l’individu ont été correctement identifiés. Cette question permet aux répondants de vérifier la catégorie professionnelle qui leur a été assignée et de la corriger au besoin. Elle leur donne aussi la possibilité d’entrer une profession différente si la leur n’apparaissait pas dans la liste.

```text Vous avez entré ${e://Field/occupation-name}, qui correspond à ${e://Field/occupation-category}. Est-ce correct ?

Si ce n'est pas le cas, revenez à la question précédente.

Si votre profession ne figurait pas dans la liste, veuillez l'entrer ci-dessous : ```

  1. Téléchargement des données

Les données recueillies par la question sur la profession n’apparaîtront pas dans les réponses par défaut de Qualtrics, mais uniquement dans les données intégrées ou lors du téléchargement des données.

Citation

Si vous publiez des résultats basés sur cette question, veuillez citer :

Campos-Gottardo, R. & Kiss, S. (2025). Occupations Qualtrics Module for Canadian Political Science Surveys. GitHub repository: https://github.com/RafaelGottardo/occupations-qualtrics

License

This repository is dual-licensed to support both academic credit and open-source reuse.

Owner

  • Name: Rafael Campos-Gottardo
  • Login: RafaelGottardo
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Campos-Gottardo"
  given-names: "Rafael"
  orcid: "https://orcid.org/0000-0002-0632-1070"
- family-names: "Kiss"
  given-names: "Simon"
  orcid: "https://orcid.org/0000-0003-1837-5428"
title: "Occupations Qualtrics Module for Canadian Political Science Surveys"
version: 1.0.0
doi: 10.5281/zenodo.1234
date-released: 2025-07-30
url: "https://github.com/RafaelGottardo/occupations-qualtrics"

GitHub Events

Total
  • Issues event: 2
  • Issue comment event: 1
  • Push event: 16
  • Fork event: 1
  • Create event: 2
Last Year
  • Issues event: 2
  • Issue comment event: 1
  • Push event: 16
  • Fork event: 1
  • Create event: 2