{"id":1279,"date":"2022-02-14T11:37:13","date_gmt":"2022-02-14T10:37:13","guid":{"rendered":"https:\/\/microdata.spirehost.no\/?post_type=eksempel&#038;p=1279"},"modified":"2023-09-14T15:27:07","modified_gmt":"2023-09-14T14:27:07","slug":"collect-information-on-ongoing-education","status":"publish","type":"eksempel","link":"https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/","title":{"rendered":"Collect information on ongoing education"},"content":{"rendered":"\n<p>Information about ongoing education (so-called course data) is available with courses as unit level (with associated course identifier). Courses are given by the combination of person x course type, where each individual can in practice be represented by several course types at the same time.<\/p>\n\n\n\n<p>Since course data does not have a person as a unit, these cannot be imported into personal datasets in the usual way, but must be connected using the\u00a0<code>merge<\/code>\u00a0command.<\/p>\n\n\n\n<p>First, you have to add a link between the course ID and the person ID on the course data. You then have to aggregate up to person level using the command\u00a0<code>collapse<\/code>\u00a0before finally connecting to the personal dataset.<\/p>\n\n\n\n<p>In the example, a personal dataset is first created consisting of people residing in Norway (<code>regstatus == '1'<\/code>) as of 2021-01-01. A history of ongoing education is then retrieved for the entire year 2021, where you select for education at a higher level (master&#8217;s or higher, level 7 and 8). The command <code>collapse(count)<\/code> is used to count the number of observations with ongoing education per individual over the year 2021, and the result is then linked to the person dataset for further analysis.<\/p>\n\n\n\n<p>NB! Note that the kurstype (course type) variable after using <code>collapse<\/code> will consist of values \u200b\u200bfor the relevant statistic being run, in this case the number of observations (<code>count<\/code>).<\/p>\n\n\n<div id=\"rose-block_6ba74829aa698fbba0f40b9bc4baed90\" class=\"rose-code codeblock-wrapper\">\n<pre tabindex=\"0\" class=\"codeblock\"><code>\/\/Kobler til databank\r\nrequire no.ssb.fdb:23 as db\r\n\r\n\/\/Oppretter persondatasett for bosatte per 2020-01-01\r\ncreate-dataset bosatte\r\nimport db\/BEFOLKNING_KJOENN as kj\u00f8nn\r\nimport db\/BEFOLKNING_STATUSKODE 2020-01-01 as regstatus\r\nkeep if regstatus == '1'\r\n\r\n\/\/Henter personer som tar h\u00f8yere utdanning i l\u00f8pet av 2020\r\ncreate-dataset kursdata\r\nimport-event db\/NUDB_KURS_NUS 2020-01-01 to 2020-12-31 as kurstype\r\ndestring kurstype\r\nkeep if kurstype >= 700000 & kurstype < 900000\r\n\r\n\/\/Kobler p\u00e5 lenke mellom kurs-id og f\u00f8dselsnumre\r\ncreate-dataset lenke_kurs_person\r\nimport db\/NUDB_KURS_FNR as fnr\r\nmerge fnr into kursdata\r\n\r\n\/\/Lager statistikk (collapser) over antall hendelser med h\u00f8y utdanning per individ, og kobler dette p\u00e5 persondatasettet\r\nuse kursdata\r\ncollapse (count) kurstype, by(fnr)\r\nrename kurstype ant_kurs\r\nmerge ant_kurs into bosatte\r\n\r\n\/\/Lager tabell over antall personer som tok h\u00f8y utdanning i l\u00f8pet av 2020\r\nuse bosatte\r\ngenerate utdanning_h\u00f8y = 0\r\nreplace utdanning_h\u00f8y = 1 if ant_kurs >= 1\r\ntabulate utdanning_h\u00f8y kj\u00f8nn<\/code><\/pre>\n<\/div>","protected":false},"parent":0,"menu_order":97,"template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":""},"class_list":["post-1279","eksempel","type-eksempel","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Collect information on ongoing education - microdata.no<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Collect information on ongoing education - microdata.no\" \/>\n<meta property=\"og:description\" content=\"Information about ongoing education (so-called course data) is available with courses as unit level (with associated course identifier). Courses are given by the combination of person x course type, where each individual can in practice be represented by several course types at the same time. Since course data does not have a person as a...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/\" \/>\n<meta property=\"og:site_name\" content=\"microdata.no\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-14T14:27:07+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/eksempel\\\/collect-information-on-ongoing-education\\\/\",\"url\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/eksempel\\\/collect-information-on-ongoing-education\\\/\",\"name\":\"Collect information on ongoing education - microdata.no\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#website\"},\"datePublished\":\"2022-02-14T10:37:13+00:00\",\"dateModified\":\"2023-09-14T14:27:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/eksempel\\\/collect-information-on-ongoing-education\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.microdata.no\\\/en\\\/eksempel\\\/collect-information-on-ongoing-education\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/eksempel\\\/collect-information-on-ongoing-education\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hjem\",\"item\":\"https:\\\/\\\/www.microdata.no\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Collect information on ongoing education\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.microdata.no\\\/#website\",\"url\":\"https:\\\/\\\/www.microdata.no\\\/\",\"name\":\"microdata.no\",\"description\":\"Gj\u00f8r det enklere \u00e5 analysere registerdata\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.microdata.no\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Collect information on ongoing education - microdata.no","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/","og_locale":"en_US","og_type":"article","og_title":"Collect information on ongoing education - microdata.no","og_description":"Information about ongoing education (so-called course data) is available with courses as unit level (with associated course identifier). Courses are given by the combination of person x course type, where each individual can in practice be represented by several course types at the same time. Since course data does not have a person as a...","og_url":"https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/","og_site_name":"microdata.no","article_modified_time":"2023-09-14T14:27:07+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/","url":"https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/","name":"Collect information on ongoing education - microdata.no","isPartOf":{"@id":"https:\/\/www.microdata.no\/#website"},"datePublished":"2022-02-14T10:37:13+00:00","dateModified":"2023-09-14T14:27:07+00:00","breadcrumb":{"@id":"https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.microdata.no\/en\/eksempel\/collect-information-on-ongoing-education\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hjem","item":"https:\/\/www.microdata.no\/en\/"},{"@type":"ListItem","position":2,"name":"Collect information on ongoing education"}]},{"@type":"WebSite","@id":"https:\/\/www.microdata.no\/#website","url":"https:\/\/www.microdata.no\/","name":"microdata.no","description":"Gj\u00f8r det enklere \u00e5 analysere registerdata","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microdata.no\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"taxonomy_info":[],"featured_image_src_large":[],"author_info":[],"comment_info":"","_links":{"self":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/eksempel\/1279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/eksempel"}],"about":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/types\/eksempel"}],"wp:attachment":[{"href":"https:\/\/www.microdata.no\/en\/wp-json\/wp\/v2\/media?parent=1279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}