A new extension command, STATS GET TRIPLES,
has been posted to the SPSS Community website (www.ibm.com/developerworks/spssdevcentral)
in the Extension Commands collection (Downloads for SPSS Statistics; then
Extension Commands).
This command reads data that is in Triple-S format. A Triple-S dataset, typically a survey file, consists of an XML file that defines the metadata and a fixed format or csv file that contains the data. The standard definition is at http://http://www.triple-s.org. GET TRIPLES can read the data directly and can also create a standard syntax file that reads the data. It includes functionality to handle multiple category and multiple response sets, and it can create custom attributes to deal with metadata that does not fit into the standard SPSS metadata. This extension requires the Python Essentials. It can be downloaded from the SPSS Community site or, for Statistics V22 users, it can be downloaded and installed from the Utilities menu. Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 |
At 10:03 AM 2/13/2014, Jon K Peck wrote:
>A new extension command, STATS GET TRIPLES, ... reads data that is >in Triple-S format. A Triple-S dataset consists of an XML file that >defines the metadata and a fixed format or csv file that contains >the data. GET TRIPLES can read the data directly and can also create >a standard syntax file that reads the data. Neat! Must have been some interesting programming. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Thanks. The Triple-S schema has a
number of, shall we say, oddities that made this more challenging than
I expected and surprisingly, lacks a good way of specifying missing values,
but I think the command wrings as much out of the metadata as possible.
If you look at the syntax generated for a survey, you can see how
much transformation is required.
By implementing this in Python, I was able to take advantage of its standard library of XML modules. I used a SAX parser - no relationship to Sax Basic, for parsing the XML. Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Richard Ristow <[hidden email]> To: Jon K Peck/Chicago/IBM@IBMUS, [hidden email], Date: 02/13/2014 09:56 AM Subject: Re: SPSS Community News At 10:03 AM 2/13/2014, Jon K Peck wrote: >A new extension command, STATS GET TRIPLES, ... reads data that is >in Triple-S format. A Triple-S dataset consists of an XML file that >defines the metadata and a fixed format or csv file that contains >the data. GET TRIPLES can read the data directly and can also create >a standard syntax file that reads the data. Neat! Must have been some interesting programming. |
Free forum by Nabble | Edit this page |