<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/stats-nz-encouraging-active-sharing-for-microdata-access-projects/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://ellisp.github.io/blog/2017/06/17/microdata-access"> Peter's stats stuff - R</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<h3>The Integrated Data Infrastructure (IDI) is an amazing research tool</h3>
<p>One of New Zealand’s most important data assets is the <a rel="nofollow" href="http://www.stats.govt.nz/browse_for_stats/snapshots-of-nz/integrated-data-infrastructure.aspx" target="_blank">integrated data infrastructure</a>:</p>
<blockquote>
<p>“The Integrated Data Infrastructure (IDI) is a large research database containing microdata about people and households. Data is from a range of government agencies, Statistics NZ surveys including the 2013 Census, and non-government organisations. The IDI holds over 166 billion facts, taking up 1.22 terabytes of space – and is continually growing. Researchers use the IDI to answer complex questions to improve outcomes for New Zealanders.”</p>
</blockquote>
<p><em>Quote from <a rel="nofollow" href="http://www.stats.govt.nz/browse_for_stats/snapshots-of-nz/integrated-data-infrastructure.aspx" target="_blank">Stats NZ</a></em></p>
<p>The data already linked to the IDI “spine” is impressive:</p>
<p><a rel="nofollow" href="http://www.stats.govt.nz/browse_for_stats/snapshots-of-nz/integrated-data-infrastructure/idi-data.aspx" target="_blank"><img src="https://i0.wp.com/ellisp.github.io/img/data-in-idi-oct-16.png?w=100%25" data-recalc-dims="1"></a></p>
<h3>Security and access is closely controlled</h3>
<p>The IDI can be accessed only from a small number of very secure datalabs with frosted windows and heavy duty secure doors. We have one of these facilities at my workplace, the Social Investment Unit (to become the Social Investment <em>Agency</em> from 1 July 2017). <em>Note/reminder: as always, I am writing this blog in my own capacity, not representing the views of my employer</em>.</p>
<p>User credentials and permissions are closely guarded by Stats NZ and need to be linked to clearly defined public-good (ie non-commercial) <a rel="nofollow" href="http://www.stats.govt.nz/browse_for_stats/snapshots-of-nz/integrated-data-infrastructure/researchers-using-idi.aspx" target="_blank">research projects</a>. All output is checked by Stats NZ against <a rel="nofollow" href="http://www.stats.govt.nz/tools_and_services/microdata-access/data-lab/microdata-output-guide.aspx" target="_blank">strict rules for confidentialisation</a> (eg random rounding; cell suppression in specified situations; no individual values even in scatter charts; etc) before it can be taken out of the datalab and shown to anyone. All this is quite right – even though the IDI does not contain names and addresses for individuals (they are stripped out after matching, before analysts get to use the data) and there are strict rules against trying to reverse the confidentialisation, it does contain very sensitive data and must be closely protected to ensure continued social permission for this amazing research tool.</p>
<h3>More can be done to build capability, including by sharing code</h3>
<p>However, while the security restrictions are necessary and acceptable, other limitations on its use can be overcome – and Stats NZ and others are working to do so. The biggest such limitation is <em>capability</em> – skills and knowledge to use the data well.</p>
<p>The IDI is a largish and complex SQL Server datamart, with more than 40 origin systems from many different agencies (mostly but not all of them government) outside of Stats NZ’s direct quality control. Using the data requires not just a good research question and methodology, but good coding skills in SQL plus at least one of R, SAS or Stata. Familiarity with the many data dictionaries and metadata of varied quality is also crucial, and in fact is probably the main bottleneck in expanding IDI usage.</p>
<p>A typical workflow includes a data grooming stage of hundreds of lines of SQL code joining many database tables together in meticulously controlled ways before analysis even starts. That’s why one of the objectives at my work has been to create assets like the “Social Investment Analytical Layer”, a repository of code that creates analysis-ready tables and views with a standardised structure (each row a combination of an individual and an “event” like attending school, paying tax, or receiving a benefit) to help shorten the barrier to new analysts.</p>
<p>We <a rel="nofollow" href="https://github.com/nz-social-investment-unit/social_investment_analytical_layer" target="_blank">publish that and other code with a GPL-3 open source license on GitHub</a> and have plans for more. Although the target audience of analysts with access to the IDI is small, documenting and tidying code to publication standard and sharing it is important to help that group of people grow in size. Code sharing until recently has been ad hoc and very much depending on “who you know”, although there is a Wiki in the IDI environment where key snippets of data grooming code is shared. We see the act of publishing on GitHub as taking this to the next step – amongst other things it really forces us to document and debug our code very thoroughly!</p>
<h3>Stats NZ is showing leadership on open data / open science</h3>
<p>Given the IDI is an expensive taxpayer-created asset, my personal view is that all code and output should be public. So I was very excited a few weeks back when Liz MacPherson, the Government Statistician (a statutory position responsible for New Zealand’s official statistics system, and also the Chief Executive of Stats NZ) sent out an email to researchers “encouraging active sharing for microdata access projects” including the IDI.</p>
<p>I obtained Liz’s permission to reproduce the full text of her email of 29 May 2017:</p>
<div>
<hr>
<p><b>Subject:</b> Stats NZ: Encouraging active sharing for microdata access projects</p>
<p>Stats NZ is all about unleashing the power of data to change lives. New Zealand has set a clear direction to increase the availability of data to improve decision making, service design and data driven innovation.<br>
To support this direction, Stats NZ is moving to an open data / open science environment, where research findings, code and tables are shared by default.</p>
<p>We are taking steps to encourage active sharing for microdata access projects. All projects that are approved for access to microdata will be asked to share their findings, code and tables (once confidentiality checked).</p>
<p>The benefits of sharing code and project findings to facilitate reproducible research have been identified internationally, particularly among research communities looking to grow access to shared tools and resources. To assist you with making code open there is guidance available on how to license and use repositories like GitHub in the New Zealand Government Open Access and Licensing (NZGOAL) Framework – Software Extension.</p>
<p>Stats NZ is proud to now be leading the Open Data programme of work, and as such wants to ensure that all tables in published research reports are made available as separate open data alongside the reports for others to work with and build on.<br>
There are many benefits to sharing: helping to build communities of interest where researchers can work collaboratively, avoid duplication, and build capability. Sharing also provides transparency for the use that is made of data collected through surveys and administrative sources, and accountability for tax-payer dollars that are spent on building datasets and databases like the IDI.</p>
<p>One of the key things Stats NZ checks for when assessing microdata access applications is that there is an intention to make the research findings available publicly. This is why the application form asks about intended project outputs and plans for dissemination. </p>
<p>While I have been really pleased to see the use that is made of the IDI wiki and Meetadata, the sharing of findings, code and tables is still disproportionately small in relation to the number of projects each year. This is why I am taking steps to encourage sharing. Over time, this will become an expectation.</p>
<p>More information will be communicated by the Integrated Data team shortly by email, at the IDI Forums and on Meetadata. </p>
<p>In the meantime, if you have any suggestions about how to make this process work for all, or if you have any questions, please contact ….., Senior Manager, Integrated Data ……</p>
<p>Warm regards</p>
<p>Liz</p>
<p>Liz MacPherson</p>
<p>Government Statistician/Chief Executive</p>
<p><a rel="nofollow" href="http://stats.govt.nz/" target="_blank">Stats NZ Tatauranga Aotearoa</a> </p>
<hr>
</div>
<p>This is great news, and a big step in the right direction. It really is impressive for the Government Statistician to be promoting reproducibility and open access to code, outputs and research products. I look forward to seeing more microdata analytical code sharing, and continued mutual support for raising standards and sharing experience.</p>
<p>Now to get version control software into the datalab environment please! (and yes, there is a Stats NZ project in flight to fix this critical gap too). My views on the critical importance of version control are set out in <a rel="nofollow" href="http://ellisp.github.io/blog/2016/09/16/version-control" target="_blank">this earlier post</a>…</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://ellisp.github.io/blog/2017/06/17/microdata-access"> Peter's stats stuff - R</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/4g7FasuvZbA" height="1"></a></div>