Capturing an interview location

You can set up an online survey so that you can store the location where the interview is conducted.

This only works if the survey is running on a device which can capture geolocation information, such as a GPS-enabled tablet. You could either use a web browser to view the survey or use the Interviewer app to run the survey on the mobile device.

This facility is most useful when you wish to record geolocations when carrying out interviews with using the Interviewer app.

Setting up the location variable

Location variables are only useful if you are creating an online survey that is used on a mobile device, or a mobile survey for the Interviewer app. Location data is only available in Snap XMP Online and Interviewer editions.

  1. Select a mobile edition in your questionnaire.
  2. Click QuestionnairePropsIcon.png to display the Questionnaire Properties dialog box.
  3. Scroll down the options on the left to find the Paradata section.
  4. Highlight the Geolocation field and check the box marked Use in survey.
Display the Geolocation paradata in the questionnaire
  1. Press OK to return to the questionnaire.
  2. The ID.location variable will appear below the title.
Select the location paradata question name
  1. To hide the variable name on the questionnaire, highlight the text ID.location, and select the Show toolbar option.
  2. Select Name in the next dropdown list if not displayed and uncheck the Show box. The ID.location text will be hidden.
  3. Change the default text to “Current location: please wait until the location has been found.” This will ensure that the interviewer allows the device some time to find the location.
  4. Click Save SaveIcon.png to save the changes to the questionnaire.

Configure the GPS timeout and accuracy

The two main methods of getting a location are using GPS or using information from mobile phone masts. GPS is more accurate but uses more battery power.

Note: Unless you know who is running your survey and what device it will run on, you cannot be sure whether the device running the survey has either of these methods enabled.

You can set a time limit on how long the survey will spend looking for location information and how accurate you would like the information to be.

  1. Click QuestionnairePropsIcon.png to display the Questionnaire Properties dialog box.
  2. Scroll down the options on the left to find the Paradata section.
Configure the geolocation paradata in questionnaire properties
  1. Highlight the Geolocation field and click Configure to open the Configure Geolocation dialog
Configure geolocation
  1. Set Timeout to how long (in seconds) that you want the device to keep searching for a location. The longer it searches the more battery it uses.
  2. Set Target accuracy to the precision that you would like to try and achieve. This is only a guide as the device may not be able to be this accurate.
  3. Press OK to return to the questionnaire.

You have no control over whether people permit the survey to use geolocation information, or whether their device is able to provide accurate geolocation information. If people are looking at surveys with a PC, the location provided may be that of a router.

Using location data in analyses

Geolocation data is captured in the ID.location variable in WGS84 (World Geodesic System) format. You can export the variable data for further analysis. The variable can either contain location data or an error code if the location data was not found.

You can extract the separate elements of the location data by using the system patterns geo unavailable and geolocation provided.

Element Text
Latitude ID.location as geo latitude
Longitude ID.location as geo longitude
Altitude ID.location as geo altitude
± Accuracy of location in meters ID.location as geo accuracy
Error code ID.location as geo unavailable

Example

Create a derived variable to extract the longitude to 3 decimal places. You need to add the paradata ID.location to your survey as a prerequisite.

  1. Click VariablesIcon.png to display the Variables Window.
  2. Click NewSurveyIcon.png to add a new variable.
  3. Specify the Variable Details:
    • Name: Latitude
    • Label: Latitude
    • Type: Derived (the variable will derive its data from other existing variables).
    • Response: Quantity
    • Decimals: To access the Decimals field, click DesignModeIcon.png . Change the figure from 0 to 3.
  4. In the Code list, alongside the label Not asked, enter the value “unless ((ID.location as geo unavailable == “”)” to check that you are using a valid location.
  5. In the Code list, alongside the label Valid, enter the value “ID.Location as geo latitude”. This returns the latitude of the interview location, which you can use for analysis and reporting.
  1. Click Save SaveIcon.png to save the variable.

Exporting the location data

A common use for geolocation data is to export the data and use it with a mapping API, such as Google Maps. You can export the data directly in WGS84 format, or you can create derived variables to convert the data to a specified format.

  1. On the Snap XMP Desktop toolbar, click Data Entry DataEntryIcon.pngto open the Data Entry window.
  2. Select File | Export to display the Data Export dialog.
  1. In Format, select the file format for the data export.
  2. Select File as the destination and enter an appropriate filename.
  3. In Content, enter the name of the variable(s) to export. The example shows ID.location
  4. Click OK to export the location data.
Contents