drnikki / open-demographics

Open Demographics Initiative: An open standard for collecting identity/demographic data in open source communities.
http://open-demographics.com
Creative Commons Attribution Share Alike 4.0 International
107 stars 33 forks source link

Populating response values from other sources when consuming the machine readable version #47

Open hestenet opened 6 years ago

hestenet commented 6 years ago

As I went through an exercise of converting questions to JSON, I discovered there are some questions where the person implementing the questionnaire may want to populate the responses with a different source of answers. For example, when presenting a list of countries for the location question, the developer implementing the questionnaire may want to use a standardized list of countries from their own account registration process.

My current thinking is that this is somehow accommodated in the machine readable format by simply not specifying any 'choices' but other ideas or examples from the real world would be welcome.

  "category-location": {
    "id": "location",
    "short-description": "The person's location.",
    "long-description": "The respondent's country of residence and local environment.",
    "questions": {
      "country": {
        "type": "country",
        "self-identify": "false",
        "prefer-not-to-answer": "false",
        "does-not-apply": "false",
        "prompt": "Please choose your country of residence"
      },
      "local-environment": {
        "type": "select-one",
        "self-identify": "false",
        "prefer-not-to-answer": "false",
        "does-not-apply": "false",
        "prompt": "Which word best describes the area where you live and work?",
        "choices": {
          "full-set": [
            {
              "id": "rural",
              "value": "rural",
              "label": "Rural"
            },
            {
              "id": "suburban",
              "value": "suburban",
              "label": "Suburban"
            },
            {
              "id": "urban",
              "value": "urban",
              "label": "Urban"
            }
          ]
        }
      }
    }
  },
drnikki commented 6 years ago

@hestenet thanks for this. Thinking of the "standard" feed and a "local" feed, getting combined with something like an array merge - I wonder if we supply our options and the consumer overwrites as needed?