The Survey Interchange Format - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

The Survey Interchange Format

Description:

Encapsulates the definitions and data of a large number of common surveys. ... VALUE CODE='3' "Friar Tuck"Restaurant /VALUE ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 20
Provided by: asc50
Category:

less

Transcript and Presenter's Notes

Title: The Survey Interchange Format


1
  • The Survey Interchange Format
  • Standard
  • Keith Hughes, Merlinco Ltd
  • Stephen Jenkins, Mercator Ltd
  • Geoff Wright, Arbitron UK Ltd

2
Design Goals
  • Encapsulates the definitions and data of a large
    number of common surveys.
  • Reasonably simple to implement for both export
    and import.
  • Does not prejudice further development by
    incorporating more than is needed.

3
Text file benefits
  • Files can be inspected using a suitable text
    editor which speeds the development of both
    import and export programs.
  • Import functions could be written before
    equivalent export functions (if any) by
    hand-coding suitable Triple-S files.
  • Introduce corrections if particular problems
    arose in the field.

4
XML
  • Extensible Markup Language

5
HTML to XML
  • ltFONT FACEArialgtWhen was your business
    founded?lt/FONTgt
  • ltQUESTIONgtWhen was your business
    founded?lt/QUESTIONgt

6
Variable Types
  • SINGLE - categorical data with one response
    allowed
  • MULTIPLE - categorical data with any number of
    responses allowed
  • QUANTITY - open numeric value (integer or real)
  • CHARACTER - character data
  • LOGICAL - individual Yes/No or True/False data
    values

7
Standard Names
  • consist of 1-8 characters
  • composed of only characters A-Z, a-z and 0-9
  • start with a letter
  • are case insensitive
  • all characters are considered significant
  • are unique within the survey

8
Definition File Overview
  • lt!DOCTYPE SSS SYSTEM "c\sss.dtd"gt
  • ltSSS VERSION"1.2"gt
  • ltDATEgt2/MAR/1999lt/DATEgt
  • ltTIMEgt1832lt/TIMEgt
  • ltORIGINgtProg v1.42lt/ORIGINgt
  • ltUSERgtAnn Otherlt/USERgt
  • ltOPTIONSgtSTANDARD NAMESlt/OPTIONSgt
  • ltSURVEYgt
  • ltTITLEgtHistoric House Exit Surveylt/TITLEgt
  • ltRECORD ID"V"gt
  • details for each survey variable
  • lt/RECORDgt
  • lt/SURVEYgt
  • lt/SSSgt

9
Single Type Variable
  • ltVARIABLE ID"1"gt
  • ltNAMEgtQ1lt/NAMEgt
  • ltLABELgtNumber of visitslt/LABELgt
  • ltTYPEgtSINGLElt/TYPEgt
  • ltPOSITION START"1" /gt
  • ltVALUESgt
  • ltVALUE CODE"1"gtFirst visitlt/VALUEgt
  • ltVALUE CODE"2"gtVisited before within
    the yearlt/VALUEgt
  • ltVALUE CODE"3"gtVisited before
    thatlt/VALUEgt
  • lt/VALUESgt
  • lt/VARIABLEgt

10
Multiple Type Variable
  • ltVARIABLE ID"4"gt
  • ltNAMEgtQ4lt/NAMEgt
  • ltLABELgtTwo favourite attractions visitedlt/LABELgt
  • ltTYPEgtMULTIPLElt/TYPEgt
  • ltPOSITION START"41" FINISH"42" /gt
  • ltSPREAD SUBFIELDS"2" /gt
  • ltVALUESgt
  • ltVALUE CODE"1"gtSherwood Forestlt/VALUEgt
  • ltVALUE CODE"2"gtNottingham Castlelt/VALUEgt
  • ltVALUE CODE"3"gtquotFriarsquot
    Restaurantlt/VALUEgt
  • ltVALUE CODE"4"gtquotMaid Marionquot
    Cafelt/VALUEgt
  • ltVALUE CODE"5"gtMining museumlt/VALUEgt
  • ltVALUE CODE"9"gtOtherlt/VALUEgt
  • lt/VALUESgt
  • lt/VARIABLEgt

11
Character Type variable
  • ltVARIABLE ID"3"gt
  • ltNAMEgtQ3lt/NAMEgt
  • ltLABELgtOther attractions visitedlt/LABELgt
  • ltTYPEgtCHARACTERlt/TYPEgt
  • ltPOSITION START"11" FINISH"40" /gt
  • ltSIZEgt30lt/SIZEgt
  • lt/VARIABLEgt

