A Scripted Solution to O*NET Occupation Coding

Please cite or reference this post if you use it for publication purposes: Wiegand, J.P. (November 16, 2016). A Scripted Solution to O*NET Occupation Coding [Blog post]. Retrieved from https://justinwiegand.com/blog/?p=398

Do you collect occupation or job titles and recode to O*NET? If you do, you know the process is tedious and time-consuming. Multiple raters should be used and even in the best cases, unnecessary error is added by the re-coding process.

In an effort to let survey respondents decide on the closest O*NET occupation themselves, I’ve come up with the following solution. This should integrate with all of the major survey services (they just need to allow scripts to run within the survey). I use this with LimeSurvey personally. Please share any improvements!

Embed the following as script within a short answer/free text question:

<div id="realcontent">
<div id="content">
<h3 style="text-align: center;"><span style="font-size:18px;"><span style="color:#000000;"><u>READ THESE INSTRUCTIONS CAREFULLY BEFORE ENTERING ANY TEXT!</u></span></span></h3>
<p><span style="color:#000000;"><span style="font-size:14px;">Follow the steps below to select an occupation from a standardized list that is the <em>best </em>match to your own job. You will copy a code from the search results to complete this item.</span></span></p>
<p><span style="color:#000000;"><span style="font-size:14px;">Here's how it works:</span></span></p>
<ol>
<li><span style="color:#000000;"><span style="font-size:14px;">Enter your job title in the search box and <strong>click</strong> to search a list of standardized occupational titles.</span></span></li>
<li><span style="color:#000000;"><span style="font-size:14px;">Search results will open a new tab in your browser so you don't have to worry about the survey closing. <em>You might need to allow pop-ups from this site.</em></span></span></li>
<li><span style="color:#000000;"><span style="font-size:14px;">Scan through the occupations listed from your search. Feel free to click on any of them for more information. Once you decide on the best matching occupation copy its code and return to this page. <strong>The code is listed to the left of the occupation name.</strong></span></span></li>
</ol>
</div>
</div>
<div class="search-wrapper" style="background:#FFFFFF; padding: 20px; margin: 20px; color: #2C3E50;"><span style="color:#000000;"><input class="tftext" id="tftextinput" maxlength="120" placeholder="Enter Your Job Title..." size="26" style="border:1px solid #233140;" type="text" /><button id="tfbutton" style="margin-left:8px;" type="button" value="Search O*NET Occupations">Click to search for a standardized occupational title</button> </span></div>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#tfbutton').on('click', function(e) {
e.preventDefault();
var b = $('#tftextinput').val();
window.open("http://www.onetonline.org/find/quick?s="+b)
});
});
</script>

Now, make another short answer/free text question to be displayed on the same page that says something along the lines of:

“Now paste or type the occupation code in the box below. You must enter the code exactly as it appears online (i.e, include hyphens and decimal points and don’t add spaces before or after the code).”

For this answer you should validate that it follows an O*NET code format (e.g., ##-####.##). The specific validation text for use in LimeSurvey is: /^[1-5][0-9]-[0-9][0-9][0-9][0-9].[0-9][0-9]$/