Skip to main content

FV Decipher Support

All the topics, resources needed for FV Decipher.

FocusVision Knowledge Base

Recover

1:  About Recover

All partial complete data is stored in a state.db file that resides in the survey directory. You can extract that data via the recover program.

Here is how the program is run:

[user] ~/v2$ recover -q q12 -k source 9d3/proj13002/rec
I will restore the data to: 9d3/proj13002/rec/
I will use the state file:  9d3/proj13002/data/state.db
OK? (Y/N) Y

Opening 9d3/proj13002/date/state.db...
11512 records found
Filtering records that have answered question q12 ('ans148.0.0')
Filtering: *************************************************.
975 records remain.
Uniquifying: ************************************************..
613 unique records remain
Removing completed: ************************************************..
578 records remain
Appending records: **********************************************....

The "rec" subdirectory should be set up by running copy-survey. The state.db file should remain in the original survey. recover will search for it there (if you want to search in another location, use -f location).

So: given question to check for (-q q12) we find all the state entries that have this question answered. This happens to be only them that re-submitted the final page -- if they filled out the answers and went ahead, they wouldn't have q12 stored.

We also use -k source to make things unique per source.

We start out with 11512 raw records in the database. These records are created each time a page is displayed.

975 remain when we filter only those with q12 answered. So the remaining are intermediate pages.

Then the records are made unique, so people that answered the survey multiple times with the same source are not included. We're left with 613 records.

Then we remove the people who are in the results file after all, maybe they took the survey after it was fixed.

We're left with 578 records which are appended to the results.bin file. Everything but the timestamp should be recovered.

If you run this report:

 http://v2.decipherinc.com/report/9d3/proj13002/rec?config=VW2iBw&run=1

you can see the normal segment vs the recovered segment.

2:  Recover with intention to notify users

It is possible to use the -S switch to extract abandoners and contact them:

At some desired time, run the recover program, selecting those users you want to recover using the normal switches (i.e. -q to require a certain question answered, -k to specify source or whatever as the unique variable).

But also, add the switch -S source (or -S source,someotherVariable -- it takes a comma-separated list of extraVariables).

The recover program will then, in addition to recovering those lost individuals, write a text file containing this data (named statedump.txt in the directory of the survey):

source  state
777     38e102f845250487457bcb34d6c14eb8

This means that for the user with source "777" that did not complete the survey, we have in our database stored results under the id "38e102f845250487457bcb34d6c14eb8".

Then generate this URL:

http://v2.decipherinc.com/survey/...?state=38e102f845250487457bcb34d6c14eb8&_restart=1

By following this link you will load all that user's partially completed data. The _restart asks v2 to display the page from the beginning again (otherwise what you'd see is the equivalent of pressing Submit on that page with no data).

Notes:

1) the -S switch only allows for extraVariables to be extracted. If you need to merge this with an email address list, you must do that yourself.

2) The state.db file, from which this information is extracted is very large. Thus, it is automatically and irrecoverably removed 21 days after the last submission to a survey. So you don't want to delay too much after closing a survey before performing this procedure.

3:  Recovery timestamp

Our partial data file does not include a timestamp of when that respondent last was seen. Instead we recover the start time of that respondent, if possible. If you want to recover respondents with the current time instead, use the -D flag.

4:  Prefixing markers

The -p option prefixes qualified and /quota/cell markers with HAD: so they don't count as qualified/in quotas.

5:  Adding logged-in respondents

Per default respondents with the _NO_SUBMIT marker (set if someone is logged in with permissions to this survey while the survey is live and thus presumed to be a survey stakeholder that cannot submit data) are NOT RECOVERED. To recover them, run recover -L.

6:  Errors

In rare cases, the partial data file is partially corrupted and you get some kind of exception when recovering. You can try to run recover -E to skip the erronous records.

7:  Recovering only a subset of respondents

Run recover --only=somefile.txt to recover respondents whose uuids are only within somefile.txt. You can get a list by dowloading the variables file from the field report.

8:  Rescue mode

Sometimes, the unique numeric ID that is used to identify each question in partial data files may be lost. When this happens, recover --rescue=uidfile.txt may be used to recover the lost ID. The uid file must be a list of lines containing label = <list of uids>. You may discover lost uids using the state-dump command (here dev/state-dump). 

The following examples illustrate how to dump state (partial) data from a survey for a single uuid, some other extra variable, or for all respondents:

[user@host] here dev/state-dump . wmeqf4bukg7v0tcz 
[user@host] here dev/state-dump . ipAddress=184.106.203.86
[user@host] here dev/state-dump . all

Theuuid variable will let you examine partial data records and the data stored in each; an unnamed uid like ans1234.0.0 = 3 would indicate that there's a question that had uid=1234 whose identity is no longer known. Additionally, the uuid displays a _time entry (timestamp) for each completed page.

While in rescue mode, all the partial records for each respondent are merged, then any ansX nodes are remapped to real questions based on the uid file that is passed in.

  • Was this article helpful?