[DDI-users] DDI tools to get SPSS to DDI 2.x

Wackerow, Joachim Joachim.Wackerow at gesis.org
Wed Jan 11 04:44:29 EST 2012


Kate,

Here are my comments:

1)
correct

2)
The output is not DDI XML, it is SPSS OMS XML. This format could be transformed in a further step into DDI XML by a XSLT stylesheet and a XSLT processor. We have a custom stylesheet for this purpose for our own use.

3)
SPSS usually cannot store the question text. It seems to be a custom solution how the file holds the questions texts (maybe VARIABLE ATTRIBUTE).
You can output the question text by the described OMS method if it is possible to display the question text with SPSS commands. Then a custom stylesheet can transform it to DDI XML.

I think the easiest way, to extract the basic metadata (no question text) of a SPSS file, is to use XCONVERT.
Either the OIR staff can run it or they provide you with a SPSS file with just one data record (SAVE AS combined with N OF CASES 1). In the latter case, the SPSS file contains the complete metadata. This approach shouldn't cause disclosure issues.

Hope this helps,
Achim

--
GESIS - Leibniz Institute for the Social Sciences
Department: Monitoring Society and Social Change
Unit: Social Science Metadata Standards
Visiting address: B2 1, 68159 Mannheim, Germany
Postal address: P.O. Box 122155, 68072 Mannheim, Germany
Phone: +49 (0)621 1246 262
Fax: +49 (0)621 1246 100
E-mail: joachim.wackerow at gesis.org
www.gesis.org/en/institute/

From: ddi-users-bounces at icpsr.umich.edu [mailto:ddi-users-bounces at icpsr.umich.edu] On Behalf Of Katherine McNeill
Sent: Dienstag, 10. Januar 2012 22:32
To: egs1 at cornell.edu; Data Documentation Initiative Users Group
Subject: Re: [DDI-users] DDI tools to get SPSS to DDI 2.x

Thanks to all for their responses.  Elliott, a couple of specific questions about your code below:

1) To specify xml, would one just change that line to read the following?
   /destination format = xml  outfile = "DatasetMetadata.xml".

2) Would this supply DDI XML?  Or just some generic XML?  If the latter, what would be the necessary steps for converting it to 2.x DDI XML code to insert into the codebook I have going in <oXygen>?

3) If the question text was embedded in the SPSS file, would this extract that too?  I don't see it in the code.

Thanks,
Katherine

From: ddi-users-bounces at icpsr.umich.edu<mailto:ddi-users-bounces at icpsr.umich.edu> [mailto:ddi-users-bounces at icpsr.umich.edu]<mailto:[mailto:ddi-users-bounces at icpsr.umich.edu]> On Behalf Of Elliott G Smith
Sent: Tuesday, January 10, 2012 2:06 PM
To: Data Documentation Initiative Users Group
Subject: Re: [DDI-users] DDI tools to get SPSS to DDI 2.x

Hi Katherine,

If you can't have access to the SPSS dataset, but you need the variable metadata in a form that will be easier to get into DDI, I suggest you ask the OIR staff to run the following SPSS syntax on their dataset. It will create a file that they can send to you. Be default, the output file is html, but you can specify xml, xls, or sav.

*** This code will open the specified SPSS dataset, create a codebook, and save it to an output file.
* Update the path so that it points to the location of the data.
cd "C:\Users\You\Documents".

* Update the name of the file.
get file = "Your SPSS Dataset.sav".

* By default, the codebook is output as html, but one can also specify other formats, such as XLS, OXML, or SAV.
* Also, be sure to update the extension in the output file name.
oms
   /select tables
   /destination format = html  outfile = "DatasetMetadata.html".
codebook
   /varinfo position label type format measure valuelabels
   /fileinfo name casecount weight
   /statistics none.
omsend.

Hope this helps,
Elliott

On Tue, Jan 10, 2012 at 12:36 PM, Katherine McNeill <mcneillh at mit.edu<mailto:mcneillh at mit.edu>> wrote:
I am creating a codebook of a survey done on campus, using <oXygen/> (in 2.0 or 2.1 because we're just looking for a simple codebook, and planning on using style sheets written for this version).  However, for reasons of privacy, I don't have access to the data file itself, created with SPSS by our Office of Institutional Research.  I'm working on the variable descriptions in the codebook and could enter them manually (I do have a PDF of the survey instrument), but for time (and my desire to model good DDI processes), I'm hoping to find a more efficient way to produce the variable metadata in some semi-automated way (from the SPSS file, I'm hoping).  The office that holds the data file isn't experienced with DDI, but I'm this may also be an opportunity to introduce them to the standard (if I can do so in a relatively convenient way).

A couple of options I've thought of (but have hit dead ends on both):

1) I'm aware of the ability of Stat/transfer to produce DDI 3.0 metadata.  So maybe they could create the DDI 3.0 on their end (if they have access to Stat/transfer) and then I could convert it to 2.x.  But I'm afraid I'm at a loss to find a tool to be able to convert the DDI 3.0 to an earlier version.  Maybe I'm missing something?

2) Another alternative (but seems to be more work on their part) is to find an easy tool for them to use to create the DDI 2.x right from the SPSS on their part.  However, I haven't seem to find one currently available that seems highly easy to use.  DDI DExT seems to be maybe a little too big of a learning curve.  I've also considered XCONVERT, but it has a couple of different steps and may not capture the question text.  Are there other tools out there for this that people could recommend?

Or maybe there's a third alternative I haven't considered.

Many of the tools listed on the DDI web site (http://www.ddialliance.org/resources/tools) aren't up-to-date (aside: I am on the group to update this system, and we're working on it...), and the availability of things can come and go, so I'm hoping that someone has some better tools or processes on their end that they can recommend/share.

Sincerely,
Kate McNeill

___________________________________
Katherine McNeill
Social Science Data Services and Economics Librarian
Massachusetts Institute of Technology
mcneillh at mit.edu<mailto:mcneillh at mit.edu> | 617-253-0787<tel:617-253-0787>
http://libraries.mit.edu/guides/subjects/data/
http://libguides.mit.edu/econ


_______________________________________________
DDI-users mailing list
DDI-users at icpsr.umich.edu<mailto:DDI-users at icpsr.umich.edu>
http://www.icpsr.umich.edu/mailman/listinfo/ddi-users



--
Elliott G. Smith, PhD
National Data Archive on Child Abuse and Neglect
Bronfenbrenner Center for Translational Research
Cornell University
egs1 at cornell.edu<mailto:egs1 at cornell.edu> | 607.592.9822
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.icpsr.umich.edu/pipermail/ddi-users/attachments/20120111/5ad08b6e/attachment.html 


More information about the DDI-users mailing list