{"id":398,"date":"2016-11-16T17:54:58","date_gmt":"2016-11-16T23:54:58","guid":{"rendered":"http:\/\/justinwiegand.com\/blog\/?p=398"},"modified":"2026-03-10T22:25:04","modified_gmt":"2026-03-11T05:25:04","slug":"a-scripted-solution-to-onet-occupation-coding","status":"publish","type":"post","link":"https:\/\/justinwiegand.com\/blog\/?p=398","title":{"rendered":"A Scripted Solution to O*NET Occupation Coding"},"content":{"rendered":"<p>Do you collect occupation or job titles and recode to O*NET? \u00a0If you do, you know the process is tedious and time-consuming. \u00a0Multiple raters should be used and even in the best cases, unnecessary error is added by the re-coding process.<\/p>\n<p>In an effort to let survey respondents decide on the closest\u00a0O*NET occupation themselves, I&#8217;ve come up with the following solution. \u00a0This should integrate with all of the major survey services (they just need to allow scripts to run within the survey). \u00a0I use this with LimeSurvey personally. \u00a0Please share\u00a0any improvements!<\/p>\n<p>Embed the following as script within a short answer\/free text question:<\/p>\n<pre>&lt;div id=\"realcontent\"&gt;\r\n\r\n&lt;div id=\"content\"&gt;\r\n\r\n&lt;h3 style=\"text-align: center;\"&gt;&lt;span style=\"font-size:18px;\"&gt;&lt;span style=\"color:#000000;\"&gt;&lt;u&gt;READ THESE\u00a0INSTRUCTIONS CAREFULLY BEFORE ENTERING ANY TEXT!&lt;\/u&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/h3&gt;\r\n\r\n&lt;p&gt;&lt;span style=\"color:#000000;\"&gt;&lt;span style=\"font-size:14px;\"&gt;Follow the steps below to select an occupation from a\u00a0standardized list that is the &lt;em&gt;best &lt;\/em&gt;match to your own job. \u00a0You will copy\u00a0a code from the search results\u00a0to complete this item.&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;\r\n\r\n&lt;p&gt;&lt;span style=\"color:#000000;\"&gt;&lt;span style=\"font-size:14px;\"&gt;Here's how it works:&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;\r\n\r\n&lt;ol&gt;\r\n\r\n&lt;li&gt;&lt;span style=\"color:#000000;\"&gt;&lt;span style=\"font-size:14px;\"&gt;Enter your job title in the search box\u00a0and &lt;strong&gt;click&lt;\/strong&gt; to search a list of standardized occupational titles.&lt;\/span&gt;&lt;\/span&gt;&lt;\/li&gt;\r\n\r\n&lt;li&gt;&lt;span style=\"color:#000000;\"&gt;&lt;span style=\"font-size:14px;\"&gt;Search results\u00a0will open a new tab in your browser so you don't have to worry about the\u00a0survey closing. \u00a0&lt;em&gt;You might need to allow pop-ups from this site.&lt;\/em&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/li&gt;\r\n\r\n&lt;li&gt;&lt;span style=\"color:#000000;\"&gt;&lt;span style=\"font-size:14px;\"&gt;Scan through the occupations listed from your search.\u00a0\u00a0Feel free to click on any of them for more information. \u00a0Once you decide on the best matching occupation copy its code and return to this page. \u00a0&lt;strong&gt;The code is listed to the left of the occupation name.&lt;\/strong&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/li&gt;\r\n\r\n&lt;\/ol&gt;\r\n\r\n&lt;\/div&gt;\r\n\r\n&lt;\/div&gt;\r\n\r\n&lt;div class=\"search-wrapper\" style=\"background:#FFFFFF; padding: 20px; margin: 20px; color: #2C3E50;\"&gt;&lt;span style=\"color:#000000;\"&gt;&lt;input class=\"tftext\" id=\"tftextinput\" maxlength=\"120\" placeholder=\"Enter Your Job Title...\" size=\"26\" style=\"border:1px solid #233140;\" type=\"text\" \/&gt;&lt;button id=\"tfbutton\" style=\"margin-left:8px;\" type=\"button\" value=\"Search O*NET Occupations\"&gt;Click to search for a standardized occupational title&lt;\/button&gt;\u00a0&lt;\/span&gt;&lt;\/div&gt;\r\n\r\n&lt;script type=\"text\/javascript\" charset=\"utf-8\"&gt;\r\n\r\n$(document).ready(function() {\r\n\r\n$('#tfbutton').on('click', function(e) {\r\n\r\ne.preventDefault();\r\n\r\nvar b = $('#tftextinput').val();\r\n\r\nwindow.open(\"http:\/\/www.onetonline.org\/find\/quick?s=\"+b)\r\n\r\n});\r\n\r\n});\r\n\r\n&lt;\/script&gt;<\/pre>\n<p>Now, make another short answer\/free text question to be displayed on the same page that says something along the lines of:<\/p>\n<p>\u201cNow 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&#8217;t add spaces before or after the code).\u201d<\/p>\n<p>For this answer you should validate that it follows an O*NET code format (e.g., ##-####.##). \u00a0The specific validation text for use in LimeSurvey is: \u00a0 \/^[1-5][0-9]-[0-9][0-9][0-9][0-9].[0-9][0-9]$\/<\/p>\n<p>Click <a href=\"http:\/\/justinwiegand.com\/occSearch.php\">here<\/a> for a working example of the search box.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you collect occupation or job titles and recode to O*NET? \u00a0If you do, you know the process is tedious and time-consuming. \u00a0Multiple 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&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"A Scripted Solution to O*NET Occupation Coding","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[32,27],"tags":[97,100,99,98],"class_list":["post-398","post","type-post","status-publish","format-standard","hentry","category-guides","category-syntaxprogramming","tag-javascript","tag-limesurvey","tag-onet","tag-script"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p51adQ-6q","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=398"}],"version-history":[{"count":8,"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/398\/revisions"}],"predecessor-version":[{"id":891,"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/398\/revisions\/891"}],"wp:attachment":[{"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/justinwiegand.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}