12
Quantity Type Variable
  • ltVARIABLE ID"5"gt
  • ltNAMEgtQ5lt/NAMEgt
  • ltLABELgtMiles travelledlt/LABELgt
  • ltTYPEgtQUANTITYlt/TYPEgt
  • ltPOSITION START"43" FINISH"45" /gt
  • ltVALUESgt
  • ltRANGE FROM"1" TO"499" /gt
  • ltVALUE CODE"500"gt500 or morelt/VALUEgt
  • ltVALUE CODE"999"gtltSPECIAL/gtNot
    statedlt/VALUEgt
  • lt/VALUESgt
  • lt/VARIABLEgt

13
Logical Type Variable
  • ltVARIABLE ID"6"gt
  • ltNAMEgtQ6lt/NAMEgt
  • ltLABELgtEnjoyed visitlt/LABELgt
  • ltTYPEgtLOGICALlt/TYPEgt
  • ltPOSITION START"46" /gt
  • lt/VARIABLEgt

14
Sample variable in Triple-S 1.1
  • VARIABLE 4
  • NAME "Q4"
  • LABEL "Two favourite attractions visited
  • TYPE MULTIPLE
  • POSITION 41 TO 42
  • SPREAD 2
  • VALUES
  • 1 "Sherwood Forest
  • 2 "Nottingham Castle
  • 3 ""Friar Tuck" Restaurant
  • 4 ""Maid Marion" Cafe
  • 5 "Mining museum
  • 9 "Other"
  • END VALUES
  • END VARIABLE

15
Sample variable in Triple S-XML
  • ltVARIABLE ID"4"gt
  • ltNAMEgtQ4lt/NAMEgt
  • ltLABELgtTwo favourite attractions
    visitedlt/LABELgt
  • ltTYPEgtMULTIPLElt/TYPEgt
  • ltPOSITIONgt41 TO 42lt/POSITIONgt
  • ltSPREADgt2lt/SPREADgt
  • ltVALUESgt
  • ltVALUE CODE"1"gtSherwood Forestlt/VALUEgt
  • ltVALUE CODE"2"gtNottingham Castlelt/VALUEgt
  • ltVALUE CODE"3"gtquotFriar
    TuckquotRestaurantlt/VALUEgt
  • ltVALUE CODE"4"gtquotMaid Marionquot
    Cafelt/VALUEgt
  • ltVALUE CODE"5"gtMining museumlt/VALUEgt
  • ltVALUE CODE"9"gtOtherlt/VALUEgt
  • lt/VALUESgt
  • lt/VARIABLEgt

16
Triple S-XML DTD
  • lt?xml version"1.0" ?gt
  • lt!ELEMENT SSS (DATE?, TIME?, ORIGIN?, USER?,
    OPTIONS?, SURVEY)gt
  • lt!ATTLIST SSS VERSION CDATA REQUIRED gt
  • lt!ELEMENT DATE (PCDATA) gt
  • lt!ELEMENT TIME (PCDATA) gt
  • lt!ELEMENT ORIGIN (PCDATA) gt
  • lt!ELEMENT USER (PCDATA) gt
  • lt!ELEMENT OPTIONS (PCDATA) gt
  • lt!ELEMENT SURVEY (TITLE, RECORD) gt
  • lt!ELEMENT TITLE (PCDATA) gt
  • lt!ELEMENT RECORD (VARIABLE) gt
  • lt!ATTLIST RECORD ID CDATA REQUIRED gt
  • lt!ELEMENT VARIABLE (NAME, LABEL,
    TYPE, POSITION,((SPREAD?, VALUES) SIZE)?)gt
  • lt!ATTLIST VARIABLE ID CDATA
    REQUIREDgt
  • lt!ELEMENT NAME (PCDATA)gt
  • lt!ELEMENT LABEL (PCDATA)gt
  • lt!ELEMENT TYPE (PCDATA) gt
  • lt!ELEMENT POSITION EMPTYgt

17
Benefits of XML
  • Version changes easier to manage
  • Standard syntax
  • Off-the-shelf parsers simplify development

18
Further work
  • Incorporate inverted data for each variable
  • Describe structured (hierarchical) datasets
  • Incorporate calculations and derived values

19
Availability
  • Printed standard available now
  • DTD and documentation available from ASC website
    http//www.asc.org.uk
Write a Comment
User Comments (0)
About PowerShow.com