Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A spreadsheet usually created by CLOSER using this template which contains all the questions, variables and topic list, is sent to the studies to help with creating the mappings. When the completed mappings have been returned by the study, these are checked for:

  • Gaps in mappings
    • questions which have not been mapped to variables
    • questions which have not been mapped to topics
    • variables which have not been mapped to topics
  • Any obviously incorrect topic mappings 

If there are issues to resolve, the spreadsheet it then sent back to the study to complete. The finalised Excel file is then reformatted into the qv.txt, tv.txt, tq.txt and dv.txt as described below. They are then loaded into Archivist as descried below, and checked for any conflicts or gaps. If there are any issues, the all_mappings.txt (e.g. ncds_65_eq_all_mappings.txt) is downloaded and used to highlight these to the study. This includes all questions and all variables, even if they are not mapped but doesn't include any derived variable mappings. Topics will also need to be added. Note that there are sometimes carriage returns in the file which will need to be removed, so the file can be opened properly in Excel. 

Question to Variable mappings

These are loaded by navigating to Admin > Instruments > search for the instrument prefix > IMPORT MAPPINGS. Choose files and select the qv.txt file you want to import. See format specifications below for details of the qv.txt file. You can also select to import question to topic mappings tq.txt at the same time. From the dropdown select whether the file is Q-V Mapping or T-Q Mapping. Note. : the Heroku in-out-worker server must be turned on for the files to be imported. The state will change from pending, to running, then to success or failure once imported. If the state is failure, VIEW LOGS under Actions. The state will be failure if the whole file fails and or if there is only one invalid record (row) in the file. 

...

  • The incorrect file has been selected
  • The incorrect mapping type has been selected
  • The file format is not correct
  • The instrument and dataset is not linked in Archvist
  • The content is not valid
    • The names are not the correct case
    • The variable in not in the dataset
    • Typos or spaces in the names

Depending on the number of invalid records, if there are only a couple of issues, then you can fix these by using the Archivist interface see Map Questions, Variables and Topics, If there are many, systematic or file related issues, then update the qv.txt file and re-import.

Note: when When re-importing, the current mappings will be replaced, so you must include all the question to variables you want to import in the file, not only the records (rows) you want to update. 

...

Questions and variables which are mapped together must have the same topic. Questions which are mapped to a variable which has been mapped linked to a topic, will automatically inherit that topic from the variableAfter the question to variables have been imported successfully, it makes sense to add the variable topic mappings which will then be inherited by the questions will inherit those topics. These are loaded by navigating to Admin > Datasets> search for the dataset prefix > IMPORT MAPPINGS. Choose files and select the tv.txt file you want to import. See format specifications below for details of the tv.txt file. You can also select to import derived variable mappings dv.txt at the same time. From the dropdown select whether the file is T-V Mapping or D-V Mapping. Note. : the Heroku in-out-worker server must be turned on for the files to be imported. The state will change from pending, to running, then to success or failure once imported. If the state is failure, VIEW LOGS under Actions. The state will be failure if the whole file fails and or if there is only one invalid record (row) in the file. 

...

Depending on the number of invalid records, if there are only a couple of issues, then you can fix these by using the Archivist interface see Map Questions, Variables and Topics, If there are many, systematic or file related issues, then update the tv.txt file and re-import.

Note: when When re-importing, the previous imported topic mappings will not be replaced unless they have been updated in the file. 

...

These are loaded by navigating to Admin > Instruments> search for the instrument prefix > IMPORT MAPPINGS. Choose files and select the tq.txt file you want to import. See format specifications below for details of the tq.txt file. You can also select to import the question to variable mappings qv.txt at the same time. From the dropdown select whether the file is T-Q Mapping or Q-V Mapping. Note. the Heroku in-out-worker server must be turned on for the files to be imported. The state will change from pending, to running, then to success or failure once imported. If the state is failure, VIEW LOGS under Actions. The state will be failure if the whole file fails and or if there is one invalid record (row) in the file, see common reasons listed above. 

Depending on the number of invalid records, if there are only a couple of issues, then you can fix these by using the Archivist interface see Map Questions, Variables and Topics, If there are many, systematic or file related issues, then update the tq.txt file and re-import.

Note: if If you map to 0 (i.e. no topic), this will give an invalid error, but it will map the question to 0, this way you can reset the mapping back to no mappings. Not this This is not the same as None topic. 

Note. when When re-importing, the current question to topic mappings will be replaced, so you must include all the question to topic mappings you want to import in the file, not only the records (rows) you want to update. 

...

Derived variable mappings

Variables which Derived variables do not directly map to a question, but are created using other variables are derived. A derived variable will have at least two source variables mapped to it. These are loaded by navigating to Admin > Datasets> search for the dataset prefix > IMPORT MAPPINGS. Choose files and select the dv.txt file you want to import. See format specifications below for details of the dv.txt file. You can also select to import question to topic mappings tv.txt at the same time. From the dropdown select whether the file is D-V Mapping or T-V Mapping. Note. : the Heroku in-out-worker server must be turned on for the files to be imported. The state will change from pending, to running, then to success or failure once imported. If the state is failure, VIEW LOGS under Actions. The state will be failure if the whole file fails and or if there is only one invalid record (row) in the file. 

...